Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-23 Thread Mathieu
Attached is the backtrace. Maybe there is an issue with the libmwmvm.so library. This library is not explicitly listed under the linked dependencies (ldd ./step-1), but I do not know if this is the problem or not. Maybe you have a better understanding of the backtrace. Best, Math Matthias M

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Matthias Maier
In the debugger after you ran with the command »r« could you please try to generate a back trace with »bt«? (gdb) r ... (gdb) bt ... Best, Matthias On Thu, Jun 22, 2023, at 17:12 CDT, Mathieu wrote: > See ldd.txt for the output of > $ ldd ./step-1 > and gdb.txt for the output of > $ gdb ./s

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Mathieu
See ldd.txt for the output of $ ldd ./step-1 and gdb.txt for the output of $ gdb ./step-1 Does this help? Matthias Maier schrieb am Donnerstag, 22. Juni 2023 um 23:28:16 UTC+2: > The most likely issue will be a "symbol clash" either due to ABI > incompatible versions of the same external shar

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Matthias Maier
The most likely issue will be a "symbol clash" either due to ABI incompatible versions of the same external shared library linked into the executable, or due to the matlab shared library you are linking against containing these. Can you send us the output of $ ldd executable (for a faulty one)?

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Matthias Maier
On Thu, Jun 22, 2023, at 04:13 CDT, Mathieu wrote: > 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 sec

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Wolfgang Bangerth
On 6/22/23 03:13, Mathieu wrote: 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? I have no experience using Matlab, much less linking to it. I think you need

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Mathieu
"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 t

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-21 Thread Wolfgang Bangerth
On 6/21/23 11:42, Mathieu wrote: I compiled dealii with MPI and the cxx compiler found by cmake is from openmpi-4.1.3. I narrowed my program down and installed dealii without any dependencies to use the default cxx compiler on my system (gcc 11.3.0). Long story short, calling callFevalsqrt() r

[deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-21 Thread Mathieu
Hello everyone, within my dealii program, I want to do some tasks using matlab functions, i.e., I want to call matlab functions/scripts from within my dealii (.cpp) program. To this end, I modified my top-level CMakeLists.txt, included the headers #include "MatlabDataArray.hpp" #include "Matlab