External Email - Use Caution Thank you for your help !
I have run the command: mri_nu_correct.mni --debug --i orig.mgz --o nu.mgz --uchar transforms/talairach.xfm --n 2 --ants-n4 >& nucor.log and got the nucor.log. -----原始邮件----- 发件人:"Douglas N. Greve" <dgr...@mgh.harvard.edu> 发送时间:2021-06-01 08:35:38 (星期二) 收件人: freesurfer@nmr.mgh.harvard.edu 抄送: 主题: Re: [Freesurfer] Recon-all error :Segmentation fault (core dumped) Not sure, can you try this cd /home/liubing/FreeSurfer/data/test_recon/ANDI1/mri mri_nu_correct.mni --debug --i orig.mgz --o nu.mgz --uchar transforms/talairach.xfm --n 2 --ants-n4 >& nucor.log and send the file nucor.log On 5/28/2021 7:51 AM, liub wrote: External Email - Use Caution Hello FreeSurfer Developers, I'm attempting to recon-all my NIfTI-1 data ,while after a few minutes of running,there was an error: mris_calc -o /dev/shm/tmp.mri_nu_correct.mni.897826/nu0.mgz /dev/shm/tmp.mri_nu_correct.mni.897826/nu0.mgz mul Segmentation fault (core dumped) Command exited with non-zero status 1 Also when I ran the command "recon-all -all -s bert" using the official data in */freesurfer/subjects/bert ,it raised the same error. I googled this error,but there's still no answer.I've attached the recon-all.log. The recon-all.log is belong to bert and recon-all(1).log is belong to my data. Here is my operating system info : uname -a: Linux HEUBME.com 4.18.0-193.28.1.el8_2.x86_64 #1 SMP Thu Oct 22 00:20:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Platform: CentOS Linux release 8.3.2011 FreeSurfer version: freesurfer-Linux-centos8_x86_64-7.1.1 Thank you for your kind help. Best regards. _______________________________________________ Freesurfer mailing list freesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
set echo = 1 ; set debug = 1 ; set debug = 1 breaksw breaksw end end while ( $#argv != 0 ) while ( 9 != 0 ) set flag = $argv[1] ; shift ; set flag = --i shift switch ( $flag ) switch ( --i ) if ( $#argv == 0 ) goto arg1err ; if ( 8 == 0 ) goto arg1err set InVol = $argv[1] ; shift ; set InVol = orig.mgz shift breaksw breaksw end end while ( $#argv != 0 ) while ( 7 != 0 ) set flag = $argv[1] ; shift ; set flag = --o shift switch ( $flag ) switch ( --o ) if ( $#argv == 0 ) goto arg1err ; if ( 6 == 0 ) goto arg1err set OutVol = $argv[1] ; shift ; set OutVol = nu.mgz shift breaksw breaksw end end while ( $#argv != 0 ) while ( 5 != 0 ) set flag = $argv[1] ; shift ; set flag = --uchar shift switch ( $flag ) switch ( --uchar ) if ( $#argv < 1 ) goto arg1err ; if ( 4 < 1 ) goto arg1err set talxfm = $argv[1] ; shift ; set talxfm = transforms/talairach.xfm shift if ( ! -e $talxfm ) then if ( ! -e transforms/talairach.xfm ) then set DoUchar = 1 ; set DoUchar = 1 breaksw breaksw end end while ( $#argv != 0 ) while ( 3 != 0 ) set flag = $argv[1] ; shift ; set flag = --n shift switch ( $flag ) switch ( --n ) if ( $#argv == 0 ) goto arg1err ; if ( 2 == 0 ) goto arg1err set nIters = $argv[1] ; shift ; set nIters = 2 shift breaksw breaksw end end while ( $#argv != 0 ) while ( 1 != 0 ) set flag = $argv[1] ; shift ; set flag = --ants-n4 shift switch ( $flag ) switch ( --ants-n4 ) set DoAntsN4 = 1 ; set DoAntsN4 = 1 breaksw breaksw end end while ( $#argv != 0 ) while ( 0 != 0 ) goto parse_args_return ; goto parse_args_return goto check_params ; goto check_params if ( $#InVol == 0 ) then if ( 1 == 0 ) then if ( ! -e $InVol ) then if ( ! -e orig.mgz ) then if ( $#OutVol == 0 ) then if ( 1 == 0 ) then if ( $DoAntsN3 && $DoAntsN4 ) then if ( 0 && 1 ) then if ( $DoAntsN3 ) then if ( 0 ) then if ( $DoAntsN4 ) then if ( 1 ) then which AntsN4BiasFieldCorrectionFs > & /dev/null which AntsN4BiasFieldCorrectionFs if ( $status ) then if ( 0 ) then endif endif set cmd = ( which bc ) set cmd = ( which bc ) $cmd which bc /usr/local/ashs_Linux64_rev103_20140612/ext/Linux/bin/bc if ( $status ) then if ( 0 ) then goto check_params_return ; goto check_params_return set OutDir = `dirname $OutVol` ; set OutDir = `dirname $OutVol` dirname nu.mgz mkdir -p $OutDir ; mkdir -p . if ( $#LF == 0 ) set LF = $OutDir/mri_nu_correct.mni.log if ( 0 == 0 ) set LF = ./mri_nu_correct.mni.log set LF = ./mri_nu_correct.mni.log if ( -e $LF ) mv $LF $LF.bak if ( -e ./mri_nu_correct.mni.log ) mv ./mri_nu_correct.mni.log ./mri_nu_correct.mni.log.bak mv ./mri_nu_correct.mni.log ./mri_nu_correct.mni.log.bak pwd | tee -a $LF pwd tee -a ./mri_nu_correct.mni.log /home/liubing/FreeSurfer/data/test_recon/ANDI1/mri which mri_nu_correct.mni | tee -a $LF which mri_nu_correct.mni tee -a ./mri_nu_correct.mni.log /home/liubing/FreeSurfer/freesurfer/bin/mri_nu_correct.mni echo $cmdargs | tee -a $LF echo --debug --i orig.mgz --o nu.mgz --uchar transforms/talairach.xfm --n 2 --ants-n4 tee -a ./mri_nu_correct.mni.log --debug --i orig.mgz --o nu.mgz --uchar transforms/talairach.xfm --n 2 --ants-n4 echo "nIters $nIters" | tee -a $LF echo nIters 2 tee -a ./mri_nu_correct.mni.log nIters 2 echo $VERSION | tee -a $LF echo mri_nu_correct.mni 7.1.1 tee -a ./mri_nu_correct.mni.log mri_nu_correct.mni 7.1.1 uname -a | tee -a $LF uname -a tee -a ./mri_nu_correct.mni.log Linux HEUBME.com 4.18.0-193.28.1.el8_2.x86_64 #1 SMP Thu Oct 22 00:20:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux date | tee -a $LF date tee -a ./mri_nu_correct.mni.log 2021å¹´ 06æ 01æ¥ ææäº 21:45:07 CST set templocation = $OutDir set templocation = . if ( -d /dev/shm ) then if ( -d /dev/shm ) then set shmsize = `df -m /dev/shm | tail -1| awk '{print $2}'` set shmsize = `df -m /dev/shm | tail -1| awk '{print $2}'` df -m /dev/shm awk {print $2} tail -1 if ( "$shmsize" > = 4000 ) then if ( 64177 > = 4000 ) then echo "Found /dev/shm , will use for temp dir" | tee -a $LF echo Found /dev/shm , will use for temp dir tee -a ./mri_nu_correct.mni.log Found /dev/shm , will use for temp dir set templocation = "/dev/shm" set templocation = /dev/shm endif endif endif endif if ( ! $#tmpdir ) set tmpdir = $templocation/tmp.mri_nu_correct.mni.$$ if ( ! 0 ) set tmpdir = /dev/shm/tmp.mri_nu_correct.mni.2576084 set tmpdir = /dev/shm/tmp.mri_nu_correct.mni.2576084 mkdir -p $tmpdir mkdir -p /dev/shm/tmp.mri_nu_correct.mni.2576084 echo "tmpdir is $tmpdir" | tee -a $LF echo tmpdir is /dev/shm/tmp.mri_nu_correct.mni.2576084 tee -a ./mri_nu_correct.mni.log tmpdir is /dev/shm/tmp.mri_nu_correct.mni.2576084 set MaskVol0 = $MaskVol set MaskVol0 = if ( $#MaskVol ) then if ( 0 ) then if ( $DoAntsN3 || $DoAntsN4 ) then if ( 0 || 1 ) then set numnc = $tmpdir/nu0.mgz set numnc = /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz if ( $DoAntsN3 ) then if ( 0 ) then if ( $DoAntsN4 ) then if ( 1 ) then set cmd = ( AntsN4BiasFieldCorrectionFs -i $InVol -o $numnc ) set cmd = ( AntsN4BiasFieldCorrectionFs -i orig.mgz -o /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz ) if ( $#MaskVol ) set cmd = ( $cmd -x $MaskVol ) if ( 0 ) set cmd = ( AntsN4BiasFieldCorrectionFs -i orig.mgz -o /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz -x ) endif endif echo "cd `pwd`" | tee -a $LF echo cd `pwd` tee -a ./mri_nu_correct.mni.log pwd cd /home/liubing/FreeSurfer/data/test_recon/ANDI1/mri echo $cmd | tee -a $LF echo AntsN4BiasFieldCorrectionFs -i orig.mgz -o /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz tee -a ./mri_nu_correct.mni.log AntsN4BiasFieldCorrectionFs -i orig.mgz -o /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz $cmd | & tee -a $LF AntsN4BiasFieldCorrectionFs -i orig.mgz -o /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz tee -a ./mri_nu_correct.mni.log Using shrink factor: 4 if ( $status ) exit 1 ; if ( 0 ) exit 1 else else if ( $DoRescale ) then if ( 1 ) then set ones = $tmpdir/ones.mgz set ones = /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz set cmd = ( mri_binarize --i $numnc --min -1 --o $ones ) ; set cmd = ( mri_binarize --i /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz --min -1 --o /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz ) echo $cmd | tee -a $LF echo mri_binarize --i /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz --min -1 --o /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz tee -a ./mri_nu_correct.mni.log mri_binarize --i /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz --min -1 --o /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz $cmd | tee -a $LF mri_binarize --i /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz --min -1 --o /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz tee -a ./mri_nu_correct.mni.log 7.1.1 cwd /home/liubing/FreeSurfer/data/test_recon/ANDI1/mri cmdline mri_binarize --i /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz --min -1 --o /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz sysname Linux hostname HEUBME.com machine x86_64 user liubing input /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz frame 0 nErode3d 0 nErode2d 0 output /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz Binarizing based on threshold min -1 max +infinity binval 1 binvalnot 0 fstart = 0, fend = 0, nframes = 1 Found 16777216 values in range Counting number of voxels in first frame Found 16777215 voxels in final mask Count: 16777215 16777215.000000 16777216 99.999994 mri_binarize done if ( $status ) exit 1 ; if ( 0 ) exit 1 set cmd = ( mri_segstats --id 1 --seg $ones --i $InVol --sum $tmpdir/sum.junk --avgwf $tmpdir/input.mean.dat ) set cmd = ( mri_segstats --id 1 --seg /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz --i orig.mgz --sum /dev/shm/tmp.mri_nu_correct.mni.2576084/sum.junk --avgwf /dev/shm/tmp.mri_nu_correct.mni.2576084/input.mean.dat ) echo $cmd | tee -a $LF echo mri_segstats --id 1 --seg /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz --i orig.mgz --sum /dev/shm/tmp.mri_nu_correct.mni.2576084/sum.junk --avgwf /dev/shm/tmp.mri_nu_correct.mni.2576084/input.mean.dat tee -a ./mri_nu_correct.mni.log mri_segstats --id 1 --seg /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz --i orig.mgz --sum /dev/shm/tmp.mri_nu_correct.mni.2576084/sum.junk --avgwf /dev/shm/tmp.mri_nu_correct.mni.2576084/input.mean.dat $cmd | tee -a $LF mri_segstats --id 1 --seg /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz --i orig.mgz --sum /dev/shm/tmp.mri_nu_correct.mni.2576084/sum.junk --avgwf /dev/shm/tmp.mri_nu_correct.mni.2576084/input.mean.dat tee -a ./mri_nu_correct.mni.log 7.1.1 cwd cmdline mri_segstats --id 1 --seg /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz --i orig.mgz --sum /dev/shm/tmp.mri_nu_correct.mni.2576084/sum.junk --avgwf /dev/shm/tmp.mri_nu_correct.mni.2576084/input.mean.dat sysname Linux hostname HEUBME.com machine x86_64 user liubing whitesurfname white UseRobust 0 Loading /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz Loading orig.mgz Voxel Volume is 1 mm^3 Generating list of segmentation ids Found 1 segmentations Computing statistics for each segmentation Reporting on 1 segmentations Using PrintSegStat Computing spatial average of each frame 0 Writing to /dev/shm/tmp.mri_nu_correct.mni.2576084/input.mean.dat mri_segstats done if ( $status ) exit 1 ; if ( 0 ) exit 1 set inmean = `cat $tmpdir/input.mean.dat` set inmean = `cat $tmpdir/input.mean.dat` cat /dev/shm/tmp.mri_nu_correct.mni.2576084/input.mean.dat set cmd = ( mri_segstats --id 1 --seg $ones --i $numnc --sum $tmpdir/sum.junk --avgwf $tmpdir/output.mean.dat ) set cmd = ( mri_segstats --id 1 --seg /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz --i /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz --sum /dev/shm/tmp.mri_nu_correct.mni.2576084/sum.junk --avgwf /dev/shm/tmp.mri_nu_correct.mni.2576084/output.mean.dat ) echo $cmd | tee -a $LF echo mri_segstats --id 1 --seg /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz --i /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz --sum /dev/shm/tmp.mri_nu_correct.mni.2576084/sum.junk --avgwf /dev/shm/tmp.mri_nu_correct.mni.2576084/output.mean.dat tee -a ./mri_nu_correct.mni.log mri_segstats --id 1 --seg /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz --i /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz --sum /dev/shm/tmp.mri_nu_correct.mni.2576084/sum.junk --avgwf /dev/shm/tmp.mri_nu_correct.mni.2576084/output.mean.dat $cmd | tee -a $LF mri_segstats --id 1 --seg /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz --i /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz --sum /dev/shm/tmp.mri_nu_correct.mni.2576084/sum.junk --avgwf /dev/shm/tmp.mri_nu_correct.mni.2576084/output.mean.dat tee -a ./mri_nu_correct.mni.log 7.1.1 cwd cmdline mri_segstats --id 1 --seg /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz --i /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz --sum /dev/shm/tmp.mri_nu_correct.mni.2576084/sum.junk --avgwf /dev/shm/tmp.mri_nu_correct.mni.2576084/output.mean.dat sysname Linux hostname HEUBME.com machine x86_64 user liubing whitesurfname white UseRobust 0 Loading /dev/shm/tmp.mri_nu_correct.mni.2576084/ones.mgz Loading /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz Voxel Volume is 1 mm^3 Generating list of segmentation ids Found 1 segmentations Computing statistics for each segmentation Reporting on 1 segmentations Using PrintSegStat Computing spatial average of each frame 0 Writing to /dev/shm/tmp.mri_nu_correct.mni.2576084/output.mean.dat mri_segstats done if ( $status ) exit 1 ; if ( 0 ) exit 1 set outmean = `cat $tmpdir/output.mean.dat` set outmean = `cat $tmpdir/output.mean.dat` cat /dev/shm/tmp.mri_nu_correct.mni.2576084/output.mean.dat set scale = `echo $inmean/$outmean | bc -l` set scale = `echo $inmean/$outmean | bc -l` bc -l echo 22.21392/14.24947 Missing parameters. Usage: bc inputImageFile inputSegmentationFile side PathToTrainingFiles outputSegmentationFile side = 0 (left side) or else (right side) set cmd = ( mris_calc -o $numnc $numnc mul $scale ) set cmd = ( mris_calc -o /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz mul ) echo $cmd | tee -a $LF echo mris_calc -o /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz mul tee -a ./mri_nu_correct.mni.log mris_calc -o /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz mul $cmd | tee -a $LF mris_calc -o /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz /dev/shm/tmp.mri_nu_correct.mni.2576084/nu0.mgz mul tee -a ./mri_nu_correct.mni.log Segmentation fault (core dumped) if ( $status ) exit 1 ; if ( 139 ) exit 1 exit 1
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer