Jack and I narrowed down the problem to a few lines of MATLAB code
=== in bash ===
export OMP_NUM_THREADS=2
matlab -nojvm
=== in MATLAB ===
n = 32;
A=zeros(n,n,n);
B=zeros(n,n,n);
C=zeros(n,n,n);
A(:,1,:) = B(:,:,1)*squeeze(C(:,1,:));
=== Error message ===
OMP abort: Unable to set worker thread stack size to 4195328 bytes
Try reducing KMP_STACKSIZE or increasing the shell stack limit.
We contacted the MathWorks, who told us that the environment variable,
OMP_NUM_THREADS, is not officially supported for the Linux platform. It
should be set to 1 (or not set at all) in order to use MATLAB 7.0.4 (R14SP2)
without any thread related errors.
Best regards,
-John
> I eagerly tried setting OMP_NUM_THREADS=2 and then starting Matlab...
> everything seemed fine... I completed a DICOM conversion... started a
> TBR conversion... and then Matlab crashed (all the windows magically
> disappeared) just as the TBR routine started to write the files to the
> disk.
>
> Setting OMP_NUM_THREADS=1 fixes this problem.
>
> It's 100% reproducible on my system.
>
> Has anyone got OMP_NUM_THREADS=2 to work on their setup?
>
> My specs:
>
> SPM2 devel version (downloaded March 3rd 2005)
> Mex files re-compiled using ICC 8.0
> Matlab R14 SP2
> Gentoo Linux (updated yesterday)
> Kernel 2.6.10-r4
> ATI xorg drivers
> Pentium4 2.8Ghz with HT
> 1GB of DDR SDRAM
> I'm using the default version of MKL which shipped with Matlab R14SP2
|