Martijn,
The problem you are encountering with the number of subjects allowed by make_average_subject does not appear to be a memory leak as originally thought, but rather simply a 'too many open files' limit. On the Mac, the limit to the number of open files is 256 (on Linux its 1024).
The solution is simple, type this in your environment, or include it near the top of your make_average_subjects script:
limit descriptors 2048
This ups the limit to 2048 files (supporting # of subjects-3).
Type 'limit' to confirm that the setting has changed. Then run make_average_subject in that window.
This fix will appear in the next release.
Nick
On Wed, 2007-02-21 at 11:11 -0500, Bruce Fischl wrote:
Hi Martijn,
it looks like we have a memory leak. We'll look into it and get back to you. I'm surprised you don't get past 253 with 16G of ram though. I've run it on 300 or so.
Bruce On Wed, 21 Feb 2007, martijn van den heuvel wrote:
Dear Freesurfer-list,
I'm trying to construct an average group surface map using 'make_average_subject'. My group consists of a rather large number of subjects, around 400 subjects.
Unfortunately, running 'make_average_subject' gives an error when processing subject 253, saying it has an 'mgh reading error' on the 'T1.mgz'.
I checked that the involved files are all oke. In addition, I have run 'make_average_subject' several times with different group lists, but every time it stops at subject 253.
I'm using an Intel MacPro with 16 GB of system memory, and there is plenty of free memory when it runs.
Is there a maximum set on the number of subjects you can use in 'make_average_subject'? Can I reset this value?
Yours sincerely,
Martijn van den Heuvel
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer