Skip to content

Excessive memory usage despite mem_mb #1259

@fphsFischmeister

Description

@fphsFischmeister

Dear all,

we are currently switching to fmriprep and want to run all analyses in singularity on our local HPC. Everything works fine using smaller datasets - we had a test set of 200 volumes.
We now want to analyse a 60 subject dataset consisting of a T1w image, a fieldmap and 4 functional runs with 850 volumes each (high res. EPI with MB=4). Since we expected some memory issues we set mem_mb 50000 and nthreads 8 according to some recommendations here. Otherwise we do normal preprocessing without slicetime correction but with ica_aroma and without freesurfer recon-all.

However, we experience excessive memory usage and our jobs were permanently killed by the scheduler. We now increase the vmem assigned to that job to get things running. Doing so, we noticed that

  • on our big mem nodes having 512GB available setting vmax to 240GB results in a maximal memory usage of about 210GB.
  • on other nodes with only 170 GB available setting vmax to 170GB results in about 120GB maximum.
    All this is currently possible on certain nodes but it certainly limits the number of parallel jobs and is not an option of the future.

Thus, is there any possibility to restrict the memory resources fmriprep is using, obviously it sees everything and neglects the mem_mb setting. I further noticed from the log, that this seems to occur always then transforming bold images:

 [MultiProc] Running 1 tasks, and 12 jobs ready. Free memory (GB): 0.00/48.83, Free processors: 1/8.
                     Currently running:
                      * fmriprep_wf.single_subject_71_wf.func_preproc_ses_2_task_Task2Part2_run_02_wf.bold_reg_wf.bold_to_t1w_transform
--
 [MultiProc] Running 1 tasks, and 7 jobs ready. Free memory (GB): 0.00/48.83, Free processors: 1/8.
                     Currently running:
                      * fmriprep_wf.single_subject_71_wf.func_preproc_ses_2_task_Task2Part2_run_02_wf.ica_aroma_wf.bold_mni_trans_wf.bold_to_mni_transform
--
[MultiProc] Running 1 tasks, and 3 jobs ready. Free memory (GB): 0.00/48.83, Free processors: 1/8.
                     Currently running:
                     * fmriprep_wf.single_subject_71_wf.func_preproc_ses_2_task_Task2Part2_run_02_wf.bold_mni_trans_wf.bold_to_mni_transform

I would appreciate your feedback and help to improve the memory usage,

thanks,

Florian

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions