Hi,
I am running FreeSurfer on ADNI data and get an error when mri_ca_register attempts to write to transforms/talairach.m3z using gzip.
I run the full FreeSurfer pipeline using a bash script containing the following:
#!/bin/bash export FREESURFER_HOME=/usr/local/freesurfer source $FREESURFER_HOME/SetUpFreeSurfer.sh export SUBJECTS_DIR=/home/lauges/storage
/usr/local/freesurfer/bin/recon-all -i /image/data2/ADNI/009_S_0751/MP_RAGE/2006-07-25_12_31_19.0/S17487/ ADNI_009_S_0751_MR_MP_RAGE__br_raw_20060801143246276_1_S17487_I20013.dcm -s 009_S_0751 -all
The error appears to happen when mri_ca_register writes using gzip through a pipe and the popen error code is 38.
This is not a memory nor a space issue since there is plenty of both available. As far as I now, error code 38 may be related to too many pipes being open at once, but I am not sure of this.
Excerpt from 009_S_0751/scripts/recon-all.log:
... GCAMwrite(transforms/talairach.m3z): gzip encountered error. writing output transformation to transforms/talairach.m3z... GCAMwrite GCAMwrite:: m3z loop GCAMwrite:: the command is: gzip -f -c > transforms/talairach.m3z GCAMwrite:: the popen error code is: 38 mri_ca_register: GCAMwrite(transforms/talairach.m3z) failed ERROR: mri_ca_register with non-zero status 252 but continuing despite the error #-------------------------------------- #@# CA Reg Inv Thu Sep 15 23:43:42 CEST 2011 /storage/lauges/009_S_0751/mri
mri_ca_register -invert-and-save transforms/talairach.m3z
GCAMread: encountered error executing: 'zcat transforms/talairach.m3z' Loading, Inverting, Saving, Exiting ... Reading transforms/talairach.m3z zcat transforms/talairach.m3z ERROR: mri_ca_register with non-zero status 0 Linux imageserver1 2.6.20-gentoo-r8 #2 SMP Fri May 25 10:23:59 CEST 2007 x86_64 Intel(R) Xeon(R) CPU X5355 @ 2.66GHz GenuineIntel GNU/Linux
Best,
Lauge
Hi Lauge How much ram do yo have? Gzip need a lot Bruce
On Sep 17, 2011, at 3:30 PM, Lauge Emil Borch Laurs S0rensen lauges@diku.dk wrote:
Lauge
Hi Lauge,
is gzip installed/working?
this is the code around that block (so you are right, it happens when popen tries to call gzip). I could not find out what error 38 means.
Best, Martin
char command[STRLEN]; // write gzipped file myclose=pclose; strcpy(command, "gzip -f -c > " ); if (strlen(command) + strlen(fname) >= STRLEN-1) ErrorReturn (ERROR_BADPARM, (ERROR_BADPARM, "%s:GCAMwrite(%s): gzip command line too long (%d)", \ Progname,fname, STRLEN)); strcat(command, fname); errno=0; printf("GCAMwrite:: the command is: %s\n",command); fp = popen(command, "w"); if (errno) { printf("GCAMwrite:: the popen error code is: %d\n",errno); if (fp) pclose(fp); errno = 0; ErrorReturn (ERROR_BADPARM, (ERROR_BADPARM, "GCAMwrite(%s): gzip encountered error.", fname)) ; }
On Sat, 2011-09-17 at 21:30 +0200, Lauge Emil Borch Laurs S0rensen wrote:
Hi,
I am running FreeSurfer on ADNI data and get an error when mri_ca_register attempts to write to transforms/talairach.m3z using gzip.
I run the full FreeSurfer pipeline using a bash script containing the following:
#!/bin/bash export FREESURFER_HOME=/usr/local/freesurfer source $FREESURFER_HOME/SetUpFreeSurfer.sh export SUBJECTS_DIR=/home/lauges/storage
/usr/local/freesurfer/bin/recon-all -i /image/data2/ADNI/009_S_0751/MP_RAGE/2006-07-25_12_31_19.0/S17487/ ADNI_009_S_0751_MR_MP_RAGE__br_raw_20060801143246276_1_S17487_I20013.dcm -s 009_S_0751 -all
The error appears to happen when mri_ca_register writes using gzip through a pipe and the popen error code is 38.
This is not a memory nor a space issue since there is plenty of both available. As far as I now, error code 38 may be related to too many pipes being open at once, but I am not sure of this.
Excerpt from 009_S_0751/scripts/recon-all.log:
... GCAMwrite(transforms/talairach.m3z): gzip encountered error. writing output transformation to transforms/talairach.m3z... GCAMwrite GCAMwrite:: m3z loop GCAMwrite:: the command is: gzip -f -c > transforms/talairach.m3z GCAMwrite:: the popen error code is: 38 mri_ca_register: GCAMwrite(transforms/talairach.m3z) failed ERROR: mri_ca_register with non-zero status 252 but continuing despite the error #-------------------------------------- #@# CA Reg Inv Thu Sep 15 23:43:42 CEST 2011 /storage/lauges/009_S_0751/mri
mri_ca_register -invert-and-save transforms/talairach.m3z
GCAMread: encountered error executing: 'zcat transforms/talairach.m3z' Loading, Inverting, Saving, Exiting ... Reading transforms/talairach.m3z zcat transforms/talairach.m3z ERROR: mri_ca_register with non-zero status 0 Linux imageserver1 2.6.20-gentoo-r8 #2 SMP Fri May 25 10:23:59 CEST 2007 x86_64 Intel(R) Xeon(R) CPU X5355 @ 2.66GHz GenuineIntel GNU/Linux
Best,
Lauge _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu