I believe that the fix for spm_spm.m that I have just put in the patches
directory should solve this problem. What I believe was happening was that
the limit to the number of files that can be open at any time was being
reached. When SPM2 is writes image files a plane at a time, it can either
open the files at the start, and close them at the end, or it can open and
close them each time it writes a plane of data. The former solution is
generally faster, but when there are many files to deal with, it can cause
the kind of problems you saw.
The difference I made was that the residual images are now opened and closed a
plane at a time.
Best regards,
-John
> Our laboratory has been running SPM analyses with success for a while now.
> Recently, we started to encounter a strange set of errors that seem to
> happen randomly when SPM is reading or writing image files. Let me point
> out that this is not likely to be a problem with SPM, but with something
> about our configuration. I am simply hoping that our errors might seem
> familiar to someone else who might have a remedy in mind.
>
> The errors are all of a similar flavor (file I/O) but occur without much
> rhyme or reason --- sometimes model estimation will work fine, sometimes
> it will work for hours and then die on one image file. Also, this is
> occurring on three machines in our lab, so it is not likely hardware
> related. We are running RedHat Linux 9 (2.4.20) with SPM2 on Matlab
> 6.51. In particular, we are frequently seeing errors jumping out
> from spm_write_plane and also in mex'd routines like spm_sample_vol. Here
> is a sample error:
>
> * - SPM2: spm_write_plane -----------------------------------------
>
> Error writing:
>
> ResI_0002.img
>
> Check disk space / disk quota.
>
> ----------------------------------------- 17:09:36 - 17/12/2004
>
> ??? Error using ==> spm_write_plane (write_analyze_plane)
> Error writing ResI_0002.img.
>
> Error in ==>
> /speechlab/software/SLT/startup/../spm2updates/spm_write_plane.m
> On line 20 ==> V = write_analyze_plane(V,A,p);
>
> Error in ==> /speechlab/software/SLT/startup/../spm2edits/spm_spm.m
> On line 791 ==> VResI(i) = spm_write_plane(VResI(i), j,
> z);
>
> ...
>
> Please note that there is plenty of available disk space and permissions
> seem to be in order. This particular error seems to arise from an fwrite
> returning an error, and others are similar. And again, when and where
> these errors pop up seems quite random, but they are occurring
> consistently on three separate machines.
>
> Has anybody out there encountered something like this before?
>
> Thanks,
> Jay Bohland
>
> Speech Lab / Department of Cognitive & Neural Systems / Boston University
|