Segmentation fault when running FieldConvert gradient module
This was highlighted as an issue on the mailing list. I've verified the problem so opening an issue on this.
A segfault occurs when running FieldConvert
with the gradient module when running an example based on the basic Helmholtz tutorial.
Steps to reproduce:
- Download and extract
basics-helmholtz.tar.gz
- Copy
Helm_conditions.xml
from thecompleted
to thetutorial
directory and run the following:
$ Nekmesh Helm_mesh.msh Helm_mesh.xml
$ ADRSolver -v Helm_mesh.xml Helm_conditions.xml
$ FieldConvert Helm_mesh.xml Helm_conditions.xml Helm_mesh.fld Helm_mesh.vtu
Now compute the gradients:
$ FieldConvert -m gradient Helm_mesh.xml Helm_conditions.xml Helm_mesh.fld Helm-grad.fld
The final command results in a segmentation fault. The relevant part of the gdb output (paths modified) shows the following:
#0 0x00007ffff7855902 in Nektar::Array<Nektar::OneD, double const>::size (this=0x80) at /.../nektar/library/LibUtilities/BasicUtils/SharedArray.hpp:314
#1 0x00007ffff789fcc3 in Vmath::Vcopy<double> (n=2724, x=..., incx=1, y=..., incy=1) at /.../nektar/library/LibUtilities/BasicUtils/VmathArray.hpp:451
#2 0x00007ffff7925807 in Nektar::FieldUtils::ProcessGrad::Process (this=0x5555558e64c0, vm=...) at /.../nektar/library/FieldUtils/ProcessModules/ProcessGrad.cpp:165
#3 0x00005555555cfb5e in RunModule (module=warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<Nektar::FieldUtils::ProcessGrad*, Nektar::MemoryManager<Nektar::FieldUtils::ProcessGrad>::AllocateSharedPtrD<Nektar::MemoryManager<Nektar::FieldUtils::ProcessGrad>::AllocateSharedPtr<std::shared_ptr<Nektar::FieldUtils::Field> >(std::shared_ptr<Nektar::FieldUtils::Field> const&)::{lambda(Nektar::FieldUtils::ProcessGrad*)#1}, ...
...
std::shared_ptr<Nektar::FieldUtils::Module> (use count 2, weak count 0) = {...}, vm=..., verbose=false) at /.../nektar/utilities/FieldConvert/FieldConvert.cpp:737
#4 0x00005555555cd308 in main (argc=7, argv=0x7fffffffe468) at /.../nektar/utilities/FieldConvert/FieldConvert.cpp:490