Hi,
I've got a general question about selxavg3-sess. In short, when I try to run the analysis, MATLAB exits with an out of memory issue.
My previous studies used a TR of 8 seconds, about 120 Acquisitions per run, 5 runs, and everything worked just fine.
I now ran two different pilot studies with a TR of 1 second, 4 runs with 840 Acquisitions each.
On this data, sexlavg3-sess causes MATLAB to exit with an out of memory message. My main question is, is this just too much data to process or is there a way to configure MATLAB/change the processing scripts to free more memory or use more swap space to allow processing or could it be an issue with the analysis setup creating way too much data?
Here are some more details:
I use FS-Fast from the freesurfer 4.0.1. rh9 32bit package.
When I run the analysis on my machine (x86_64 linux with 1 GB RAM), I get following error, followed by a Java VM fatal exception:
-----------
.
.
OLS Residual Pass
run 1 t= 0.0
Loaded /home/WELTRAUM/STUDY2_TR1_TEST/GMOC/bold/008/gm_run_er.par as a par2 file.
??? Error using ==> unknown
Out of memory. Type HELP MEMORY for your options.
Error in ==> fast_selxavg3 at 413
rsserun = sum(rrun.^2);
>> Unable to open file for Java VM logging
Opening log file: /home/stefan/java.log.10568
pure virtual method called
terminate called without an active exception
.
--------------------
I assumed, 1 GB might just not enough memory, so I tried the same analysis with just one run and turned off as much as possible of the other options (temporal whitening, motion regressors, etc.). Yet, looking at the analysis.conf resulting from that, I am not sure that turning it off in the mkanalysis-sess -gui had an effect with all options. With that configuration and just one run, the memory problem persisted.
Next, I tried it on another linux box with 2GB RAM (same freesurfer version), with similar errors during whitening:
----------------------
.
.
Whitening
Computing whitening matrices
??? Error using ==> zeros
Out of memory. Type HELP MEMORY for your options.
Error in ==> fast_selxavg3 at 501
W = zeros(ntptot,ntptot,flac0.acfbins);
>> ------------------------------------------
ERROR: fast_selxavg3() failed\n
-------------------------------------
Next, still assuming not enough memory to be the problem, I tried it on a Mac Pro with Mac OS X 10.5 and 4 GB RAM using the current corresponding freesurfer version (freesurfer-Darwin-leopard-i686-stable-pub-v4.0.3-full.dmg). Still, similar memory problems persisted:
-----------------
.
.
Whitening
Computing whitening matrices
MATLAB(21818,0xb0801000) malloc: *** mmap(size=913952768) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
??? Out of memory. Type HELP MEMORY for your options.
Error in ==> fast_selxavg3 at 505
W = zeros(ntptot,ntptot,flac0.acfbins);
>> ------------------------------------------
ERROR: fast_selxavg3() failed\n
------------------------------------
Now, although it could be just too much data to compute, I think I'm not the only person who wishes to analyse data of that size, as it is not really that much. My session consists of 14 Minutes per run with TR=1 and about 8 Blocks per run with an event-related paradigm, resulting in about 16 roughly 32s long blocks to fit with the GLM (per run). Maybe, I simply made some errors in setting up the analysis. Here's one paradigm file of the first run and the analysis.conf:
------------------
16.000000 0
68.235200 1
99.998800 2
114.000000 0
169.248400 1
201.487000 2
217.000000 0
264.894600 1
300.822200 2
318.000000 0
331.545500 1
356.612700 1
375.654700 2
387.401400 1
410.274400 2
413.000000 0
453.019700 1
508.000000 0
515.996200 2
552.006400 1
603.000000 0
603.923700 2
652.629700 1
699.231800 2
702.000000 0
709.726400 1
753.749600 1
781.971400 2
804.000000 0
-----------------------
----------- analysis.conf -----------------
cat analysis.cfg
-delay 0.000000
-TER 1.000000
-polyfit 2
-gammafit 2.250000 1.250000
-gammaexp 2.000000
-timewindow 24.000000
-prestim 4.000000
-autostimdur
------------------------------------------------
------------ analysis.info ----------------------
cat analysis.info
analysis gmoc_analysis_1
TR 1.000000
fsd bold
funcstem fmcstc
runlistfile study_runs
tpexclude
parname gm_run_er.par
designtype event-related
nconditions 2
Condition 1 Condition01
Condition 2 Condition02
--------------------------------------------------
Thanks in advance, your comments on this issue and the size of the fMRI session is greatly appreciated.
Best regards,
Stefan Schadwinkel