Hi Donna,
again, let me begin with a disclaimer, while I do lurk on the FSL list I
only use a few selected fsl tools, so my experience is somewhat limited...
Donna Lloyd wrote:
> Dear Sebastian,
>
> Thank you for your very helpful e-mail. I have since tried to run the analysis using 64bit FSL on a 64bit system with 4Gb of RAM and 2Gb of swap and still get the same error at the same point:
>
> /usr/local/fsl/bin/fslmaths /home/user/MUS_pilot_v2.feat/filtered_func_data prefiltered_func_data
> Total original volumes = 560
>
> /usr/local/fsl/bin/fslroi prefiltered_func_data example_func 280 1
>
> /usr/local/fsl/bin/fslmaths prefiltered_func_data filtered_func_data
>
> /usr/local/fsl/bin/fslmaths filtered_func_data -Tmin -bin mask -odt char
>
> /usr/local/fsl/bin/fslstats filtered_func_data -k mask -R | awk '{ print }' -
> terminate called after throwing an instance of 'std::bad_alloc'
> what(): std::bad_alloc
>
> /usr/local/fsl/bin/fslmaths filtered_func_data -Tmean mean_func
>
> /bin/rm -rf prefiltered_func_data*
>
> Running top I can see that at this point it's using the entire available RAM and almost all its available swap. Would increasing the swap partition help do you think or is something else going on?
>
Well, it depends ;). Please try the following:
start a new terminal window and the inside do the following:
start top
press f (to add an additional field to the display)
press p (to add the field describing how much swap a process is using)
press enter (to go back to the on-line display)
then start your fsl analysis either from the gui or from a different
terminal. The just monitor what happens in the customized top in the
first terminal. If your analysis will use around 100% of the MEM column
and around 2G of the swap column increasing the swap should help. You
can just add a swap file into the running system, no need for a swap
partition ("man mkswap" gives some ideas, but let me know if you need help).
It might also be a good idea to check that you are actually running the
latest version of FSL (to rule out known bugs).
The big question is (and one I probably can not help you with) should
your analysis eat that much memory. From my cursory look over the output
you give above and the (terse) online help of the fsl* commands, I doubt
that I can make any sense, as the commands seem to be incomplete...
Maybe you post a description of your analysis (including numbers of
runs and analysis steps) to this list. Hopefully somebody actually using
fsl will be able to elucidate whether the observed memory use is
reasonable or not.
anyway, good luck
Sebastian
> Thanks, Donna
>
> Dr. Donna Lloyd
> Lecturer in Psychology
> School of Psychological Sciences
> The University of Manchester
> Oxford Road
> Manchester M13 9PL
> U.K.
> Tel: +44 (0) 161 275 2573
> Fax: +44 (0) 161 275 2685/2588
>
>
> -----Original Message-----
> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of Sebastian Moeller
> Sent: 06 March 2008 12:04
> To: [log in to unmask]
> Subject: Re: memory allocation
>
> Hi Donna,
>
> if you know you are running 64bit FSL on a 64bit system, please ignore
> the following...
>
>
>
> Donna Lloyd wrote:
>> Hi,
>>
>> I'm following-up on a message I posted a while ago about suspected memory allocation problems. I've since installed FSL 4.0 on a desktop with 4Gb of RAM and 2Gb of swap running OpenSuse 10.3. Pre-stats completes but now FILM is crashing (report_log attached) because of memory problems.
>>
>> Running top I can see that the machine only seems to be using half its available RAM, about 10% of its available swap and 100% CPU. I know this is not a software problem but I was hoping someone might be able to advise me how to improve the way the machine uses its available memory and swap to see if that enables FILM to run.
>>
> First obstacle, are you running a 32bit or 64bit kernel and userspace.
> Try "uname -a".
> A 64bit system will report something containig x86_64, like in the
> following example
> Linux son-of-kong 2.6.24.1-6-default #1 SMP 2008/02/22 15:49:32 UTC
> x86_64 x86_64 x86_64 GNU/Linux
> A 32bit system (or a 64bit system with 32bit userspace) will look like
> the following:
> Linux son-of-kong 2.6.24.1-6-default #1 SMP 2008/02/22 15:49:32 UTC i686
> i686 i386 GNU/Linux
> (it might be that it says i586 instead of i686).
> If your result is not x86_64, that is your problem, as the address space
> for user programs is 2 to 3GB for 32bit userspace (4GB being the
> absolute theoretical maximum). You should consider going 64bit.
>
> Secondly, maybe you are running 32bit FSL (on your 64bit system). The
> following will tell you about the FSL binaries (I arbitrarily picked
> flirt to test assuming that a 64bit flirt bionary is the hallmark of a
> 64bit FSL, experts please correct me):
> file `which flirt`
> the result should be similar to:
> /opt/local/fsl/bin/flirt: ELF 64-bit LSB executable, x86-64, version 1
> (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), not
> stripped
> The important information being: ELF 64-bit LSB executable, a 32bit
> binary will give ELF 32-bit LSB executable at that position. So if you
> run 32bit userspace on a 64bit system consider to change this too.
>
>
>
> ahoi & hope that helps.
> Sebastian
>
>
>> Many thanks,
>>
>> Donna
>>
>> Dr. Donna Lloyd
>> Lecturer in Psychology
>> School of Psychological Sciences
>> The University of Manchester
>> Oxford Road
>> Manchester M13 9PL
>> U.K.
>> Tel: +44 (0) 161 275 2573
>> Fax: +44 (0) 161 275 2685/2588
>>
>>
>> -----Original Message-----
>> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of Matthew Webster
>> Sent: 30 January 2008 16:37
>> To: [log in to unmask]
>> Subject: Re: error report on pre-stats
>>
>> Hi,
>> Is your system low on RAM - it looks like an fslmaths call is
>> failing due to a bad_alloc?
>>
>> Regards
>>
>> Matthew
>>
>>> Hi,
>>>
>>> I get an error message when running pre-stats in Feat but don't
>>> know what the problem is. Would you be able to take a look at the
>>> attached report and give me a diagnosis?
>>>
>>> Thanks, Donna
>>>
>>> Dr. Donna Lloyd
>>> Lecturer in Psychology
>>> School of Psychological Sciences
>>> The University of Manchester
>>> Oxford Road
>>> Manchester M13 9PL
>>> U.K.
>>> Tel: +44 (0) 161 275 2573
>>> Fax: +44 (0) 161 275 2685/2588
>>>
>>> <report_log.html>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> Progress Report / Log
>>>
>>> Started at Wed Mar 5 17:26:59 GMT 2008
>>>
>>> Feat main script
>>>
>>>
>>> /bin/cp /tmp/feat_hyX6vR.fsf design.fsf
>>>
>>> /usr/local/fsl/bin/feat_model design
>>>
>>> /usr/local/fsl/bin/fsl_sub -T 56 -l logs -N feat2_pre /usr/local/fsl/bin/feat /home/donna/MUS_pilot_v2.feat/design.fsf -D /home/donna/MUS_pilot_v2.feat -I 1 -prestats
>>> 3592
>>>
>>> /usr/local/fsl/bin/fsl_sub -T 896 -l logs -N feat3_film -j 3592 /usr/local/fsl/bin/feat /home/donna/MUS_pilot_v2.feat/design.fsf -D /home/donna/MUS_pilot_v2.feat -film
>>> 5385
>>>
>>> /usr/local/fsl/bin/fsl_sub -T 32 -l logs -N feat4_post -j 5385 /usr/local/fsl/bin/feat /home/donna/MUS_pilot_v2.feat/design.fsf -D /home/donna/MUS_pilot_v2.feat -poststats 0 0
>>> 5521
>>>
>>> /usr/local/fsl/bin/fsl_sub -T 1 -l logs -N feat5_stop -j 3592,5385,5521 /usr/local/fsl/bin/feat /home/donna/MUS_pilot_v2.feat/design.fsf -D /home/donna/MUS_pilot_v2.feat -stop
>>> ------------------------------------------------------------------------
>>> Prestats
>>>
>>> /usr/local/fsl/bin/fslmaths /home/donna/MUS_rawdata/dl__3_1 prefiltered_func_data
>>> Total original volumes = 560
>>>
>>> /usr/local/fsl/bin/fslroi prefiltered_func_data example_func 280 1
>>>
>>> /usr/local/fsl/bin/mcflirt -in prefiltered_func_data -out prefiltered_func_data_mcf -mats -plots -refvol 280 -rmsrel -rmsabs
>>>
>>> /bin/mkdir -p mc ; /bin/mv -f prefiltered_func_data_mcf.mat prefiltered_func_data_mcf.par prefiltered_func_data_mcf_abs.rms prefiltered_func_data_mcf_abs_mean.rms prefiltered_func_data_mcf_rel.rms prefiltered_func_data_mcf_rel_mean.rms mc
>>>
>>> /usr/local/fsl/bin/fsl_tsplot -i prefiltered_func_data_mcf.par -t 'MCFLIRT estimated rotations (radians)' -u 1 --start=1 --finish=3 -a x,y,z -w 640 -h 144 -o rot.png
>>>
>>> /usr/local/fsl/bin/fsl_tsplot -i prefiltered_func_data_mcf.par -t 'MCFLIRT estimated translations (mm)' -u 1 --start=4 --finish=6 -a x,y,z -w 640 -h 144 -o trans.png
>>>
>>> /usr/local/fsl/bin/fsl_tsplot -i prefiltered_func_data_mcf_abs.rms,prefiltered_func_data_mcf_rel.rms -t 'MCFLIRT estimated mean displacement (mm)' -u 1 -w 640 -h 144 -a absolute,relative -o disp.png
>>>
>>> /usr/local/fsl/bin/bet prefiltered_func_data_mcf prefiltered_func_data_bet -F
>>>
>>> /usr/local/fsl/bin/fslmaths prefiltered_func_data_bet -thrp 15 -Tmin -bin mask -odt char
>>>
>>> /usr/local/fsl/bin/fslmaths prefiltered_func_data_bet -mas mask prefiltered_func_data_bet
>>>
>>> /usr/local/fsl/bin/fslmaths mask -kernel gauss 2.12314225053 -fmean mask_weight -odt float
>>>
>>> /usr/local/fsl/bin/fslmaths prefiltered_func_data_bet -kernel gauss 2.12314225053 -fmean -div mask_weight -mas mask filtered_func_data -odt float
>>>
>>> /usr/local/fsl/bin/fslmaths filtered_func_data -ing 10000 filtered_func_data -odt float
>>>
>>> /usr/local/fsl/bin/fslmaths filtered_func_data -bptf 16.7785234899 -1 filtered_func_data -odt float
>>>
>>> /usr/local/fsl/bin/fslhd -x filtered_func_data | sed 's/ dt = .*/ dt = '2.98'/g' | /usr/local/fsl/bin/fslcreatehd - filtered_func_data
>>>
>>> /usr/local/fsl/bin/fslmaths filtered_func_data -Tmean mean_func
>>>
>>> /bin/rm -rf prefiltered_func_data*
>>> ------------------------------------------------------------------------
>>> Stats
>>>
>>> mkdir -p custom_timing_files ; /bin/cp /home/donna/VT_hits.txt custom_timing_files/ev1.txt
>>>
>>> mkdir -p custom_timing_files ; /bin/cp /home/donna/VT_misses.txt custom_timing_files/ev2.txt
>>>
>>> mkdir -p custom_timing_files ; /bin/cp /home/donna/V_FAs.txt custom_timing_files/ev3.txt
>>>
>>> mkdir -p custom_timing_files ; /bin/cp /home/donna/V_rejections.txt custom_timing_files/ev4.txt
>>>
>>> mkdir -p custom_timing_files ; /bin/cp /home/donna/T_hits.txt custom_timing_files/ev5.txt
>>>
>>> mkdir -p custom_timing_files ; /bin/cp /home/donna/T_misses.txt custom_timing_files/ev6.txt
>>>
>>> mkdir -p custom_timing_files ; /bin/cp /home/donna/catch_FAs.txt custom_timing_files/ev7.txt
>>>
>>> mkdir -p custom_timing_files ; /bin/cp /home/donna/catch_rejections.txt custom_timing_files/ev8.txt
>>>
>>> /usr/local/fsl/bin/film_gls -rn stats -sa -ms 5 -sp /usr/local/fsl/bin/susan_smooth filtered_func_data design.mat 1500.0
>>> Log directory is: stats
>>> Uncaught exception!
>>> Error: FILM did not complete - it probably ran out of memory
>>> ------------------------------------------------------------------------
>>> Post-stats
>>>
>>> /usr/local/fsl/bin/contrast_mgr stats design.con
>>> ** ERROR (nifti_image_read): failed to find header file for 'stats/sigmasquareds'
>>> ** ERROR: nifti_image_open(stats/sigmasquareds): bad header info
>>> Error: failed to open file stats/sigmasquareds
>>> Error:: FslGetDim: Null pointer passed for FSLIO
>>> Rendering using zmin=2.3 zmax=8
>>> couldn't open "tmpreport_poststats.html": no such file or directory
>>> while executing
>>> "open tmp${pagename} r "
>>> (procedure "feat5:report_insert_stop" line 4)
>>> invoked from within
>>> "feat5:report_insert_stop report_poststats.html poststatspics"
>>> (procedure "feat5:proc_poststats" line 384)
>>> invoked from within
>>> "feat5:proc_poststats $RERUNNING $STDSPACE "
>>> ("-poststats" arm line 6)
>>> invoked from within
>>> "switch -- [ lindex $argv $argindex ] {
>>>
>>> -I {
>>> incr argindex 1
>>> set session [ lindex $argv $argindex ]
>>> }
>>>
>>> -D {
>>> incr argindex 1
>>> set..."
>>> ("for" body line 2)
>>> invoked from within
>>> "for { set argindex 1 } { $argindex < $argc } { incr argindex 1 } {
>>> switch -- [ lindex $argv $argindex ] {
>>>
>>> -I {
>>> incr argindex 1
>>> set ses..."
>>> (file "/usr/local/fsl/bin/feat" line 137)
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>
>
> --
> Sebastian Moeller
>
> Tel.: 04 21 - 2 18 - 78 38 oder 96 91
> Fax.: 04 21 - 2 18 - 90 04
> GSM: 0 15 77 - 1 90 31 41
> [log in to unmask]
>
> AG Kreiter / FB 2
> Institut fuer Hirnforschung III
> Abteilung Theoretische Neurobiologie
> Universitaet Bremen
> Biogarten
> Hochschulring 16a
> Postfach 33 04 40
> 28359 Bremen
--
Sebastian Moeller
Tel.: 04 21 - 2 18 - 78 38 oder 96 91
Fax.: 04 21 - 2 18 - 90 04
GSM: 0 15 77 - 1 90 31 41
[log in to unmask]
AG Kreiter / FB 2
Institut fuer Hirnforschung III
Abteilung Theoretische Neurobiologie
Universitaet Bremen
Biogarten
Hochschulring 16a
Postfach 33 04 40
28359 Bremen
|