nipreps / smriprep

Structural MRI PREProcessing (sMRIPrep) workflows for NIPreps (NeuroImaging PREProcessing tools)
https://nipreps.github.io/smriprep
Apache License 2.0
132 stars 39 forks source link

segmentation fault in mri_convert #123

Closed eds-slim closed 11 months ago

eds-slim commented 4 years ago

Hi, when using fmriprep version v1.5.0rc1 in singularity version 3.4.2-rc-1 I receive an error in recon-all

-bash-4.2$ cat bids/derivatives/freesurfer/sub-01387/scripts/recon-all.log
cat: bids/derivatives/freesurfer/sub-01387/scripts/recon-all.log: No such file or directory
-bash-4.2$ cat $WORK/bids/derivatives/freesurfer/sub-01387/scripts/recon-all.log
Mon Oct 14 12:20:04 CEST 2019
/work/bids/derivatives/freesurfer/sub-01387
/opt/freesurfer/bin/recon-all
-autorecon1 -FLAIR /work/bids/sub-01387/anat/sub-01387_acq-DC_run-01_FLAIR.nii.gz -i /tmp/fmriprep_wf/single_subject_01387_wf/anat_preproc_wf/anat_template_wf/t1_merge/sub-01387_acq-DC_run-01_T1w_template.nii.gz -noskullstrip -cw256 -hires -openmp 7 -subjid sub-01387 -sd /work/bids/derivatives/freesurfer -expert /tmp/fmriprep_wf/single_subject_01387_wf/anat_preproc_wf/surface_recon_wf/autorecon1/expert.opts
subjid sub-01387
setenv SUBJECTS_DIR /work/bids/derivatives/freesurfer
FREESURFER_HOME /opt/freesurfer
Actual FREESURFER_HOME /opt/freesurfer
build-stamp.txt: freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1-f53a55a
Linux node001 4.14.139-1.0.18.el7.rrz.x86_64 poldracklab/fmriprep#1 SMP Tue Aug 20 18:14:20 CEST 2019 x86_64 x86_64 x86_64 GNU/Linux
cputime      unlimited
filesize     unlimited
datasize     unlimited
stacksize    unlimited
coredumpsize 0 kbytes
memoryuse    unlimited
vmemoryuse   unlimited
descriptors  4096 
memorylocked 6000000 kbytes
maxproc      4096 
maxlocks     unlimited
maxsignal    257196 
maxmessage   819200 
maxnice      0 
maxrtprio    0 
maxrttime    unlimited

              total        used        free      shared  buff/cache   available
Mem:       65861860     3345964     3419268      146336    59096628    58347228
Swap:       1999868     1243124      756744

########################################
program versions used
$Id: recon-all,v 1.580.2.16 2017/01/18 14:11:24 zkaufman Exp $
$Id: mri_motion_correct.fsl,v 1.15 2016/02/16 17:17:20 zkaufman Exp $
mri_convert.bin -all-info 
ProgramName: mri_convert.bin  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:06-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
FLIRT version 5.5
$Id: talairach_avi,v 1.13 2015/12/23 04:25:17 greve Exp $
mri_convert.bin --version 
stable6
ProgramName: tkregister2_cmdl  ProgramArguments: --all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:07-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: tkregister2.c,v 1.132.2.1 2016/08/02 21:17:29 greve Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
Program nu_correct, built from:
Package MNI N3, version 1.12.0, compiled by nicks@terrier (x86_64-unknown-linux-gnu) on 2015-06-19 at 01:25:34
ProgramName: mri_make_uchar  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:09-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_make_uchar.c,v 1.4 2011/03/02 00:04:14 nicks Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_normalize  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:10-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_normalize.c,v 1.88.2.3 2016/12/27 16:47:13 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_watershed  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:11-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_watershed.cpp,v 1.103 2016/06/17 18:00:49 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_gcut  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:12-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_gcut.cpp,v 1.14 2011/03/02 00:04:16 nicks Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_segment  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:12-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_segment.c,v 1.43.2.1 2016/10/27 22:24:52 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_label2label.bin  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:13-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_label2label.c,v 1.48.2.2 2016/12/12 14:15:26 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_em_register  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:14-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_em_register.c,v 1.105.2.1 2016/10/27 22:25:10 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_ca_normalize  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:14-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_ca_normalize.c,v 1.67.2.2 2016/10/27 22:25:09 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_ca_register  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:15-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_ca_register.c,v 1.96.2.3 2016/10/27 22:25:10 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_ca_label  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:16-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_ca_label.c,v 1.113.2.2 2016/10/27 22:25:10 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_pretess  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:16-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_pretess.c,v 1.22 2013/08/30 18:12:25 mreuter Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_fill  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:17-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_fill.c,v 1.119 2011/10/25 14:09:58 fischl Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_tessellate  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:17-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_tessellate.c,v 1.38.2.1 2016/07/26 18:46:38 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_concatenate_lta.bin  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:17-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_concatenate_lta.c,v 1.16 2015/11/21 00:06:20 greve Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_normalize_tp2  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:18-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_normalize_tp2.c,v 1.8 2011/03/02 00:04:23 nicks Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_smooth  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:18-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_smooth.c,v 1.30 2014/01/21 18:48:21 fischl Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_inflate  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:19-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_inflate.c,v 1.45 2016/01/20 23:42:15 greve Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_curvature  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:19-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_curvature.c,v 1.31 2011/03/02 00:04:30 nicks Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_sphere  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:19-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_sphere.c,v 1.61 2016/01/20 23:42:15 greve Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_fix_topology  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:20-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_fix_topology.c,v 1.50.2.1 2016/10/27 22:25:58 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_topo_fixer  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:20-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_topo_fixer.cpp,v 1.29 2011/03/02 00:04:34 nicks Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_ca_label  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:21-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_ca_label.c,v 1.37 2014/02/04 17:46:42 fischl Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_euler_number  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:21-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_euler_number.c,v 1.10 2013/01/14 22:39:14 greve Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_make_surfaces  ProgramArguments: -all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:22-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_make_surfaces.c,v 1.164.2.4 2016/12/13 22:26:32 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_register  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:22-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_register.c,v 1.63 2016/01/20 23:43:04 greve Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_volmask  ProgramArguments: --all-info  ProgramVersion: $Name:  $  TimeStamp: 2019/10/14-10:20:22-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_volmask.cpp,v 1.26.2.2 2016/11/18 20:05:18 zkaufman Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_anatomical_stats  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:23-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_anatomical_stats.c,v 1.79 2016/03/14 15:15:34 greve Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mrisp_paint  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:23-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mrisp_paint.c,v 1.12 2016/03/22 14:47:57 fischl Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_curvature_stats  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:23-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_curvature_stats.c,v 1.65 2015/06/04 20:50:51 nicks Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mris_calc  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:24-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mris_calc.c,v 1.54.2.1 2016/09/27 18:51:28 greve Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
$Id: mri_robust_register.cpp,v 1.77 2016/01/20 23:36:17 greve Exp $

ProgramName: mri_robust_register.bin  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:24-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_robust_register.cpp,v 1.77 2016/01/20 23:36:17 greve Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
$Id: mri_robust_template.cpp,v 1.54 2016/05/05 21:17:08 mreuter Exp $

ProgramName: mri_robust_template  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:24-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_robust_template.cpp,v 1.54 2016/05/05 21:17:08 mreuter Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_and  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:25-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_and.c,v 1.4 2011/03/02 00:04:13 nicks Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_or  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:25-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_or.c,v 1.5 2013/03/20 15:03:29 lzollei Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_fuse_segmentations  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:25-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_fuse_segmentations.c,v 1.8 2011/03/02 00:04:15 nicks Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_segstats  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:26-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_segstats.c,v 1.121 2016/05/31 17:27:11 greve Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_relabel_hypointensities  ProgramArguments: -all-info  ProgramVersion: $Name: stable6 $  TimeStamp: 2019/10/14-10:20:26-GMT  BuildTimeStamp: Oct 20 2017 13:59:15  CVS: $Id: mri_relabel_hypointensities.c,v 1.13 2015/05/15 18:44:10 nicks Exp $  User: fawx493  Machine: node001  Platform: Linux  PlatformVersion: 4.14.139-1.0.18.el7.rrz.x86_64  CompilerName: GCC  CompilerVersion: 40400 
#######################################
GCADIR /opt/freesurfer/average
GCA RB_all_2016-05-10.vc700.gca
GCASkull RB_all_withskull_2016-05-10.vc700.gca
AvgCurvTif folding.atlas.acfb40.noaparc.i12.2016-08-02.tif
GCSDIR /opt/freesurfer/average
GCS DKaparc.atlas.acfb40.noaparc.i12.2016-08-02.gcs
#######################################
-cw256 option is now persistent (remove with -clean-cw256)
/work/bids/derivatives/freesurfer/sub-01387

 mri_convert /tmp/fmriprep_wf/single_subject_01387_wf/anat_preproc_wf/anat_template_wf/t1_merge/sub-01387_acq-DC_run-01_T1w_template.nii.gz /work/bids/derivatives/freesurfer/sub-01387/mri/orig/001.mgz 

mri_convert.bin /tmp/fmriprep_wf/single_subject_01387_wf/anat_preproc_wf/anat_template_wf/t1_merge/sub-01387_acq-DC_run-01_T1w_template.nii.gz /work/bids/derivatives/freesurfer/sub-01387/mri/orig/001.mgz 
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
reading from /tmp/fmriprep_wf/single_subject_01387_wf/anat_preproc_wf/anat_template_wf/t1_merge/sub-01387_acq-DC_run-01_T1w_template.nii.gz...
TR=2500.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (0.999668, -0.0216556, -0.013962)
j_ras = (0.0215878, 0.999754, -0.00499101)
k_ras = (0.0140667, 0.00468794, 0.99989)
writing to /work/bids/derivatives/freesurfer/sub-01387/mri/orig/001.mgz...
#--------------------------------------------
#@# T2/FLAIR Input Mon Oct 14 12:20:34 CEST 2019
/work/bids/derivatives/freesurfer/sub-01387

 mri_convert --no_scale 1 /work/bids/sub-01387/anat/sub-01387_acq-DC_run-01_FLAIR.nii.gz /work/bids/derivatives/freesurfer/sub-01387/mri/orig/FLAIRraw.mgz 

mri_convert.bin --no_scale 1 /work/bids/sub-01387/anat/sub-01387_acq-DC_run-01_FLAIR.nii.gz /work/bids/derivatives/freesurfer/sub-01387/mri/orig/FLAIRraw.mgz 
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
reading from /work/bids/sub-01387/anat/sub-01387_acq-DC_run-01_FLAIR.nii.gz...
TR=4700.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (0.99967, -0.0216549, -0.0138081)
j_ras = (0.0225048, 0.997651, 0.0647003)
k_ras = (0.0123745, -0.0649897, 0.997809)
writing to /work/bids/derivatives/freesurfer/sub-01387/mri/orig/FLAIRraw.mgz...
#--------------------------------------------
#@# MotionCor Mon Oct 14 12:20:44 CEST 2019
Found 1 runs
/work/bids/derivatives/freesurfer/sub-01387/mri/orig/001.mgz
Checking for (invalid) multi-frame inputs...
WARNING: only one run found. This is OK, but motion
correction cannot be performed on one run, so I'll
copy the run to rawavg and continue.

 cp /work/bids/derivatives/freesurfer/sub-01387/mri/orig/001.mgz /work/bids/derivatives/freesurfer/sub-01387/mri/rawavg.mgz 

/work/bids/derivatives/freesurfer/sub-01387

 mri_convert /work/bids/derivatives/freesurfer/sub-01387/mri/rawavg.mgz /work/bids/derivatives/freesurfer/sub-01387/mri/orig.mgz --conform_min 

mri_convert.bin /work/bids/derivatives/freesurfer/sub-01387/mri/rawavg.mgz /work/bids/derivatives/freesurfer/sub-01387/mri/orig.mgz --conform_min 
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
reading from /work/bids/derivatives/freesurfer/sub-01387/mri/rawavg.mgz...
TR=2500.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (0.999668, -0.0216556, -0.013962)
j_ras = (0.0215878, 0.999754, -0.00499101)
k_ras = (0.0140667, 0.00468794, 0.99989)
changing data type from float to uchar (noscale = 0)...
MRIchangeType: Building histogram 
Reslicing using trilinear interpolation 
writing to /work/bids/derivatives/freesurfer/sub-01387/mri/orig.mgz...

 mri_add_xform_to_header -c /work/bids/derivatives/freesurfer/sub-01387/mri/transforms/talairach.xfm /work/bids/derivatives/freesurfer/sub-01387/mri/orig.mgz /work/bids/derivatives/freesurfer/sub-01387/mri/orig.mgz 

INFO: extension is mgz
#--------------------------------------------
#@# Talairach Mon Oct 14 12:20:59 CEST 2019
/work/bids/derivatives/freesurfer/sub-01387/mri

 mri_nu_correct.mni --no-rescale --i orig.mgz --o orig_nu.mgz --n 1 --proto-iters 1000 --distance 50 

/work/bids/derivatives/freesurfer/sub-01387/mri
/opt/freesurfer/bin/mri_nu_correct.mni
--no-rescale --i orig.mgz --o orig_nu.mgz --n 1 --proto-iters 1000 --distance 50
nIters 1
$Id: mri_nu_correct.mni,v 1.27 2016/02/26 16:19:49 mreuter Exp $
Linux node001 4.14.139-1.0.18.el7.rrz.x86_64 poldracklab/fmriprep#1 SMP Tue Aug 20 18:14:20 CEST 2019 x86_64 x86_64 x86_64 GNU/Linux
Mon Oct 14 12:21:00 CEST 2019
Program nu_correct, built from:
Package MNI N3, version 1.12.0, compiled by nicks@terrier (x86_64-unknown-linux-gnu) on 2015-06-19 at 01:25:34
/usr/bin/bc
tmpdir is ./tmp.mri_nu_correct.mni.23592
/work/bids/derivatives/freesurfer/sub-01387/mri
mri_convert orig.mgz ./tmp.mri_nu_correct.mni.23592/nu0.mnc -odt float
mri_convert.bin orig.mgz ./tmp.mri_nu_correct.mni.23592/nu0.mnc -odt float 
/opt/freesurfer/bin/mri_convert: line 3: 23657 Segmentation fault      mri_convert.bin "$@"
ERROR: converting to minc
Linux node001 4.14.139-1.0.18.el7.rrz.x86_64 poldracklab/fmriprep#1 SMP Tue Aug 20 18:14:20 CEST 2019 x86_64 x86_64 x86_64 GNU/Linux

recon-all -s sub-01387 exited with ERRORS at Mon Oct 14 12:21:02 CEST 2019

To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting

Specifically, there appears to be an segmentation fault in mri_convert

mri_convert orig.mgz ./tmp.mri_nu_correct.mni.23592/nu0.mnc -odt float

I get the same error, when I run this command isolated through singularity:

-bash-4.2$ singularity exec --userns -B $WORK:/work -B$WORK:/home -B $RRZ_GLOBAL_TMPDIR:/tmp $WORK/containers/fmriprep/sandbox bash -c 'export FS_LICENSE=/work/license.txt; cd /work/bids/derivatives/freesurfer/sub-01387/mri; pwd;  mri_convert orig.mgz ./tmp.mri_nu_correct.mni.23592/nu0.mnc -odt float'

/work/bids/derivatives/freesurfer/sub-01387/mri
mri_convert.bin orig.mgz ./tmp.mri_nu_correct.mni.23592/nu0.mnc -odt float 
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
reading from orig.mgz...
TR=2500.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 6.41739e-10, -1.11759e-09)
j_ras = (-1.11759e-09, 5.58794e-10, -1)
k_ras = (-6.54836e-10, 1, 0)
changing data type from uchar to float (noscale = 0)...
writing to ./tmp.mri_nu_correct.mni.23592/nu0.mnc...
/opt/freesurfer/bin/mri_convert: line 3: 19635 Segmentation fault      mri_convert.bin "$@"

Interestingly, no error occurs when i change -odt float to -odt uchar or -odt short. The seg fault does occur for -odt int.

Any ideas? Thanks.

oesteban commented 4 years ago

@effigies, could we exclude N3 from the freesurfer workflow, since we are running N4 ourselves?

effigies commented 4 years ago

You'll need to check whether nu.mgz is aligned to orig.mgz. It takes talairach.xfm as an input: https://surfer.nmr.mgh.harvard.edu/fswiki/ReconAllTableStableV6.0

eds-slim commented 4 years ago

Thanks for taking this up! Is there anything I can test further or otherwise contribute from my side?

eds-slim commented 4 years ago

@oesteban @effigies: I looked into the issue a bit further and tried to run mri_convert on the offending orig.mgz outside the container, this works without error.

As far as I can tell, the local and containerized versions of mri_convert are the same

mri_convert --version
mri_convert.bin --version 
stable6
-bash-4.2$ singularity shell --userns $WORK/containers/fmriprep/sandbox 
Singularity sandbox:~> mri_convert --version
mri_convert.bin --version 
stable6

I do note that the bc version in the container is 1.06.95, which is older than my local verison 1.07.1. Could this be contributing to the problem?

Thanks for further input to resolve this.

eds-slim commented 4 years ago

The same error

mri_convert orig.mgz ./tmp.mri_nu_correct.mni.6097/nu0.mnc -odt float
mri_convert.bin orig.mgz ./tmp.mri_nu_correct.mni.6097/nu0.mnc -odt float 
/opt/freesurfer/bin/mri_convert: line 3:  6272 Segmentation fault      mri_convert.bin "$@"
ERROR: converting to minc

occurs with the latest smriprep version 2019-09-09-76bc290c67e9, i.e. smriprep v0+unknown.

eds-slim commented 4 years ago

After further scrutiny I have been able to use the -nocache option to volume_stats as described here to get the freesurfer recon-all command to execute a little bit further. It now crashes out with a segmentation fault on spline_smooth. I will raise this issue with the N3 people and report back when I get a response. The alternative suggested by @oesteban, i.e. to skip N3 altogether, would be even more appealing. How could that be achieved?

effigies commented 4 years ago

Sorry, I'm still just not understanding why this is happening. I don't see any reason that N3 should fail after N4 runs.

Is the issue that we're inducing negative numbers in the image with N4 correction? What do these images look like?

If you're able to share the original T1w image, I could see if I can reproduce this.

BlackHoleExelion commented 2 years ago

@eds-slim Hello, did you find a solution? I got exactly the same issue right now.

kincsesbalint commented 11 months ago

I face a similar issue. I could run a few weeks back recon-all (freesurfer6.0) from Singularity on our server. Trying the same container with the same subject, it exits with the error above. Checking the fs log files from the previous successful run and the current one, no difference (until the line where the error is mentioned). However, when I check the log files in the individual folder/mri/mri_nu_correct.mni.log) there are some differences: from the successful run: image current, bad run: image It seems that the mri_nu_correct.mni called with different arguments.

kincsesbalint commented 11 months ago

It seems that we have had some update on our server and there was some issue with mounting the tmp folder in the container. It seems that freesurfer could not write there, so in the next step it could not find data. Sorry for the noise.

effigies commented 11 months ago

No worries, glad you figured it out. Closing this as there's nothing actionable. A new issue can be opened if it resurfaces.