"I don't know whether anyone has run into exactly this problem. What happens if
you write a small program that does not use deal.II at all, but uses the uses
the cmake scripts of one of the deal.II tutorial programs? That is, you take
one of the deal.II tutorials, and replace the entire code of that program by
just a minimal thing that calls Matlab but does not call anything in deal.II
nor uses any of the deal.II #include files?"
Good point to narrow down the problem.
I modified step-1 so that the main function only calls matlab via callFevalsqrt().
This works fine, even if I use the mpi compiler mentioned in my original post.
However, if I just add a second line in the main function,
dealii::Triangulation<2> triangulation,
I run again into the segfault.
Including deal.II headers seems to be not the problem, using dealii members/functions seems to a problem.
Clearly, the compiler shipped with openmpi seems not to be the real problem,
although I do not see the above issue with the default compiler on my system.
Attached is the minimal program that I created along with the CMakeLists.txt.
In case you have matlab installed and can reproduce my problem, you only have to replace
<matlabroot> in line 8
by what matlabroot() returns.
Any idea why adding any dealii members/functions causes a segfault in startMatlab() ?
May I have to pass some compiler flags to cmake, given that it works with the default compiler?
Thanks,
Math