Open evgueni-ovtchinnikov opened 4 years ago
duplicate with previous issue I believe.
I really can't understand this. Unless you use parfor
etc in Matlab, I can't see how Matlab's multi-threading would come into play. I can see conflicts on openmp DLLs of course...
assuming this is on Windows?
yes
I can see conflicts on openmp DLLs of course...
My guess is that this is the source of the problems. Would potentially be fixed by building STIR using OpenMP DLLs to those provided by Matlab.
should I remove osem_reconstruction.m
for now and tag?
Would potentially be fixed by building STIR using OpenMP DLLs to those provided by Matlab.
probably can't be done, as no .h and .lib files available I guess. I'm not sure how this works on Windows with Visual Studio by the way (there isn't an equivalent of libgomp
or so). There isn't anything relevant in C:\Program Files\MATLAB\R2019a\bin\win64
for instance
@evgueni-ovtchinnikov no need to remove as it's not a problem with SIRF, but with your particular set up.
should I remove
osem_reconstruction.m
for now and tag?
this is a Windows-only problem as far as we know. We don't officially support it, let's not remove functionality therefore. In any case, removing a demo will not solve the problem.
Not sure how much this helps, but there is some Staff Q&A about this on the Mathworks site, explaining that indeed there can be issues regarding libraries, as you are discussing in this thread.
yup. that looks like a good find. In particular,
we recommend you also use Intel's OpenMP implementation in your MEX-files
fun!
same with hkem_reconstruction.m
acquisition_sensitivity_from_ecat8.m
crashes too, albeit on a different step (on AcquisitionSensitivityModel.forward
, the other two on reconstructor set_up
).
@KrisThielemans I take it I should ignore this and press on with 3.0.0-rc1 checklist?
MATLAB crashes on osem_reconstruction.m.
I managed to trace the source of trouble to the call
this->compute_sensitivities();
inPoissonLogLikelihoodWithLinearModelForMean<TargetT>::set_up
(line 318 inPoissonLogLikelihoodWithLinearModelForMean.cxx
).Apparent reason is a conflict between multithreading in STIR and MATLAB - if STIR is built without OpenMP, the script runs ok.
Python script
osem_reconstruction.py
runs ok regardless (Python does not use multithreading).