@SSwarper error: ** ERROR: Can't open warp dataset './junk.SSwarper.5XAHIpy2lsU_QQ5_WARP.nii'

This has been split off from a previous thread:
https://afni.nimh.nih.gov/afni/community/board/read.php?1,163585,163603#msg-163603
… because this is a separate question. (The previous thread already included multiple subtopics.)

–pt


Hi Paul,

Sorry that I keep bothering you with so many questions, but I encountered new error messages when running @SSwarper script:
set btemplate = MNI152_2009_template_SSW.nii.gz
set tpath = @FindAfniDsetPath ${btemplate}
if( “$tpath” == “” ) exit 1
set subj = C10
@SSwarper
-input {$subj}_2_t1+orig
-base $btemplate
-subid $subj \

Following is the error messages in the output:
+++ Command Echo:
3dQwarp -lite -base /Users/bl/abin/MNI152_2009_template_SSW.nii.gz[0] -source ./junk.SSwarper.5XAHIpy2lsU_AffSS.nii -iniwarp ./junk.SSwarper.5XAHIpy2lsU_QQ5_WARP.nii -warpscale 1 -pcl -inilev 6 -maxlev 7 -workhard:6:7 -wtgaus 4.5 -inedge -pblur -nodset -prefix ./junk.SSwarper.5XAHIpy2lsU_QQ7.nii

++ 3dQwarp: AFNI version=AFNI_20.0.23 (Mar 27 2020) [64-bit]
++ Authored by: Zhark the (Hermite) Cubically Warped
** ERROR: Can’t open warp dataset ‘./junk.SSwarper.5XAHIpy2lsU_QQ5_WARP.nii’
** FATAL ERROR: Cannot open -iniwarp ./junk.SSwarper.5XAHIpy2lsU_QQ5_WARP.nii
** Program compile date = Mar 27 2020
++ SSW Step 6 … piece 3a
++ OpenMP thread count = 4

+++ Command Echo:
3dQwarp -lite -base /Users/bl/abin/MNI152_2009_template_SSW.nii.gz[0] -source ./junk.SSwarper.5XAHIpy2lsU_AffSS.nii -iniwarp ./junk.SSwarper.5XAHIpy2lsU_QQ7_WARP.nii -warpscale 1 -pcl -inilev 8 -minpatch 17 -wtgaus 4.5 -inedge -pblur -nodset -prefix ./junk.SSwarper.5XAHIpy2lsU_QQ9.nii

++ 3dQwarp: AFNI version=AFNI_20.0.23 (Mar 27 2020) [64-bit]
++ Authored by: Zhark the (Hermite) Cubically Warped
** ERROR: Can’t open warp dataset ‘./junk.SSwarper.5XAHIpy2lsU_QQ7_WARP.nii’
** FATAL ERROR: Cannot open -iniwarp ./junk.SSwarper.5XAHIpy2lsU_QQ7_WARP.nii
** Program compile date = Mar 27 2020
++ SSW Step 6 … piece 3b
++ OpenMP thread count = 4

+++ Command Echo:
3dQwarp -lite -base /Users/bl/abin/MNI152_2009_template_SSW.nii.gz[0] -source ./junk.SSwarper.5XAHIpy2lsU_AffSS.nii -iniwarp ./junk.SSwarper.5XAHIpy2lsU_QQ9_WARP.nii -warpscale 1 -pcl -inilev 10 -wtgaus 4.5 -inedge -pblur -minpatch 11 -prefix ./anatQQ.C10.nii

++ 3dQwarp: AFNI version=AFNI_20.0.23 (Mar 27 2020) [64-bit]
++ Authored by: Zhark the (Hermite) Cubically Warped
** ERROR: Can’t open warp dataset ‘./junk.SSwarper.5XAHIpy2lsU_QQ9_WARP.nii’
** FATAL ERROR: Cannot open -iniwarp ./junk.SSwarper.5XAHIpy2lsU_QQ9_WARP.nii
** Program compile date = Mar 27 2020
++ SSW: done warping. Finalize.
++ no -frac option: defaulting to -union
++ processing 1 input datasets…
++ padding all datasets by 0 (for dilations)
** FATAL ERROR: failed to open mask dataset ‘./anatQQ.C10.nii’
** Program compile date = Mar 27 2020
++ 3dcalc: AFNI version=AFNI_20.0.23 (Mar 27 2020) [64-bit]
++ Authored by: A cast of thousands
** FATAL ERROR: can’t open dataset ./anatQQ.C10.nii
** Program compile date = Mar 27 2020
mv: rename ./anatQQc.C10.nii to ./anatQQ.C10.nii: No such file or directory
++ SSW Step 7
** ERROR: @snapshot_volreg can’t find ./anatQQ.C10.nii
** ERROR: @snapshot_volreg can’t find ./anatQQ.C10.nii

Do you know what’s wrong with it?

Thanks,
Joy

Hi, Joy-

What happened in the lines just preceding that ERROR message? My guess is that failure occurs because a previous step in the script failed (is there a “killed” message, perhaps, of running out of memory?), so that an expected file wasn’t created and therefore caused this error. That is, this cascade of error messages probably started with some earlier woe, but I’m not sure…

Sidenote:
It can be useful to capture the output of scripts/commands while they run, so you don’t have to copy+paste from a terminal; you can search more easily in text files, and/or send them in when you have a question. To do that, you first have to know what shell you use in a terminal. To discover that, type:


echo $0

(that last character is a zero), and see whether the output is:

  • “bash” or or “-bash” (in which case you have a “bash” terminal shell)
  • “tcsh” or or “-tcsh” (in which case you have a “tcsh” terminal shell), or “csh” (which is “csh” close enough to “tcsh” to be treated the same here)
  • or something else (which I will ignore here, because of my own ignorance).

Then, consider you have a COMMAND to run, such as “@SSwarper -input …”, and you want to put a copy of everything that shows up in the terminal into a text file as well. For a bash shell, you can do this:


COMMAND 2>&1 | tee o.command_copy.txt

and for a tcsh shell, you can do this:


COMMAND |& tee o.command_copy.txt

(There is nothing special about the *.txt filename after the command “tee”; you can/should make it something meaningful.)

This doesn’t help retrospectively, but can be useful, esp. as you try out new script commands that produce lots of outputs.

-pt

Hi Paul,

Sorry! I missed one part of the error message. The following proceeds what I have posted last time:

+++ Command Echo:
3dQwarp -lite -base /Users/bl/abin/MNI152_2009_template_SSW.nii.gz[0] -source ./junk.SSwarper.5XAHIpy2lsU_AffSS.nii -iniwarp ./junk.SSwarper.5XAHIpy2lsU_TAL5_AWARP.nii -warpscale 1 -lpa -inilev 1 -maxlev 5 -wtgaus 4.5 -inedge -pblur -workhard:5:5 -nodset -prefix ./junk.SSwarper.5XAHIpy2lsU_QQ5.nii

++ 3dQwarp: AFNI version=AFNI_20.0.23 (Mar 27 2020) [64-bit]
++ Authored by: Zhark the (Hermite) Cubically Warped
++ Dataset zero-pad: xbot=15 xtop=14 ybot=13 ytop=22 zbot=15 ztop=9 voxels
++ Weightizing the base image: FWHM = 4.5 (vox)
++ +++++++++++ Begin warp optimization: base=/Users/bl/abin/MNI152_2009_template_SSW.nii.gz source=./junk.SSwarper.5XAHIpy2lsU_AffSS.nii

Fatal Signal 11 (SIGSEGV) received
IW3D_setup_for_improvement
IW3D_warpomatic
IW3D_warp_s2bim
3dQwarp
Bottom of Debug Stack
** AFNI version = AFNI_20.0.23 Compile date = Mar 27 2020
** [[Precompiled binary macos_10.12_local: Mar 27 2020]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /Users/bl/.afni.crashlog
++ SSW Step 6 … piece 2
++ OpenMP thread count = 4

Hi Paul,

May I email you the output of my commands?

Thanks,
Joy

Hi, Joy-

Sure.

–pt

I’m having a similar problem. Any solutions found? Thanks.