3dQwarp crash (stopping criteria? )

Hi AFNI Experts,
I am using 3dQwarp and for most subjects it runs fine but I had a handful that would fail. Below is the error I am seeing. My guess is that the start and stop cost are close enough for the patch that it triggers a fail but that is just my hypothesis. This error is on AFNI_21.1.20 and 20.0.18

3dQwarp -prefix ./anat.rw.qw.nii -workhard:0:1
-penfac 1
-maxlev 4
-pblur 0.01 0.01
-iniwarp ./anat.rw.qw_MINUS_WARP.nii
-base ./base.rw.nii -source ./anat.rw.nii
++ OpenMP thread count = 15
++ 3dQwarp: AFNI version=AFNI_21.1.20 (Jun 28 2021) [64-bit]
++ Authored by: Zhark the (Hermite) Cubically Warped
++ Dataset final zero-pad: xbot=3 xtop=3 ybot=3 ytop=3 zbot=19 ztop=14 voxels

  • Extended/padded iniwarp to match base volume: 3 3 3 3 7 7 voxels
    ++ Weightizing the base image: FWHM = 3 (vox)

++ +++++++++++ Begin warp optimization: base=base.rw.nii
++ AFNI warpomatic start: 262 x 262 x 177 volume ; autobbox = 72…198 53…220 23…153
lev=0 57…213 33…240 7…169: [first cost=-0.74783] … done [cost=-0.76237]
lev=1 patch=117x155x123: :[cost=-0.76237]:[first cost=-0.75333]
Fatal Signal 11 (SIGSEGV) received
Bottom of Debug Stack

Any insights would be helpful. If there cost function stopping criteria is the issue is there a way to gracefully exit without the error? Can you let me know what the value is for the criteria for stopping if this is indeed the issue. I think on 3dAllineate there is an option :

-conv mmm = Convergence test is set to ‘mmm’ millimeters.
This doesn’t mean that the results will be accurate
to ‘mmm’ millimeters! It just means that the program
stops trying to improve the alignment when the optimizer
(NEWUOA) reports it has narrowed the search radius
down to this level.
* To set this value to the smallest allowable, use ‘-conv 0’.
* A coarser value for ‘quick-and-dirty’ alignment is 0.05.


Hi AFNI Experts,
I wanted to follow up to see if there were any insights into the problem. Thanks for the help.


[li] Does this happen if you use “better” values for -pblur, or just eliminate the -pblur option?
[/li][li] Please re-run with the “-verb” option, which will print out more verbose progress messages, which might help (some).
[/li][li] Is there anything in your ~/.afni.crashlog with more information about the crash?

Since the cost function is the default, the value shown doesn’t seem “too good to be true”.

Hi Bob,
I came across what fixed the issue. It looks like from my original post I was missing an -emask option that was in the code that actually crashed (I accidentally missed that option when typing my post), and once that was removed it ran fine. Since the images were close to begin with and the mask was tight, that may have made a difference in this boundary case.

Thanks again for the help,

Self healing users – the very best kind!!!