NO COR files for @SUMA_Make_Spec_FS function

Hi experts,
Recently, I met an issue when I run the following command line.
@SUMA_Make_Spec_FS -sid fs_output -NIFTI.

It reported an error, saying
No COR files, converting mri/orig.mgz ...
mri_convert -ot cor mri/orig.mgz mri/orig
reading from mri/orig.mgz...
ERROR: crypt() returned null with 4-line file
echo: No match.

failure: did not find COR files under 'mri/orig'
program failure: exiting...

But, I used the complete output from Freesurfer. I do not find COR files in the surf or other directories. Do you have any thoughts to fix this issue?

Best,
Cain

Hi, Cain-

Hm, OK. To start, what is the output of:

afni -ver

and what is the output of:

afni_system_check.py -check_all

?

thanks,
pt

Hi expert,
Thanks for your reply. It's very helpful comments to check where the issue is. Here is the output when I type the command line that you mentioned.

[zhisha@lasr2 fs_segmentation]$ afni -ver
Precompiled binary linux_openmp_64: Apr 10 2020 (Version AFNI_20.1.00 'Otho')

and

[zhisha@lasr2 fs_segmentation]$ afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture:         64bit ELF
system:               Linux
release:              3.10.0-1160.76.1.el7.x86_64
version:              #1 SMP Wed Aug 10 16:21:17 UTC 2022
distribution:         CentOS Linux 7.9.2009 Core
number of CPUs:       36
apparent login shell: bash
shell RC file:        .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /appl/afni_openmp-20.1/afni
afni version         : Precompiled binary linux_openmp_64: Apr 10 2020
                     : AFNI_20.1.00 'Otho'
AFNI_version.txt     : AFNI_20.1.00, linux_openmp_64, Apr 10 2020
which python         : /appl/python-2.7.14/bin/python
python version       : 2.7.14
which R              : which: no R in (/appl/afni_openmp-20.1/:/appl/freesurfer-7.4.0/bin:/appl/freesurfer-7.4.0/fsfast/bin:/appl/freesurfer-7.4.0/tktools:/appl/freesurfer-7.4.0/mni/bin:/appl/freesurfer-7.4.0/bin:/appl/freesurfer-7.4.0/MCRv97/bin:/usr/local/bin:/lsf/10.1/linux3.10-glibc2.17-x86_64/etc:/lsf/10.1/linux3.10-glibc2.17-x86_64/bin:/usr/local/bin:/appl/curl-7.37.0/bin:/appl/gsl-2.5/bin:/appl/openmpi-1.8.3/bin:/appl/python-2.7.14/bin:/appl/gcc-4.9.4/bin:/usr/local/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)

which tcsh           : /usr/bin/tcsh

instances of various programs found in PATH:
    afni    : 1   (/misc/appl/afni_openmp-20.1/afni)
    R       : 0
    python  : 2
      /misc/appl/python-2.7.14/bin/python2.7
      /usr/bin/python2.7
    python2 : 2
      /misc/appl/python-2.7.14/bin/python2.7
      /usr/bin/python2.7
    python3 : 1   (/usr/bin/python3.6)


testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : success
    uber_subject.py      : success
    3dAllineate          : success
    3dRSFC               : success
    SurfMesh             : success
    3dClustSim           : success
    3dMVM                : success

checking for R packages...
    rPkgsInstall -pkgs ALL -check : FAILURE
        R: Command not found.

R RHOME : R: Command not found.

checking for $HOME files...
    .afnirc                   : missing
    .sumarc                   : missing
    .afni/help/all_progs.COMP : missing

------------------------------ python libs -------------------------------
** failed to load module PyQt4
-- PyQt4 is no longer needed for an AFNI bootcamp

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/appl/python-2.7.14/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/appl/python-2.7.14/lib/python2.7/hashlib.py", line 109, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/appl/python-2.7.14/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
** failed to load module matplotlib.pyplot
-- matplotlib.pyplot is not required, but is desirable

-------------------------------- env vars --------------------------------
PATH = /appl/afni_openmp-20.1/:/appl/freesurfer-7.4.0/bin:/appl/freesurfer-7.4.0/fsfast/bin:/appl/freesurfer-7.4.0/tktools:/appl/freesurfer-7.4.0/mni/bin:/appl/freesurfer-7.4.0/bin:/appl/freesurfer-7.4.0/MCRv97/bin:/usr/local/bin:/lsf/10.1/linux3.10-glibc2.17-x86_64/etc:/lsf/10.1/linux3.10-glibc2.17-x86_64/bin:/usr/local/bin:/appl/curl-7.37.0/bin:/appl/gsl-2.5/bin:/appl/openmpi-1.8.3/bin:/appl/python-2.7.14/bin:/appl/gcc-4.9.4/bin:/usr/local/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

PYTHONPATH =
R_LIBS =
LD_LIBRARY_PATH = /appl/freesurfer-7.4.0/lib:/appl/freesurfer-7.4.0/MCRv97/runtime/glnxa64:/appl/freesurfer-7.4.0/MCRv97/bin/glnxa64:/appl/freesurfer-7.4.0/MCRv97/sys/os/glnxa6:/lsf/10.1/linux3.10-glibc2.17-x86_64/lib:/appl/curl-7.37.0/lib:/appl/gmp-6.0.0/lib:/appl/mpfr-3.1.2/lib:/appl/mpc-1.0.2/lib:/appl/gsl-2.5/lib:/appl/openmpi-1.8.3/lib:/appl/python-2.7.14/lib:/appl/gcc-4.9.4/lib64:/appl/gcc-4.9.4/lib

DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =

------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas    : found TT_N27+tlrc  under /appl/afni_openmp-20.1/

------------------------------ OS specific -------------------------------
which yum            : /usr/bin/yum
yum version          : There was a problem importing one of the Python modules


=========================  summary, please fix:  =========================
*  login shell 'bash', trusting user to translate code examples from 'tcsh'
*  failure under initial "AFNI and related program tests"
*  'afni' executable is owned by root
*  missing R packages (see rPkgsInstall)
*  please run: cp /appl/afni_openmp-20.1/AFNI.afnirc ~/.afnirc
*  please run: "suma -update_env" for .sumarc
*  please run: apsearch -update_all_afni_help
*  insufficient data for AFNI bootcamp

Thanks for sharing that. A couple initial notes:

  • It looks like the relevant programs exist there (missing R programs won't affect the @SUMA_Make_Spec_FS issues).
  • That is a pretty old version of AFNI, over three years old now---I'm not sure that updating will fix the current issue, but there will be newer functionality including more supplementary datasets and QC images created automatically.
  • Also, having Python's matplotlib module (ver>=2.2.3) would be useful for other areas of AFNI procressing, particular with afni_proc.py's QC HTML.

From the bottom of the system check in the "Please Fix" section, these are a few things you can do, also, which likely won't affect what is happening here, but which will make using AFNI a bit simpler on your system (e.g., being able to autocomplete AFNI program option flags as you type):

*  please run: cp /appl/afni_openmp-20.1/AFNI.afnirc ~/.afnirc
*  please run: "suma -update_env" for .sumarc
*  please run: apsearch -update_all_afni_help

It's a little odd that afni is owned by root. I also have not seen this before:

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/appl/python-2.7.14/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/appl/python-2.7.14/lib/python2.7/hashlib.py", line 109, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/appl/python-2.7.14/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5

... I haven't seen that before and I am not sure if it is related here, but that is possible.

It would probably be most helpful to see all the output of @SUMA_Make_Spec_FS, to see where the error first occurred in its processing. Also, as noted here:
Notes on using FreeSurfer with AFNI
... it might be helpful to add one option -fspath .., like here:

@SUMA_Make_Spec_FS                                                    \
    -fs_setup                                                         \
    -NIFTI                                                            \
    -sid    SUBJ                                                      \
    -fspath ./SUBJ

(and using -fs_setup might not matter on your OS, but can be useful on other ones, so I generally leave it in).

Would you be able to re-run @SUMA_Make_Spec_FS with that -fspath .. option, and save all the terminal output to a text file, so we could see the full history? In different types of shells this would be done like:

# if using bash:
@SUMA_Make_Spec_FS ... \
    2>&1 | tee output_fs.txt

# if using tcsh/csh:
@SUMA_Make_Spec_FS ... \
    |& tee output_fs.txt

... and you can check your local shell by running echo $0.

thanks,
pt

Thank you so much for your reply. I am contacting our manager to run "Please Fix" section. At the same time, I saved all of the output from the command that you suggested. So, basically, I test it with the following command line.

@SUMA_Make_Spec_FS \
-fs_setup \
-sid fs_output \
-fspath ./fs_output \
-NIFTI \
2>&1 | tee output_fs.txt

Here is the complete output:

++ Running @SUMA_Make_Spec_FS version: 2.2.1
++ sourcing $FREESURFER_HOME/SetUpFreeSurfer.csh
++ creating directory './SUMA' for results...
-- found 6 LH surfaces
-- found 6 RH surfaces
echo: No match.
No COR files, converting mri/orig.mgz ...
mri_convert -ot cor mri/orig.mgz mri/orig 
reading from mri/orig.mgz...
ERROR: crypt() returned null with 4-line file
echo: No match.

failure: did not find COR files under 'mri/orig'
program failure: exiting...

Any further suggestions? Thanks

Actually, those "Please fix" items shouldn't require an admin to run them---they are just local things, so you can do those.

Re. @SUMA_Make_Spec_FS: could you move the current SUMA/ directory to some backup name like "SUMA_backup", and then run the same command again, while adding this option:

-debug 2

? That will output a lot more detailed text, and hopefully pinpoint the first issue more directly.

thanks,
pt

Thank you so much for your reply. I just run the command line again, while specifying debug function. Here is the output. Hopefully, it would show more useful info.

++ Running @SUMA_Make_Spec_FS version: 2.2.1
++ sourcing $FREESURFER_HOME/SetUpFreeSurfer.csh
-- usage okay
if ( 0 ) set ldlist = ( )
if ( 0 == 0 && 2 != 0 ) then
set ldpref = ( )
foreach lldd ( 141 60 )
set ldpref = ( std.141. )
end
set ldpref = ( std.141. std.60. )
end
endif
if ( 2 != 0 && 2 != 2 ) then
set spec_files = ( {fs_output}_lh.spec {fs_output}_rh.spec )
set sample_spec = fs_output_lh.spec
set afni_prefix = fs_output_SurfVol
if ( -1 != -1 ) then
set afni_dataset = fs_output_SurfVol
endif
cd /home/zhisha/fs_output
set start_dir = /home/zhisha/fs_output
if ( 2 ) echo -- using start_dir '/home/zhisha/fs_output'
echo -- using start_dir '/home/zhisha/fs_output'
-- using start_dir '/home/zhisha/fs_output'
goto L_PARSE_COMMAND_DONE
goto L_VERIFY_PROGRAMS
set failed_pgms = 0
foreach test_command ( afni to3d suma mris_convert )
if ( 0 ) then
if ( afni == mris_convert ) then
end
if ( 0 ) then
if ( to3d == mris_convert ) then
end
if ( 0 ) then
if ( suma == mris_convert ) then
end
if ( 0 ) then
if ( mris_convert == mris_convert ) then
set nl = `$test_command --help |& \grep surface | wc -l`
mris_convert --help
wc -l
grep surface
if ( 21 == 0 ) then
endif
end
if ( 0 ) then
foreach test_command ( afni mris_convert )
afni --version
if ( 0 ) then
end
mris_convert --version
if ( 0 ) then
end
if ( 0 ) then
if ( 2 ) echo -- all programs found
echo -- all programs found
-- all programs found
goto L_VERIFY_PROGRAMS_DONE
goto L_SET_SURF_DIRS
if ( -d surf ) then
set surf_dir = ./surf
set label_dir = ./label
else if ( fs_output == surf ) then
if ( ! -w ./surf ) then
if ( 2 ) echo -- using surf directory './surf'...
echo -- using surf directory './surf'...
-- using surf directory './surf'...
set orig_dir = 
foreach test_dir ( ./surf/orig ./surf/mri/orig orig mri/orig ../orig ../mri/orig )
if ( -d ./surf/orig ) then
end
if ( -d ./surf/mri/orig ) then
end
if ( -d orig ) then
end
if ( -d mri/orig ) then
set orig_dir = mri/orig
break
set orig_mgz = 
foreach test_mgz ( ./surf/orig.mgz ./surf/mri/orig.mgz orig.mgz mri/orig.mgz ../orig.mgz ../mri/orig.mgz )
if ( -f ./surf/orig.mgz ) then
end
if ( -f ./surf/mri/orig.mgz ) then
end
if ( -f orig.mgz ) then
end
if ( -f mri/orig.mgz ) then
set orig_mgz = mri/orig.mgz
break
set other_mgz = ( )
set other_candidates = ( T1 aparc+aseg aparc.a2005s+aseg aparc.a2009s+aseg aseg.auto aseg brain.finalsurfs brain brainmask.auto brainmask norm nu nu_noneck lh.ribbon rh.ribbon wm.asegedit wm wm.seg )
foreach candidate ( T1 aparc+aseg aparc.a2005s+aseg aparc.a2009s+aseg aseg.auto aseg brain.finalsurfs brain brainmask.auto brainmask norm nu nu_noneck lh.ribbon rh.ribbon wm.asegedit wm wm.seg )
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/T1.mgz ) then
end
if ( -f ./surf/mri/T1.mgz ) then
end
if ( -f ./T1.mgz ) then
end
if ( -f mri/T1.mgz ) then
set other_mgz = ( mri/T1.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/aparc+aseg.mgz ) then
end
if ( -f ./surf/mri/aparc+aseg.mgz ) then
end
if ( -f ./aparc+aseg.mgz ) then
end
if ( -f mri/aparc+aseg.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/aparc.a2005s+aseg.mgz ) then
end
if ( -f ./surf/mri/aparc.a2005s+aseg.mgz ) then
end
if ( -f ./aparc.a2005s+aseg.mgz ) then
end
if ( -f mri/aparc.a2005s+aseg.mgz ) then
end
if ( -f ../aparc.a2005s+aseg.mgz ) then
end
if ( -f ../mri/aparc.a2005s+aseg.mgz ) then
end
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/aparc.a2009s+aseg.mgz ) then
end
if ( -f ./surf/mri/aparc.a2009s+aseg.mgz ) then
end
if ( -f ./aparc.a2009s+aseg.mgz ) then
end
if ( -f mri/aparc.a2009s+aseg.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/aseg.auto.mgz ) then
end
if ( -f ./surf/mri/aseg.auto.mgz ) then
end
if ( -f ./aseg.auto.mgz ) then
end
if ( -f mri/aseg.auto.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/aseg.mgz ) then
end
if ( -f ./surf/mri/aseg.mgz ) then
end
if ( -f ./aseg.mgz ) then
end
if ( -f mri/aseg.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/brain.finalsurfs.mgz ) then
end
if ( -f ./surf/mri/brain.finalsurfs.mgz ) then
end
if ( -f ./brain.finalsurfs.mgz ) then
end
if ( -f mri/brain.finalsurfs.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/brain.mgz ) then
end
if ( -f ./surf/mri/brain.mgz ) then
end
if ( -f ./brain.mgz ) then
end
if ( -f mri/brain.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz mri/brain.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/brainmask.auto.mgz ) then
end
if ( -f ./surf/mri/brainmask.auto.mgz ) then
end
if ( -f ./brainmask.auto.mgz ) then
end
if ( -f mri/brainmask.auto.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz mri/brain.mgz mri/brainmask.auto.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/brainmask.mgz ) then
end
if ( -f ./surf/mri/brainmask.mgz ) then
end
if ( -f ./brainmask.mgz ) then
end
if ( -f mri/brainmask.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz mri/brain.mgz mri/brainmask.auto.mgz mri/brainmask.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/norm.mgz ) then
end
if ( -f ./surf/mri/norm.mgz ) then
end
if ( -f ./norm.mgz ) then
end
if ( -f mri/norm.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz mri/brain.mgz mri/brainmask.auto.mgz mri/brainmask.mgz mri/norm.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/nu.mgz ) then
end
if ( -f ./surf/mri/nu.mgz ) then
end
if ( -f ./nu.mgz ) then
end
if ( -f mri/nu.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz mri/brain.mgz mri/brainmask.auto.mgz mri/brainmask.mgz mri/norm.mgz mri/nu.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/nu_noneck.mgz ) then
end
if ( -f ./surf/mri/nu_noneck.mgz ) then
end
if ( -f ./nu_noneck.mgz ) then
end
if ( -f mri/nu_noneck.mgz ) then
end
if ( -f ../nu_noneck.mgz ) then
end
if ( -f ../mri/nu_noneck.mgz ) then
end
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/lh.ribbon.mgz ) then
end
if ( -f ./surf/mri/lh.ribbon.mgz ) then
end
if ( -f ./lh.ribbon.mgz ) then
end
if ( -f mri/lh.ribbon.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz mri/brain.mgz mri/brainmask.auto.mgz mri/brainmask.mgz mri/norm.mgz mri/nu.mgz mri/lh.ribbon.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/rh.ribbon.mgz ) then
end
if ( -f ./surf/mri/rh.ribbon.mgz ) then
end
if ( -f ./rh.ribbon.mgz ) then
end
if ( -f mri/rh.ribbon.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz mri/brain.mgz mri/brainmask.auto.mgz mri/brainmask.mgz mri/norm.mgz mri/nu.mgz mri/lh.ribbon.mgz mri/rh.ribbon.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/wm.asegedit.mgz ) then
end
if ( -f ./surf/mri/wm.asegedit.mgz ) then
end
if ( -f ./wm.asegedit.mgz ) then
end
if ( -f mri/wm.asegedit.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz mri/brain.mgz mri/brainmask.auto.mgz mri/brainmask.mgz mri/norm.mgz mri/nu.mgz mri/lh.ribbon.mgz mri/rh.ribbon.mgz mri/wm.asegedit.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/wm.mgz ) then
end
if ( -f ./surf/mri/wm.mgz ) then
end
if ( -f ./wm.mgz ) then
end
if ( -f mri/wm.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz mri/brain.mgz mri/brainmask.auto.mgz mri/brainmask.mgz mri/norm.mgz mri/nu.mgz mri/lh.ribbon.mgz mri/rh.ribbon.mgz mri/wm.asegedit.mgz mri/wm.mgz )
break
end
foreach dcand ( ./surf/ ./surf/mri/ ./ mri/ ../ ../mri/ )
if ( -f ./surf/wm.seg.mgz ) then
end
if ( -f ./surf/mri/wm.seg.mgz ) then
end
if ( -f ./wm.seg.mgz ) then
end
if ( -f mri/wm.seg.mgz ) then
set other_mgz = ( mri/T1.mgz mri/aparc+aseg.mgz mri/aparc.a2009s+aseg.mgz mri/aseg.auto.mgz mri/aseg.mgz mri/brain.finalsurfs.mgz mri/brain.mgz mri/brainmask.auto.mgz mri/brainmask.mgz mri/norm.mgz mri/nu.mgz mri/lh.ribbon.mgz mri/rh.ribbon.mgz mri/wm.asegedit.mgz mri/wm.mgz mri/wm.seg.mgz )
break
end
if ( mri/orig ==  && mri/orig.mgz ==  ) then
if ( mri/orig ==  ) then
if ( ! -w mri/orig ) then
if ( 2 ) echo -- using orig directory 'mri/orig'...
echo -- using orig directory 'mri/orig'...
-- using orig directory 'mri/orig'...
set suma_dir = ./SUMA
if ( -d ./SUMA ) then
echo ++ creating directory './SUMA' for results...
++ creating directory './SUMA' for results...
mkdir ./SUMA
if ( 0 ) then
endif
goto L_SET_SURF_DIRS_DONE
goto L_CHECK_FOR_OVERWRITE
set test_failures = 0
foreach test_file ( ./SUMA/fs_output_lh.spec ./SUMA/fs_output_rh.spec ./SUMA/fs_output_SurfVol.HEAD ./SUMA/fs_output_SurfVol.BRIK mri/orig/fs_output_SurfVol.HEAD mri/orig/fs_output_SurfVol.BRIK mri/orig/fs_output_SurfVol+orig.HEAD mri/orig/fs_output_SurfVol+orig.BRIK ./SUMA/fs_output_SurfVol+orig.HEAD ./SUMA/fs_output_SurfVol+orig.BRIK ./SUMA/fs_output_SurfVol.nii ./SUMA/fs_output_SurfVol.nii.gz )
if ( -f ./SUMA/fs_output_lh.spec ) then
end
if ( -f ./SUMA/fs_output_rh.spec ) then
end
if ( -f ./SUMA/fs_output_SurfVol.HEAD ) then
end
if ( -f ./SUMA/fs_output_SurfVol.BRIK ) then
end
if ( -f mri/orig/fs_output_SurfVol.HEAD ) then
end
if ( -f mri/orig/fs_output_SurfVol.BRIK ) then
end
if ( -f mri/orig/fs_output_SurfVol+orig.HEAD ) then
end
if ( -f mri/orig/fs_output_SurfVol+orig.BRIK ) then
end
if ( -f ./SUMA/fs_output_SurfVol+orig.HEAD ) then
end
if ( -f ./SUMA/fs_output_SurfVol+orig.BRIK ) then
end
if ( -f ./SUMA/fs_output_SurfVol.nii ) then
end
if ( -f ./SUMA/fs_output_SurfVol.nii.gz ) then
end
if ( 0 ) then
goto L_CHECK_FOR_OVERWRITE_DONE
goto L_LOOK_FOR_SURF
cd ./surf
set list_lh = X
set list_rh = X
foreach attrib ( smoothwm pial inflated occip.patch.3d occip.patch.flat occip.flat.patch.3d fusiform.patch.flat full.patch.3d full.patch.flat full.flat.patch.3d full.flat flat.patch sphere white sphere.reg rh.sphere.reg lh.sphere.reg pial-outer-smoothed )
if ( -f lh.smoothwm ) set list_lh = ( X lh.smoothwm )
set list_lh = ( X lh.smoothwm )
if ( -f rh.smoothwm ) set list_rh = ( X rh.smoothwm )
set list_rh = ( X rh.smoothwm )
end
if ( -f lh.pial ) set list_lh = ( X lh.smoothwm lh.pial )
set list_lh = ( X lh.smoothwm lh.pial )
if ( -f rh.pial ) set list_rh = ( X rh.smoothwm rh.pial )
set list_rh = ( X rh.smoothwm rh.pial )
end
if ( -f lh.inflated ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated )
set list_lh = ( X lh.smoothwm lh.pial lh.inflated )
if ( -f rh.inflated ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated )
set list_rh = ( X rh.smoothwm rh.pial rh.inflated )
end
if ( -f lh.occip.patch.3d ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.occip.patch.3d )
if ( -f rh.occip.patch.3d ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.occip.patch.3d )
end
if ( -f lh.occip.patch.flat ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.occip.patch.flat )
if ( -f rh.occip.patch.flat ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.occip.patch.flat )
end
if ( -f lh.occip.flat.patch.3d ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.occip.flat.patch.3d )
if ( -f rh.occip.flat.patch.3d ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.occip.flat.patch.3d )
end
if ( -f lh.fusiform.patch.flat ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.fusiform.patch.flat )
if ( -f rh.fusiform.patch.flat ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.fusiform.patch.flat )
end
if ( -f lh.full.patch.3d ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.full.patch.3d )
if ( -f rh.full.patch.3d ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.full.patch.3d )
end
if ( -f lh.full.patch.flat ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.full.patch.flat )
if ( -f rh.full.patch.flat ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.full.patch.flat )
end
if ( -f lh.full.flat.patch.3d ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.full.flat.patch.3d )
if ( -f rh.full.flat.patch.3d ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.full.flat.patch.3d )
end
if ( -f lh.full.flat ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.full.flat )
if ( -f rh.full.flat ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.full.flat )
end
if ( -f lh.flat.patch ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.flat.patch )
if ( -f rh.flat.patch ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.flat.patch )
end
if ( -f lh.sphere ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.sphere )
set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.sphere )
if ( -f rh.sphere ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.sphere )
set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.sphere )
end
if ( -f lh.white ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.sphere lh.white )
set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.sphere lh.white )
if ( -f rh.white ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.sphere rh.white )
set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.sphere rh.white )
end
if ( -f lh.sphere.reg ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.sphere lh.white lh.sphere.reg )
set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.sphere lh.white lh.sphere.reg )
if ( -f rh.sphere.reg ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.sphere rh.white rh.sphere.reg )
set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.sphere rh.white rh.sphere.reg )
end
if ( -f lh.rh.sphere.reg ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.sphere lh.white lh.sphere.reg lh.rh.sphere.reg )
if ( -f rh.rh.sphere.reg ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.sphere rh.white rh.sphere.reg rh.rh.sphere.reg )
end
if ( -f lh.lh.sphere.reg ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.sphere lh.white lh.sphere.reg lh.lh.sphere.reg )
if ( -f rh.lh.sphere.reg ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.sphere rh.white rh.sphere.reg rh.lh.sphere.reg )
end
if ( -f lh.pial-outer-smoothed ) set list_lh = ( X lh.smoothwm lh.pial lh.inflated lh.sphere lh.white lh.sphere.reg lh.pial-outer-smoothed )
if ( -f rh.pial-outer-smoothed ) set list_rh = ( X rh.smoothwm rh.pial rh.inflated rh.sphere rh.white rh.sphere.reg rh.pial-outer-smoothed )
end
set list_lh = ( lh.smoothwm lh.pial lh.inflated lh.sphere lh.white lh.sphere.reg )
set list_rh = ( rh.smoothwm rh.pial rh.inflated rh.sphere rh.white rh.sphere.reg )
if ( 6 == 0 && 6 == 0 ) then
if ( 6 > 0 ) then
echo -- found 6 LH surfaces
-- found 6 LH surfaces
if ( 2 ) echo     -- lh.smoothwm lh.pial lh.inflated lh.sphere lh.white lh.sphere.reg
echo     -- lh.smoothwm lh.pial lh.inflated lh.sphere lh.white lh.sphere.reg
    -- lh.smoothwm lh.pial lh.inflated lh.sphere lh.white lh.sphere.reg
endif
if ( 6 > 0 ) then
echo -- found 6 RH surfaces
-- found 6 RH surfaces
if ( 2 ) echo     -- rh.smoothwm rh.pial rh.inflated rh.sphere rh.white rh.sphere.reg
echo     -- rh.smoothwm rh.pial rh.inflated rh.sphere rh.white rh.sphere.reg
    -- rh.smoothwm rh.pial rh.inflated rh.sphere rh.white rh.sphere.reg
endif
cd /home/zhisha/fs_output
goto L_LOOK_FOR_SURF_DONE
goto L_CREATE_BRICK
cd mri/orig
set cor_files = ( `echo COR-???` )
echo COR-???
echo: No match.
if ( 1 || 0 == 1 ) then
if ( mri/orig.mgz !=  ) then
echo No COR files, converting mri/orig.mgz ...
No COR files, converting mri/orig.mgz ...
cd /home/zhisha/fs_output
mri_convert -ot cor mri/orig.mgz mri/orig
mri_convert -ot cor mri/orig.mgz mri/orig 
reading from mri/orig.mgz...
ERROR: crypt() returned null with 4-line file
cd mri/orig
else
else
set cor_files = ( `echo COR-???` )
echo COR-???
echo: No match.
if ( 1 ) then
set endstr = failure: did not find COR files under 'mri/orig'
goto L_BAD_END
echo 

if ( failure: did not find COR files under 'mri/orig' !=  ) echo failure: did not find COR files under 'mri/orig'
echo failure: did not find COR files under 'mri/orig'
failure: did not find COR files under 'mri/orig'
echo program failure: exiting...
program failure: exiting...
echo 

exit

Great, thanks for sending that.

It looks like the first error/failure is:

ERROR: crypt() returned null with 4-line file

which occurs in the FreeSurfer program mri_convert that @SUMA_Make_Spec_FS calls.

The threads I found discussing that were here and here, but the latter even just refers to the former. In that case, the issue appeared to be something with the cluster setup, as it pertained to FS. I wonder if there might have been issues within the running of recon-all, perhaps, too, if you have logged terminal output from that?

--pt

Hi expert,
Thank you so much for your reply. That's awesome. Got it. it's been an FIPS issue for a while. I just now tried to run this command on another node that does not enable FIPS, then it worked.

And then I test this command line on another server. However, it showed:
"/cm/shared/app_chop/afni/23.0.08/bin/@SUMA_Make_Spec_FS: /bin/tcsh: bad interpreter: No such file of directory". Does it mean this toolbox is not available on this server.

Given that the admin installs all tools, I am guessing the admin forgot installing this tool. Alternatively, there might be some other reasons. Any thoughts about this?

Best,
Cain

Hi, Cain-

OK, glad that FIPS issue is a known entity and something you could work around. (I have never heard of that before, so it was just a shot in the dark mentioning it!)

Re. seeing bad interpreter: No such file of directory: Well, this is another odd message I don't see very often. From searching a bit, it seems like one cause of that might be due to a text file becoming a bit corrupted by passing through a Windows program that adds weird characters (I think the message would be slightly different if the file didn't exist at all). I am not sure, but you could perhaps use the AFNI program file_tool to check it out for bad characters (Rick wrote this long ago to be able to check for such situations that are hard to see by eye).

Because the program is remote somewhere else in the system, you can use which to find it, and run:

file_tool -show_bad_all -infiles `which @SUMA_Make_Spec_FS`

On my system, running that command shows that nothing is bad, and the gives a couple small warnings (which aren't problematic here, but I haven't noticed before and will update the script about):

/home/ptaylor/afni_build/src/linux_ubuntu_16_64_glw_local_shared/@SUMA_Make_Spec_FS has 0 bad characters

/home/ptaylor/afni_build/src/linux_ubuntu_16_64_glw_local_shared/@SUMA_Make_Spec_FS file type: UNIX
file '/home/ptaylor/afni_build/src/linux_ubuntu_16_64_glw_local_shared/@SUMA_Make_Spec_FS', line 1174 : consider space before '\'
file '/home/ptaylor/afni_build/src/linux_ubuntu_16_64_glw_local_shared/@SUMA_Make_Spec_FS', line 1175 : consider space before '\'
file '/home/ptaylor/afni_build/src/linux_ubuntu_16_64_glw_local_shared/@SUMA_Make_Spec_FS', line 1279 : consider space before '\'
file '/home/ptaylor/afni_build/src/linux_ubuntu_16_64_glw_local_shared/@SUMA_Make_Spec_FS', line 1280 : consider space before '\'

NB: you will have a different path shown. But more importantly, does that show any bad chars in that file? (You could perhaps copy+paste the output here.)

--pt

Hi expert,
Thank you so much for your help. Problem solved. After installing tcsh, it starts working. In other words, the reason why it reported /bin/tcsh: bad interpreter: No such file of directory is because there is no tcsh on our cluster. Anyway, it's working very well. Thanks again for your help. I really appreciate it.
Best,
Cain

Ah, I see. That makes sense---thanks, and happy AFNIing from here!

--pt

Thanks for your help. I really appreciate it. AFNI is an amazing tool. Love it! :slight_smile:
Best,
Cain