Dear Juergen:
Another couple hints
AS Volkmar noted the maxmem variable is very specific to the functions
spm_spm.m and spm_spm_Bayes.m and only controls how big a chunk of the
volume those particular functions process at a time.
On windows systems (and I think Linux kernel 2.4.x) memory for the process
is usually limited to 2 GB. There is a 3GB switch for windows systems with
sufficient memory, which you may want to look into. On 64 bit systems Matlab
2006a and now 2006b can take advantage of even larger memory spaces.
You didn't say at what point you received the out of memory error. Was there
a particular line#? If it was at around line 101 or the spm_conv_vol you may
be able to finesse this by adding code to write the matrix called label out
to disk. It seems that spm_conv_vol will operate on an in memory if a matrix
is supplied. However, it will write the item out to disk if a volume
specification is provided for inputs V and Q. This might be slower but might
allow the process to complete.
Finally you could choose not to use the HMRF feature of the toolbox.
Darren
>-----Original Message-----
>From: SPM (Statistical Parametric Mapping)
>[mailto:[log in to unmask]] On Behalf Of Volkmar Glauche
>Sent: Wednesday, September 06, 2006 8:31 AM
>To: [log in to unmask]
>Subject: Re: [SPM] Memory problem with HMRF option in VBM5 toolbox
>
>Dear Juergen,
>
>defaults.stats.maxmem only affects SPM statistics, and nothing else.
>MATLAB will use all memory it can get from Hardware/OS. Did
>you monitor MATLAB memory usage? What OS/processor are you
>running on? You might want to look for hints on the Mathworks
>web site if you feel MATLAB should use more of your system memory.
>
>Volkmar
>
>On Wed, 6 Sep 2006, Juergen Haenggi wrote:
>
>> We use VBM5 toolbox in SPM5 and the HMRF option. Because our raw
>> images are huge in size, the HMRF option causes a "Out of memory
>> problem".
>>
>> therefore we upgraded the RAM from 2 to 4 GB, but it seems
>that MATLAB
>> or SPM did not use it. I changed the defaults in SPM, e.g.,
>>
>> defaults.stats.maxmem = 2^25; (instead 2^20)
>>
>> what is the unit? Bit or Byte or something else?
>>
>> But after changing, the "Out of memory problem" persists!
>>
>> does this change in SPM defaults also change the amount of memory
>> allocated by MATLAB?
>>
>> I have read that MATLAB could not allocate more than 2 GB memory?
>>
>> How can I use 4 GB of RAM for the preprocessing of my data?
>>
>> Thanks for help
>> Best regards
>> Juergen
>>
>> ----------------------------------------------
>> Juergen Haenggi, Ph.D. student
>> Neuropsychology and Imaging
>> Division of Psychiatry Research
>> Psychiatric University Hospital
>> University of Zurich, Switzerland
>> P.O. Box 1931
>> Lenggstrasse 31, 8032 Zurich
>> 0041 44 384 26 10 (office phone)
>> 0041 76 445 86 84 (mobile phone)
>> 0041 44 384 26 86 (fax)
>> H 115 (office room number)
>> [log in to unmask] (division email)
>> http://www.dpr.unizh.ch/ (division website)
>> http://www.juergenhaenggi.ch (private website)
>> ----------------------------------------------
>>
>>
>>
>
>--
>Volkmar Glauche
>-
>Department of Neurology
>[log in to unmask]
>Universitaetsklinikum Freiburg Phone 49(0)761-270-5331
>Breisacher Str. 64 Fax 49(0)761-270-5416
>79106 Freiburg
>
|