Doug-
The new make_average_surface script completes without error, but I have
only run it as a stand-alone so far. I'll try to see how it interfaces
with the whole make_average_subject routine and re-post. It may be that
we'll need to run the average reconstruction piecemeal (i.e.
make_average_surface, make_average_subject, mris_inflate separately)
rather than running make_average_subject as a standalone process.
Juergen-
I, too, was interested in making small batches of average subjects then
making a grand average of those results. However, I think it is
inadvisable. I ran the following test: an average of three subjects, an
average of another three subjects, an average of those two averages,
and an average of all six subjects at once. The one-shot average and
two-part average yielded different final statistical outputs re:
average thickness, surface area, and volume. My bet is that it has to
do with the non-linear warping that takes place during spherical
registration, which would highlight differences between the small
batches. If we think of our subjects as a finite population, the
chunking process effectively induces sampling error from batch to
batch, which bleeds into our final estimate of the full population.
Those who know more about the process, please correct me if I'm wrong.
Thanks,
---------
Jim Porter
Graduate Student
Clinical Science & Psychopathology Research
University of Minnesota
Doug Greve wrote:
The problem is that it is calling mris_preproc with --srcsurfreg, and
you do not have the version of mris_preproc that accepts this flag. You
can edit it to make it --surfreg. Or, you can get a new copy of
make_average_surface from:
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/make_average_surface
doug
Juergen Haenggi wrote:
Re: [Freesurfer] Problem make_average_subject
Hi
Doug
Thanks a lot for the new version of the make_average_subject scripts. I
tried it but the following error occurred:
Reading surface
/Applications/freesurfer/subjects/average/surf/rh.white
Loading annotations from
/Applications/freesurfer/subjects/average/label/rh.aparc.a2005s.annot
max index = 81
3 387
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.G_cingulate-Isthmus.label
LabelWrite: saving to
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.G_cingulate-Isthmus.label
4 2350
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.G_cingulate-Main_part.label
LabelWrite: saving to
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.G_cingulate-Main_part.label
5 1412
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.G_cuneus.label
LabelWrite: saving to
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.G_cuneus.label
6 1479
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.G_frontal_inf-Opercular_part.label
LabelWrite: saving to
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.G_frontal_inf-Opercular_part.label
.
.
.
.
.
LabelWrite: saving to
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.S_suborbital.label
77 1999
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.S_subparietal.label
LabelWrite: saving to
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.S_subparietal.label
79 1276
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.S_temporal_inferior.label
LabelWrite: saving to
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.S_temporal_inferior.label
80 7673
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.S_temporal_superior.label
LabelWrite: saving to
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.S_temporal_superior.label
81 365
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.S_temporal_transverse.label
LabelWrite: saving to
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236/rh.S_temporal_transverse.label
mri_mergelabels -o
/Applications/freesurfer/subjects/average/label/rh.cortex.label -d
/Applications/freesurfer/subjects/average/make_cortex_label.tmp.69236
Done
/Applications/freesurfer/subjects/average/surf
mris_preproc --out rh.orig.avg.area.mgh --f /tmp/subjlist.69236
--target average --hemi rh --area orig --mean --srcsurfreg sphere.reg
ERROR: flag --srcsurfreg not recognized
[Macintosh-3:/Applications/freesurfer/subjects] juergenhaenggi%
It seems that there is a index maximum of 81 and therefore the flag
--srcsurfreg is not recognized.
Thanks
Regards
Juergen
On 6.2.2008 23:05 Uhr, "Doug Greve" <[EMAIL PROTECTED]>
wrote:
I think the failure happens when it tries to create the group aseg.mgz.
I changed the code on 1/3/08 so that it would just print a warning and
continue, but I don't think this version is being distributed yet.
I've put new versions of
make_average_subject make_average_surface make_average_volume
here: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve
Copy them into $FREESURFER_HOME/bin (make backups:), and give it a try.
doug
James N. Porter wrote:
So, I believe I have isolated the problem.
The failure happens during the mri_concat phase of
make_average_volumes. The seg-subj#.mgh temp files that are being
concatenated are 65 MB each and I can successfully run 59 subjects, but
for 60 subjects and up, mri_concat exits immediately with the error
message as written below. I have 4GB of memory, and 65*59 is less than
4 GB so that works; add any more subjects and the process is shut down.
It appears that mri_concat checks to see how much memory will be needed
to hold all those .mgh files in active use, then checks the machine to
see how much physical memory is available. I can easily set up a larger
swap file to handle the full 175*65 that is needed (it will be insanely
slow, but that's better than nothing). However, I can't get FreeSurfer
to utilize the swap space I already have available.
I watched the whole make_average_volumes process play out on my
resource monitor (I imagine that's what watching NASCAR is like--Come
on, just crash already!) and while it came very close to using all
4GB--leaving a paltry 19 MB free at most points--it didn't touch the
swap at any point during the run. This is not the case with Matlab and
other programs, which will greedily eat up physical memory then seek
out the swap. While I appreciate that the FreeSurfer programs are set
up to be judicious consumers of resources, is there some sort of
environmental variable in FreeSurfer or line of code in mri_concat that
I can modify that would allow the programs to reach out and use the
swap space?
Thanks,
Jim
---------
Jim Porter
Graduate Student
Clinical Science & Psychopathology Research
University of Minnesota
James N. Porter wrote:
Juergen--Have you had successful resolution
to this problem?
Nick--I'm attempting to average 175 subjects, but make_average_volume
returns the same error as Juergen reports.
> Allocing output
> MRIalloc(256,256,256): could not allocate 262144 bytes for
15547th slice
I'm running freesurfer-Linux-rh9-stable-pub-v4.0.1 on SUSE Linux 9.3
2.6.11.4-21.17-smp x86_64, with a pair of Pentium 3.20 GHz processors,
4 GB of physical memory and 8 GB of swap memory. My limits are also
quite liberal.
> cputime unlimited
> filesize unlimited
> datasize unlimited
> stacksize unlimited
> coredumpsize 0 kbytes
> memoryuse unlimited
> vmemoryuse unlimited
> descriptors 1024
> memorylocked 32 kbytes
> maxproc 28660
I've tried to also use the alternative script posted by Doug Greve (http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg06641.html).
That also returns the same error.
Any suggestions?
Many thanks,
---------
Jim Porter
Graduate Student
Clinical Science & Psychopathology Research
University of Minnesota
Nick Schmansky wrote:
Juergen,
Edit the 'make_average_subject' script removing (or commenting-out) the
line 'limit descriptors unlimited'. You may have to do the same for
'make_average_surface' and 'make_average_volume'. Although in v4.0,
these should already be commented-out.
Nick
On Mon, 2008-01-28 at 16:29 +0100, Juergen Haenggi wrote:
Dear FS experts
I tried to run make_average_subject in the past with 92 subjects and
got the
following error: Cannot allocate memory. This is now on the to-do list
of
the FS website. Then I bought some additional RAM and changed from OS X
tiger to leopard. Now I tried it again and get this error:
[Macintosh-3:/Applications/freesurfer/subjects] juergenhaenggi% limit
descriptors 4096
[Macintosh-3:/Applications/freesurfer/subjects] juergenhaenggi% limit
cputime unlimited
filesize unlimited
datasize 6144 kbytes
stacksize 8192 kbytes
coredumpsize 0 kbytes
memoryuse unlimited
descriptors 4096
memorylocked unlimited
maxproc 266
[Macintosh-3:/Applications/freesurfer/subjects] juergenhaenggi%
make_average_subject --subjects SNPs_Vp*
limit: descriptors: Can't remove limit (Invalid argument)
[Macintosh-3:/Applications/freesurfer/subjects] juergenhaenggi%
I set the descriptor limit to 4096, but the make_average_subject command
will not start anymore.
Any idea what is wrong here?
Thanks in advance
Best regards
Juergen
-----------------------------------------------------------
Juergen Haenggi
Ph.D. (Dr. des.)
Division of Neuropsychology
Institute of Psychology
University of Zurich
Binzmuehlestrasse 14, PO Box 25
8050 Zurich, Switzerland
0041 44 635 73 97 (phone office)
0041 76 445 86 84 (phone mobile)
0041 44 635 74 09 (fax office)
BIN 4.D.04 (office room number)
[EMAIL PROTECTED]
(email)
http://www.psychologie.uzh.ch/neuropsy/
(website)
http://www.juergenhaenggi.ch
(private website)
-----------------------------------------------------------
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-----------------------------------------------------------
Juergen Haenggi
Ph.D. (Dr. des.)
Division of Neuropsychology
Institute of Psychology
University of Zurich
Binzmuehlestrasse 14, PO Box 25
8050 Zurich, Switzerland
0041 44 635 73 97 (phone office)
0041 76 445 86 84 (phone mobile)
0041 44 635 74 09 (fax office)
BIN 4.D.04 (office room number)
[EMAIL PROTECTED]
(email)
http://www.psychologie.uzh.ch/neuropsy/
(website)
http://www.juergenhaenggi.ch
(private website)
-----------------------------------------------------------
--
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358
Fax: 617-726-7422
In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
|