[aspect-devel] Segmentation fault when referring to the functions of "class SimulatorAccess" in both depth-dependent.cc and its base model.
Shangxin Liu
sxliu at vt.edu
Mon Nov 23 20:33:45 PST 2015
Hi;
I added some new stuff to the simple.cc file and this requires using "this
-> get_geometry_model().depth(position)" to refer to the functions of the
class SimulatorAccess. However, when I run the code with the compositing
material model, i.e., a depth-dependent model with the base model of the
simple material model, I always got a segmentation fault error as the
follows:
[hs002:21123] *** Process received signal ***
[hs002:21123] Signal: Segmentation fault (11)
[hs002:21123] Signal code: Address not mapped (1)
[hs002:21123] Failing at address: 0xab0
[hs002:21123] [ 0] /lib64/libpthread.so.0(+0xf500) [0x7fd24688e500]
[hs002:21123] [ 1]
/home/shangxin/aspect/build/aspect(_ZNK6aspect15SimulatorAccessILi3EE18get_geometry_modelEv+0x4)
[0x81dcf4]
[hs002:21123] [ 2]
/home/shangxin/aspect/build/aspect(_ZNK6aspect13MaterialModel6SimpleILi3EE8evaluateERKNS0_19MaterialModelInputsILi3EEERNS0_20MaterialModelOutputsILi3EEE+0x99)
[0x83ac49]
[hs002:21123] [ 3]
/home/shangxin/aspect/build/aspect(_ZNK6aspect13MaterialModel14DepthDependentILi3EE8evaluateERKNS0_19MaterialModelInputsILi3EEERNS0_20MaterialModelOutputsILi3EEE+0x27)
[0x87cfa7]
[hs002:21123] [ 4]
/home/shangxin/aspect/build/aspect(_ZN6aspect19AdiabaticConditions14InitialProfileILi3EE10initializeEv+0x48e)
[0x69759e]
[hs002:21123] [ 5]
/home/shangxin/aspect/build/aspect(_ZN6aspect9SimulatorILi3EEC2EP19ompi_communicator_tRN6dealii16ParameterHandlerE+0x1906)
[0x7c56d6]
[hs002:21123] [ 6] /home/shangxin/aspect/build/aspect(main+0x468) [0x693748]
[hs002:21123] [ 7] /lib64/libc.so.6(__libc_start_main+0xfd) [0x7fd24650bcdd]
[hs002:21123] [ 8] /home/shangxin/aspect/build/aspect() [0x68cd65]
[hs002:21123] *** End of error message ***
--------------------------------------------------------------------------
At the beginning, I thought this was due to some problems of my new plugin
in the simple.cc. So I went back to grab the original public ASPECT version
from git hub and make a test using depth dependent model with the simple
compressible as the base model. Unfortunately, this still leads to the
segmentation fault as the follows:
[hs002:31949] *** Process received signal ***
[hs002:31949] Signal: Segmentation fault (11)
[hs002:31949] Signal code: Address not mapped (1)
[hs002:31949] Failing at address: 0x40
[hs002:31949] [ 0] /lib64/libpthread.so.0(+0xf500) [0x7f7559add500]
[hs002:31949] [ 1]
/home/shangxin/aspect/build/aspect(_ZNK6aspect15SimulatorAccessILi3EE20get_surface_pressureEv+0x4)
[0x81db04]
Finally, I found that this error will always appear when using the
compositing material model where the "class SimulatorAccess" is accessed
both in depth-dependent and the base material model with the form such as
"this -> get_geometry_model().depth(position)". And when I use the original
simple.cc as the base model, which doesn't access the function of the
"class SimulatorAccess" using command "this -> get_.......", the code can
run successfully.
It seems that the functions of the "class SimulatorAccess" cannot be
accessed both in depth-dependent model and its base model using "this ->
get_........".
I think for now the expedient solution is to only use the simple.cc
material model and add some new plugin to it for the depth-dependent data.
But I'd like to report this problem with the compositing material model. If
this can be fixed, it will be better to use the available
"depth-dependent.cc".
Best,
Shangxin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20151123/fa615c6b/attachment.html>
More information about the Aspect-devel
mailing list