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 "MatlabEngine.hpp"
#include <iostream>

in my program, and tested the interface by calling the function

void callFevalsqrt() 
{ 
// Call MATLAB sqrt function on array 
using namespace matlab::engine; 
// Start MATLAB engine synchronously 
//GIVES SEGFAULT         
std::unique_ptr<MATLABEngine> matlabPtr = startMATLAB(); 
}

as recommended by matlab here 
<https://de.mathworks.com/help/matlab/matlab_external/test-your-build-environment.html>
.

However, the call startMATLAB() results in a segmentation fault (core 
dumped) 
without any additional stack trace. 

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() runs without any errors. 
>From this, I include that dealii compiled with MPI and the MATLAB engine 
can not be combined (because matlab does not support compilers from MPI ?)

Has someone experience with that and can provide a workaround?

Thanks for help!

Best regards,
Math

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/bce35cf5-9043-4998-af1e-a3a4d83be875n%40googlegroups.com.

Reply via email to