Dear Satrajit, Christophe and the SPM list,
I've tried to figure out what's going on when Matlab crashes after
setting OMP_NUM_THREADS=2.
Firstly, the exit code that Matlab produces when it crashes is 134.
I've searched the Mathworks website but haven't found anything to
explain what "exit code 134" means.
I've tried using the most up-to-date version of Intel's MKL in place of
the one which ships with Matlab R14 SP2 but that produced exactly the
same results.
I've also tried re-compiling my mex files with GCC 3.3.5-r1. I've tried
optimising for my P4 and I've tried compiling without architecture
optimisation.
After stepping through the code I'm now pretty sure that it's line 240
of spm_TBR that brings Matlab to its knees. This line reads:
---------
f1d(:,line,:)=M(:,:,line)*squeeze(meas(:,line,:));
----------
And is part of this function:
----------
%_______________________________________________________________________
function vol=trajrecon(meas,M,smooth_par)
% Oliver Joseph's TBR reconstruction
%11.11.2003: smoothing parameter has become input argument
% Regridded FT!!!!
% fid ( LINES, POINTS, SLICES )!!!
%-------------------------------------------------------------------
f1d=zeros(64,size(meas,2),size(meas,3));
for line=1:size(meas,2)
f1d(:,line,:)=M(:,:,line)*squeeze(meas(:,line,:));
end;
-----------
Does anyone have any clue as to what's doing wrong here?
Many thanks,
Jack
Satrajit Ghosh wrote:
> That's rather interesting and intriguing at the same time. I don't
> have Matlab R14 SP2 yet, but I have "successfully" run an spm analysis
> with OMP_NUM_THREADS=4 on a dual Xeon P4 machine. Not using the
> spm_dev version though (I have it installed but haven't had the time
> to check it out), but we do have our mex files compiled with icc 8.1.
>
> The intriguing part is that it crashed while writing. MKL should not
> be used for writing files. By any chance are you writing over NFS?
>
> Satra
>
>
|