@SSwarper crash

Good afternoon everyone,

I’m having issues with @SSwarper… I get the crash below.

The command line used was: @SSwarper -input warped+orig -base MNI152_2009_template_SSW.nii.gz -subid anat_warp111 -odir “$rootdir”/FACES_DATA/“$i”

The anatomy input here was the output from 3dwarp -deoblique.

The anatomicals and EPI scans are acquired in very different orientations and are far apart- I was not involved in acquisition, so I’m not sure why.

thank you and please let me know if you need anything else,

Stu

------ CRASH LOG ------------------------------**
Fatal Signal 11 (SIGSEGV) received
… recent internal history …
+++++++mri_free [7]: {ENTRY (file=mri_free.c line=49) from IW3D_cleanup_improvement {912146 ms}
-------mri_free [7]: EXIT} (file=mri_free.c line=50) to IW3D_cleanup_improvement {912146 ms}
+++++++mri_free [7]: {ENTRY (file=mri_free.c line=49) from IW3D_cleanup_improvement {912146 ms}
-------mri_free [7]: EXIT} (file=mri_free.c line=50) to IW3D_cleanup_improvement {912146 ms}
+++++++IW3D_destroy [7]: {ENTRY (file=mri_nwarp.c line=960) from IW3D_cleanup_improvement {912146 ms}
-------IW3D_destroy [7]: EXIT} (file=mri_nwarp.c line=967) to IW3D_cleanup_improvement {912146 ms}
+++++++IW3D_destroy [7]: {ENTRY (file=mri_nwarp.c line=960) from IW3D_cleanup_improvement {912146 ms}
-------IW3D_destroy [7]: EXIT} (file=mri_nwarp.c line=967) to IW3D_cleanup_improvement {912146 ms}
+++++++IW3D_destroy [7]: {ENTRY (file=mri_nwarp.c line=960) from IW3D_cleanup_improvement {912146 ms}
-------IW3D_destroy [7]: EXIT} (file=mri_nwarp.c line=967) to IW3D_cleanup_improvement {912146 ms}
+++++++INCOR_destroy [7]: {ENTRY (file=thd_incorrelate.c line=1865) from IW3D_cleanup_improvement {912146 ms}
-------INCOR_destroy [7]: EXIT} (file=thd_incorrelate.c line=1867) to IW3D_cleanup_improvement {912146 ms}
------IW3D_cleanup_improvement [6]: EXIT} (file=mri_nwarp.c line=10245) to IW3D_setup_for_improvement {912146 ms}
++++++mri_to_float [6]: {ENTRY (file=mri_to_float.c line=19) from IW3D_setup_for_improvement {912146 ms}
+++++++mri_new_7D_generic [7]: {ENTRY (file=mri_new.c line=48) from mri_to_float {912146 ms}
-------mri_new_7D_generic [7]: EXIT} (file=mri_new.c line=143) to mri_to_float {912146 ms}
+++++++mri_add_name [7]: {ENTRY (file=mri_add_name.c line=19) from mri_to_float {912168 ms}
-------mri_add_name [7]: EXIT} (file=mri_add_name.c line=24) to mri_to_float {912168 ms}
------mri_to_float [6]: EXIT} (file=mri_to_float.c line=94) to IW3D_setup_for_improvement {912178 ms}
++++++mri_to_float [6]: {ENTRY (file=mri_to_float.c line=19) from IW3D_setup_for_improvement {912178 ms}
+++++++mri_new_7D_generic [7]: {ENTRY (file=mri_new.c line=48) from mri_to_float {912178 ms}
-------mri_new_7D_generic [7]: EXIT} (file=mri_new.c line=143) to mri_to_float {912178 ms}
+++++++mri_add_name [7]: {ENTRY (file=mri_add_name.c line=19) from mri_to_float {912200 ms}
-------mri_add_name [7]: EXIT} (file=mri_add_name.c line=24) to mri_to_float {912200 ms}
------mri_to_float [6]: EXIT} (file=mri_to_float.c line=94) to IW3D_setup_for_improvement {912213 ms}
++++++mri_interior_edgeize [6]: {ENTRY (file=mri_intedge.c line=19) from IW3D_setup_for_improvement {912213 ms}
+++++++mri_maxabs [7]: {ENTRY (file=mri_max.c line=98) from mri_interior_edgeize {912213 ms}
-------mri_maxabs [7]: EXIT} (file=mri_max.c line=129) to mri_interior_edgeize {912226 ms}
+++++++mri_new_7D_generic [7]: {ENTRY (file=mri_new.c line=48) from mri_interior_edgeize {912226 ms}
-------mri_new_7D_generic [7]: EXIT} (file=mri_new.c line=143) to mri_interior_edgeize {912226 ms}
mri_interior_edgeize – call Extract_Gradient_Maxima_3D {912226 ms}

Last STATUS: call Extract_Gradient_Maxima_3D
mri_interior_edgeize
IW3D_setup_for_improvement
IW3D_warpomatic
IW3D_warp_s2bim
3dQwarp
** AFNI compile date = Dec 7 2020
** [[Precompiled binary macos_10.12_local: Dec 7 2020]]
** Program Crash **

Hi, Stuart-

In the QC directory, there should be an image init*jpg-- what does that look like? (Can you post it?)

-pt

Thanks Paul!

Hmm, that initial seems pretty reasonable. (The only thing that strikes me is that there is a lot of non-brain material in the anatomical.)

What are some of the lines preceding The Crash (if you still have them)? Otherwise, I might ask to look at the dset.

–pt

Hi Paul,

So, I ran this 2 ways and I’m including the diary file from both. First, I ran @SSwarper -input ant+orig -base MNI152_2009_template_SSW.nii.gz -subid anat_warp -odir “$rootdir”/FACES_DATA/“$i”. Based on some of the warnings, I then ran 3dwarp -deoblique first and re-ran things with that input.

thanks and let me know where to upload raw data if that will help.

thanks,

Stu

diary with anat input:
/Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111
++ Starting: @SSwarper v2.33
++ Default OMP_NUM_THREADS is 4
++ Prepare for running @djunct_overlap_check (ver = 0.2)
++ Just copy olay, bc ulay will get regridded

++ My command:
@chauffeur_afni -ulay olapch_0_cp_ulay.nii -pass -pass -olay olapch_1_cp_olay.nii -ulay_range 0% 98% -func_range_perc_nz 98 -cbar Reds_and_Blues -pbar_posonly -set_subbricks 0 0 0 -olay_alpha No -olay_boxed No -opacity 4 -zerocolor black -prefix img00 -montx 1 -monty 1 -montgap 1 -montcolor black -save_ftype JPEG -set_xhairs OFF -label_mode 1 -label_size 3 -do_clean -set_dicom_xyz 0 0 0
\n------------------ start of optionizing ------------------\n
++ Found input file: olapch_0_cp_ulay.nii
++ Found input file: olapch_1_cp_olay.nii
++ Using blowup factor: 2
++ Using opacity: 4
++ Making temporary work directory to copy vis files: ./__tmp_chauf_th4Xoh7Cmt6
++ Converted 0 to labels
++ Final subbrick indices: 0 0 0
++ Copy ulay to visualize (volumetric) within user’s range:
++ Ulay to be visualized within user range:
[0%, 98%] → [0.000000, 703.000000]
++ For olay, the 98%ile value leads to
→ upper range value: 1151.000000
++ Dimensions (xyzt): 280 320 208 1
++ (initial) Slice spacing ordered (x,y,z) is: 208 280 320
++ Will have user’s chosen: SET_DICOM_XYZ 0 0 0
\n------------------- end of optionizing -------------------\n
– trying to start Xvfb :537
[1] 2821
Precompiled binary macos_10.12_local: Dec 7 2020 (Version AFNI_20.3.03 ‘Vespasian’)

+++ Command Echo:
afni -no1D -noplugins -no_detach -com SWITCH_UNDERLAY tmp_ulay.nii -com SWITCH_OVERLAY tmp_olay.nii -com SEE_OVERLAY + -com OPEN_WINDOW sagittalimage opacity=4 mont=1x1:208:1:black crop=0:0,0:0 -com OPEN_WINDOW coronalimage opacity=4 mont=1x1:280:1:black crop=0:0,0:0 -com OPEN_WINDOW axialimage opacity=4 mont=1x1:320:1:black crop=0:0,0:0 -com SET_PBAR_ALL +99 1 Reds_and_Blues -com DO_NOTHING -com SET_SUBBRICKS 0 0 0 -com SET_ULAY_RANGE A.all 0.000000 703.000000 -com SET_FUNC_RANGE 1151.000000 -com SET_THRESHNEW 0 * -com SET_FUNC_ALPHA No -com SET_FUNC_BOXED No -com SET_FUNC_RESAM NN.NN -com SET_XHAIRS OFF -com SET_DICOM_XYZ 0 0 0 -com SAVE_JPEG sagittalimage ./img00.sag blowup=2 -com SAVE_JPEG coronalimage ./img00.cor blowup=2 -com SAVE_JPEG axialimage ./img00.axi blowup=2 -com QUITT ./__tmp_chauf_th4Xoh7Cmt6

…\n+* Removing temporary image directory ‘./__tmp_chauf_th4Xoh7Cmt6’.\n
[1] Done Xvfb :537 -screen 0 1024x768x24

++ DONE (good exit)
see: ./img00*

+++ Arranging 3 images (each 416x560) into a 3x1 matrix.
You can view image …/init_qc_00_overlap_usrc_obase.jpg with:
aiv …/init_qc_00_overlap_usrc_obase.jpg
++ And as a bonus, we have datasets with obliquity!
We will make an image of them with ‘3dWarp -deobliqu …’
applied to each

++ My command:
@chauffeur_afni -obliquify ALL -ulay olapch_0_cp_ulay.nii -pass -pass -olay olapch_1_cp_olay.nii -ulay_range 0% 98% -func_range_perc_nz 98 -cbar Reds_and_Blues -pbar_posonly -set_subbricks 0 0 0 -olay_alpha No -olay_boxed No -opacity 4 -zerocolor black -prefix img01_DEOB -montx 1 -monty 1 -montgap 1 -montcolor black -save_ftype JPEG -set_xhairs OFF -label_mode 1 -label_size 3 -do_clean -set_dicom_xyz 0 0 0
\n------------------ start of optionizing ------------------\n
++ Found input file: olapch_0_cp_ulay.nii
++ Found input file: olapch_1_cp_olay.nii
++ Using blowup factor: 2
++ Using opacity: 4
++ Making temporary work directory to copy vis files: ./__tmp_chauf_ZLdvAqIVAau
++ Apply obliquity to: ALL

mat44 Obliquity Transformation ::

  0.996664     -0.010595      0.080919      -8.025101
  0.019156      0.994206     -0.105770       8.679749
 -0.079330      0.106967      0.991093      10.631966

mat44 Obliquity Transformation ::

  1.000000      0.000000      0.000000       0.000000
  0.000000      1.000000      0.000000       0.000000
  0.000000      0.000000      1.000000       0.000000

++ Converted 0 to labels
++ Final subbrick indices: 0 0 0
++ Copy ulay to visualize (volumetric) within user’s range:
++ Ulay to be visualized within user range:
[0%, 98%] → [0.000000, 657.000000]
++ For olay, the 98%ile value leads to
→ upper range value: 1151.000000
++ Dimensions (xyzt): 237 317 364 1
++ (initial) Slice spacing ordered (x,y,z) is: 237 317 364
++ Will have user’s chosen: SET_DICOM_XYZ 0 0 0
\n------------------- end of optionizing -------------------\n
– trying to start Xvfb :312
[1] 2925
Precompiled binary macos_10.12_local: Dec 7 2020 (Version AFNI_20.3.03 ‘Vespasian’)

+++ Command Echo:
afni -no1D -noplugins -no_detach -com SWITCH_UNDERLAY tmp_ulay.nii -com SWITCH_OVERLAY tmp_olay.nii -com SEE_OVERLAY + -com OPEN_WINDOW sagittalimage opacity=4 mont=1x1:237:1:black crop=0:0,0:0 -com OPEN_WINDOW coronalimage opacity=4 mont=1x1:317:1:black crop=0:0,0:0 -com OPEN_WINDOW axialimage opacity=4 mont=1x1:364:1:black crop=0:0,0:0 -com SET_PBAR_ALL +99 1 Reds_and_Blues -com DO_NOTHING -com SET_SUBBRICKS 0 0 0 -com SET_ULAY_RANGE A.all 0.000000 657.000000 -com SET_FUNC_RANGE 1151.000000 -com SET_THRESHNEW 0 * -com SET_FUNC_ALPHA No -com SET_FUNC_BOXED No -com SET_FUNC_RESAM NN.NN -com SET_XHAIRS OFF -com SET_DICOM_XYZ 0 0 0 -com SAVE_JPEG sagittalimage ./img01_DEOB.sag blowup=2 -com SAVE_JPEG coronalimage ./img01_DEOB.cor blowup=2 -com SAVE_JPEG axialimage ./img01_DEOB.axi blowup=2 -com QUITT ./__tmp_chauf_ZLdvAqIVAau

…\n+* Removing temporary image directory ‘./__tmp_chauf_ZLdvAqIVAau’.\n
[1] + Done Xvfb :312 -screen 0 1024x768x24

++ DONE (good exit)
see: ./img01_DEOB*

+++ Arranging 3 images (each 474x634) into a 3x1 matrix.
You can view image …/init_qc_00_overlap_usrc_obase_DEOB.jpg with:
aiv …/init_qc_00_overlap_usrc_obase_DEOB.jpg
\n+* Removing temporary workdir ‘/Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/__workdir_olap_0JcN9AmIuN0*’\n

++ DONE! Image output:
/Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/init_qc_00_overlap_usrc_obase

++ SSW Step 1
++ SSW Step 2
++ SSW Step 3

+++ Command Echo:
3dQwarp -lite -base /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[1] -lpa -warpscale 1 -source /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/anatUAC.anat_warp.nii -weight /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[2] -allineate -noneg -maxlev 5 -iwarp -awarp -wtgaus 4.5 -inedge -workhard:3:5 -nopenalty -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_TAL5.nii

mat44 3dAllineate matrix:

  0.870266      0.001529      0.010382      12.227700
 -0.021335      0.907647      0.259981     -37.692600
 -0.019619     -0.254539      0.793411     -15.753800

++ SSW Step 4
++ SSW Step 5

+++ Command Echo:
3dNwarpApply -nwarp /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_TAL5_WARPINV.nii -master /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/anatS.anat_warp.nii -source /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_TAL5mm.nii -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_TAL5ww.nii

+++ Command Echo:
3dmask_tool -input /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[3] -dilate_input 3 -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_MASK.nii

++ SSW Step 6
++ SSW Step 6 … piece 0
++ SSW Step 6 … piece 1

+++ Command Echo:
3dQwarp -lite -base /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[0] -source /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_AffSS.nii -iniwarp /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_TAL5_AWARP.nii -warpscale 1 -lpa -inilev 1 -maxlev 5 -wtgaus 4.5 -inedge -pblur -workhard:5:5 -nodset -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_QQ5.nii

++ SSW Step 6 … piece 2

+++ Command Echo:
3dQwarp -lite -base /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[0] -source /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_AffSS.nii -iniwarp /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_QQ5_WARP.nii -warpscale 1 -pcl -inilev 6 -maxlev 7 -workhard:6:7 -wtgaus 4.5 -inedge -pblur -nodset -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_QQ7.nii

++ SSW Step 6 … piece 3a

+++ Command Echo:
3dQwarp -lite -base /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[0] -source /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_AffSS.nii -iniwarp /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_QQ7_WARP.nii -warpscale 1 -pcl -inilev 8 -minpatch 17 -wtgaus 4.5 -inedge -pblur -nodset -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_DdgX81GF88L_QQ9.nii

** ERROR: program failed in Step 6.3b


diary with output of 3dwarp -deoblique
/Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111
++ Starting: @SSwarper v2.33
++ Default OMP_NUM_THREADS is 4
++ Prepare for running @djunct_overlap_check (ver = 0.2)
++ Just copy olay, bc ulay will get regridded

++ My command:
@chauffeur_afni -ulay olapch_0_cp_ulay.nii -pass -pass -olay olapch_1_cp_olay.nii -ulay_range 0% 98% -func_range_perc_nz 98 -cbar Reds_and_Blues -pbar_posonly -set_subbricks 0 0 0 -olay_alpha No -olay_boxed No -opacity 4 -zerocolor black -prefix img00 -montx 1 -monty 1 -montgap 1 -montcolor black -save_ftype JPEG -set_xhairs OFF -label_mode 1 -label_size 3 -do_clean -set_dicom_xyz 0 0 0
\n------------------ start of optionizing ------------------\n
++ Found input file: olapch_0_cp_ulay.nii
++ Found input file: olapch_1_cp_olay.nii
++ Using blowup factor: 2
++ Using opacity: 4
++ Making temporary work directory to copy vis files: ./__tmp_chauf_PmBYgkeaGhg
++ Converted 0 to labels
++ Final subbrick indices: 0 0 0
++ Copy ulay to visualize (volumetric) within user’s range:
++ Ulay to be visualized within user range:
[0%, 98%] → [0.000000, 653.000000]
++ For olay, the 98%ile value leads to
→ upper range value: 1151.000000
++ Dimensions (xyzt): 237 317 364 1
++ (initial) Slice spacing ordered (x,y,z) is: 237 317 364
++ Will have user’s chosen: SET_DICOM_XYZ 0 0 0
\n------------------- end of optionizing -------------------\n
– trying to start Xvfb :624
[1] 3650
Precompiled binary macos_10.12_local: Dec 7 2020 (Version AFNI_20.3.03 ‘Vespasian’)

+++ Command Echo:
afni -no1D -noplugins -no_detach -com SWITCH_UNDERLAY tmp_ulay.nii -com SWITCH_OVERLAY tmp_olay.nii -com SEE_OVERLAY + -com OPEN_WINDOW sagittalimage opacity=4 mont=1x1:237:1:black crop=0:0,0:0 -com OPEN_WINDOW coronalimage opacity=4 mont=1x1:317:1:black crop=0:0,0:0 -com OPEN_WINDOW axialimage opacity=4 mont=1x1:364:1:black crop=0:0,0:0 -com SET_PBAR_ALL +99 1 Reds_and_Blues -com DO_NOTHING -com SET_SUBBRICKS 0 0 0 -com SET_ULAY_RANGE A.all 0.000000 653.000000 -com SET_FUNC_RANGE 1151.000000 -com SET_THRESHNEW 0 * -com SET_FUNC_ALPHA No -com SET_FUNC_BOXED No -com SET_FUNC_RESAM NN.NN -com SET_XHAIRS OFF -com SET_DICOM_XYZ 0 0 0 -com SAVE_JPEG sagittalimage ./img00.sag blowup=2 -com SAVE_JPEG coronalimage ./img00.cor blowup=2 -com SAVE_JPEG axialimage ./img00.axi blowup=2 -com QUITT ./__tmp_chauf_PmBYgkeaGhg

…\n+* Removing temporary image directory ‘./__tmp_chauf_PmBYgkeaGhg’.\n
[1] Done Xvfb :624 -screen 0 1024x768x24

++ DONE (good exit)
see: ./img00*

+++ Arranging 3 images (each 474x634) into a 3x1 matrix.
You can view image …/init_qc_00_overlap_usrc_obase.jpg with:
aiv …/init_qc_00_overlap_usrc_obase.jpg
\n+* Removing temporary workdir ‘/Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/__workdir_olap_JpZFjSfc0Jb*’\n

++ DONE! Image output:
/Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/init_qc_00_overlap_usrc_obase

++ SSW Step 1
++ SSW Step 2
++ SSW Step 3

+++ Command Echo:
3dQwarp -lite -base /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[1] -lpa -warpscale 1 -source /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/anatUAC.anat_warp.nii -weight /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[2] -allineate -noneg -maxlev 5 -iwarp -awarp -wtgaus 4.5 -inedge -workhard:3:5 -nopenalty -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_TAL5.nii

mat44 3dAllineate matrix:

  0.865222     -0.028987      0.072508       3.309490
 -0.004089      0.928828      0.176186     -26.855400
 -0.093809     -0.152533      0.813783     -10.068000

++ SSW Step 4
++ SSW Step 5

+++ Command Echo:
3dNwarpApply -nwarp /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_TAL5_WARPINV.nii -master /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/anatS.anat_warp.nii -source /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_TAL5mm.nii -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_TAL5ww.nii

+++ Command Echo:
3dmask_tool -input /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[3] -dilate_input 3 -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_MASK.nii

++ SSW Step 6
++ SSW Step 6 … piece 0
++ SSW Step 6 … piece 1

+++ Command Echo:
3dQwarp -lite -base /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[0] -source /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_AffSS.nii -iniwarp /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_TAL5_AWARP.nii -warpscale 1 -lpa -inilev 1 -maxlev 5 -wtgaus 4.5 -inedge -pblur -workhard:5:5 -nodset -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_QQ5.nii

++ SSW Step 6 … piece 2

+++ Command Echo:
3dQwarp -lite -base /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[0] -source /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_AffSS.nii -iniwarp /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_QQ5_WARP.nii -warpscale 1 -pcl -inilev 6 -maxlev 7 -workhard:6:7 -wtgaus 4.5 -inedge -pblur -nodset -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_QQ7.nii

++ SSW Step 6 … piece 3a

+++ Command Echo:
3dQwarp -lite -base /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[0] -source /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_AffSS.nii -iniwarp /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_QQ7_WARP.nii -warpscale 1 -pcl -inilev 8 -minpatch 17 -wtgaus 4.5 -inedge -pblur -nodset -prefix /Users/whistu/Desktop/fMRI/MILLER_wave2/FACES_DATA/111/junk.SSwarper_FO8ndMHh6MH_QQ9.nii

** ERROR: program failed in Step 6.3b

Hi, Stuart-

OK, I just sent a link for the data.

–pt

Hi Paul,

I uploaded everything. The @SSWarper scripted on the raw anatomical is in the @unwarped folder within the 111 folder. The output in the main folder is the results of running the script on the anat after 3dwarp -deloblique.

thanks,

Stu

Hi, Stuart–

Thanks for sharing the data.

It is a slightly odd dset in that there is a lot of nonbrain material, down to the shoulders. It also has some obliquity, which may/may not be a major issue.

I ran the following commands, and the resulting images look pretty good, though:


3dcopy anat+orig. anat_deob.nii

3drefit -deoblique anat_deob.nii

@SSwarper    \
    -input anat_deob.nii \
    -base MNI152_2009_template_SSW.nii.gz \
    -subid sub-001 \
    -odir o.aw_sub-001 \
    -giant_move

How does that seem?

–pt

this looks great- thanks so much!

Stu

Hi Paul,

So, I’m still having issues unfortunately. I’m getting a different error now though.

diary:
++ Starting: @SSwarper v2.33
++ Default OMP_NUM_THREADS is 4
++ Prepare for running @djunct_overlap_check (ver = 0.2)
++ Just copy olay, bc ulay will get regridded

++ My command:
@chauffeur_afni -ulay olapch_0_cp_ulay.nii -pass -pass -olay olapch_1_cp_olay.nii -ulay_range 0% 98% -func_range_perc_nz 98 -cbar Reds_and_Blues -pbar_posonly -set_subbricks 0 0 0 -olay_alpha No -olay_boxed No -opacity 4 -zerocolor black -prefix img00 -montx 1 -monty 1 -montgap 1 -montcolor black -save_ftype JPEG -set_xhairs OFF -label_mode 1 -label_size 3 -do_clean -set_dicom_xyz 0 0 0
\n------------------ start of optionizing ------------------\n
++ Found input file: olapch_0_cp_ulay.nii
++ Found input file: olapch_1_cp_olay.nii
++ Using blowup factor: 2
++ Using opacity: 4
++ Making temporary work directory to copy vis files: ./__tmp_chauf_BBJbFjPHDf2
++ Converted 0 to labels
++ Final subbrick indices: 0 0 0
++ Copy ulay to visualize (volumetric) within user’s range:
++ Ulay to be visualized within user range:
[0%, 98%] → [0.000000, 703.000000]
++ For olay, the 98%ile value leads to
→ upper range value: 1151.000000
++ Dimensions (xyzt): 280 320 208 1
++ (initial) Slice spacing ordered (x,y,z) is: 208 280 320
++ Will have user’s chosen: SET_DICOM_XYZ 0 0 0
\n------------------- end of optionizing -------------------\n
– trying to start Xvfb :931
[1] 55595
Precompiled binary macos_10.12_local: Dec 7 2020 (Version AFNI_20.3.03 ‘Vespasian’)

+++ Command Echo:
afni -no1D -noplugins -no_detach -com SWITCH_UNDERLAY tmp_ulay.nii -com SWITCH_OVERLAY tmp_olay.nii -com SEE_OVERLAY + -com OPEN_WINDOW sagittalimage opacity=4 mont=1x1:208:1:black crop=0:0,0:0 -com OPEN_WINDOW coronalimage opacity=4 mont=1x1:280:1:black crop=0:0,0:0 -com OPEN_WINDOW axialimage opacity=4 mont=1x1:320:1:black crop=0:0,0:0 -com SET_PBAR_ALL +99 1 Reds_and_Blues -com DO_NOTHING -com SET_SUBBRICKS 0 0 0 -com SET_ULAY_RANGE A.all 0.000000 703.000000 -com SET_FUNC_RANGE 1151.000000 -com SET_THRESHNEW 0 * -com SET_FUNC_ALPHA No -com SET_FUNC_BOXED No -com SET_FUNC_RESAM NN.NN -com SET_XHAIRS OFF -com SET_DICOM_XYZ 0 0 0 -com SAVE_JPEG sagittalimage ./img00.sag blowup=2 -com SAVE_JPEG coronalimage ./img00.cor blowup=2 -com SAVE_JPEG axialimage ./img00.axi blowup=2 -com QUITT ./__tmp_chauf_BBJbFjPHDf2

…\n+* Removing temporary image directory ‘./__tmp_chauf_BBJbFjPHDf2’.\n
[1] Done Xvfb :931 -screen 0 1024x768x24

++ DONE (good exit)
see: ./img00*

+++ Arranging 3 images (each 416x560) into a 3x1 matrix.
You can view image …/init_qc_00_overlap_usrc_obase.jpg with:
aiv …/init_qc_00_overlap_usrc_obase.jpg
\n+* Removing temporary workdir ‘o.aw_sub/__workdir_olap_rTdGepEA8Og*’\n

++ DONE! Image output:
o.aw_sub/init_qc_00_overlap_usrc_obase

++ SSW Step 1
++ SSW Step 2
++ SSW Step 3

+++ Command Echo:
3dQwarp -lite -base /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[1] -lpa -warpscale 1 -source o.aw_sub/anatUAC.sub.nii -weight /Users/whistu/abin/MNI152_2009_template_SSW.nii.gz[2] -allineate -noneg -maxlev 5 -iwarp -awarp -wtgaus 4.5 -inedge -workhard:3:5 -nopenalty -prefix o.aw_sub/junk.SSwarper_NBf0JTU53y0_TAL5.nii -allopt -twobest 11 -twopass -maxrot 45 -maxshf 40 -source_automask+2 -cmass

mat44 3dAllineate matrix:

  0.882100     -0.005909      0.007026      12.393200
  0.002741      0.966010      0.191951     -41.969299
 -0.018638     -0.055064      0.838204     -27.198299

++ SSW Step 4
** ERROR: program failed in Step 4

------ CRASH LOG ------------------------------**
Fatal Signal 11 (SIGSEGV) received
… recent internal history …
+++++++mri_free [7]: {ENTRY (file=mri_free.c line=49) from IW3D_cleanup_improvement {2335 ms}
-------mri_free [7]: EXIT} (file=mri_free.c line=50) to IW3D_cleanup_improvement {2335 ms}
+++++++mri_free [7]: {ENTRY (file=mri_free.c line=49) from IW3D_cleanup_improvement {2335 ms}
-------mri_free [7]: EXIT} (file=mri_free.c line=50) to IW3D_cleanup_improvement {2335 ms}
+++++++IW3D_destroy [7]: {ENTRY (file=mri_nwarp.c line=960) from IW3D_cleanup_improvement {2335 ms}
-------IW3D_destroy [7]: EXIT} (file=mri_nwarp.c line=967) to IW3D_cleanup_improvement {2335 ms}
+++++++IW3D_destroy [7]: {ENTRY (file=mri_nwarp.c line=960) from IW3D_cleanup_improvement {2335 ms}
-------IW3D_destroy [7]: EXIT} (file=mri_nwarp.c line=967) to IW3D_cleanup_improvement {2335 ms}
+++++++IW3D_destroy [7]: {ENTRY (file=mri_nwarp.c line=960) from IW3D_cleanup_improvement {2335 ms}
-------IW3D_destroy [7]: EXIT} (file=mri_nwarp.c line=967) to IW3D_cleanup_improvement {2335 ms}
+++++++INCOR_destroy [7]: {ENTRY (file=thd_incorrelate.c line=1865) from IW3D_cleanup_improvement {2335 ms}
-------INCOR_destroy [7]: EXIT} (file=thd_incorrelate.c line=1867) to IW3D_cleanup_improvement {2335 ms}
------IW3D_cleanup_improvement [6]: EXIT} (file=mri_nwarp.c line=10245) to IW3D_setup_for_improvement {2335 ms}
++++++mri_to_float [6]: {ENTRY (file=mri_to_float.c line=19) from IW3D_setup_for_improvement {2335 ms}
+++++++mri_new_7D_generic [7]: {ENTRY (file=mri_new.c line=48) from mri_to_float {2335 ms}
-------mri_new_7D_generic [7]: EXIT} (file=mri_new.c line=143) to mri_to_float {2339 ms}
+++++++mri_add_name [7]: {ENTRY (file=mri_add_name.c line=19) from mri_to_float {2345 ms}
-------mri_add_name [7]: EXIT} (file=mri_add_name.c line=24) to mri_to_float {2345 ms}
------mri_to_float [6]: EXIT} (file=mri_to_float.c line=94) to IW3D_setup_for_improvement {2358 ms}
++++++mri_to_float [6]: {ENTRY (file=mri_to_float.c line=19) from IW3D_setup_for_improvement {2358 ms}
+++++++mri_new_7D_generic [7]: {ENTRY (file=mri_new.c line=48) from mri_to_float {2358 ms}
-------mri_new_7D_generic [7]: EXIT} (file=mri_new.c line=143) to mri_to_float {2361 ms}
+++++++mri_add_name [7]: {ENTRY (file=mri_add_name.c line=19) from mri_to_float {2370 ms}
-------mri_add_name [7]: EXIT} (file=mri_add_name.c line=24) to mri_to_float {2370 ms}
------mri_to_float [6]: EXIT} (file=mri_to_float.c line=94) to IW3D_setup_for_improvement {2383 ms}
++++++mri_interior_edgeize [6]: {ENTRY (file=mri_intedge.c line=19) from IW3D_setup_for_improvement {2383 ms}
+++++++mri_maxabs [7]: {ENTRY (file=mri_max.c line=98) from mri_interior_edgeize {2383 ms}
-------mri_maxabs [7]: EXIT} (file=mri_max.c line=129) to mri_interior_edgeize {2396 ms}
+++++++mri_new_7D_generic [7]: {ENTRY (file=mri_new.c line=48) from mri_interior_edgeize {2396 ms}
-------mri_new_7D_generic [7]: EXIT} (file=mri_new.c line=143) to mri_interior_edgeize {2400 ms}
mri_interior_edgeize – call Extract_Gradient_Maxima_3D {2400 ms}

Last STATUS: call Extract_Gradient_Maxima_3D
mri_interior_edgeize
IW3D_setup_for_improvement
IW3D_warpomatic
IW3D_warp_s2bim
3dQwarp
** AFNI compile date = Dec 7 2020
** [[Precompiled binary macos_10.12_local: Dec 7 2020]]
** Program Crash **

Hi, Stuart-

That’s really weird, and sorry for the continued frustration with this.

Is this the same dataset that you had sent me just now?

Would you mind copy+pasting the output of


afni_system_check.py -check_all

as well?

–pt

Hi Paul,

No worries- this happens. And yes, same data that you have (though the issue is not restricted to this subject).

I had some issues with running 3dMVM and had to play with my R… I’m definitely worried about version issues.

thanks,

Stu

[NERH134684:~] whistu% afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture: 64bit
system: Darwin
release: 18.7.0
version: Darwin Kernel Version 18.7.0: Tue Nov 10 00:07:31 PST 2020
; root:xnu-4903.278.51~1/RELEASE_X86_64
distribution: 10.14.6
number of CPUs: 4
apparent login shell: csh
shell RC file: .cshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /Users/whistu/abin/afni
afni version : Precompiled binary macos_10.12_local: Dec 7 2020
: AFNI_20.3.03 ‘Vespasian’
AFNI_version.txt : AFNI_20.3.03, macos_10.12_local, Dec 07 2020
which python : /usr/bin/python
python version : 2.7.16
which R : /usr/local/bin/R
R version : R version 3.6.3 (2020-02-29) – “Holding the Windsock”
which tcsh : /bin/tcsh

instances of various programs found in PATH:
afni : 1 (/Users/whistu/abin/afni)
R : 1 (/Library/Frameworks/R.framework/Versions/3.6/Resources/bin/R)
python : 1 (/usr/bin/python)
python2 : 0
python3 : 0

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 : success

R RHOME : /Library/Frameworks/R.framework/Resources

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

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

++ module loaded: matplotlib.pyplot
module file : /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/pyplot.pyc

-------------------------------- env vars --------------------------------
PATH = /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/whistu/abin:/opt/X11/bin:/Users/whistu/abin

PYTHONPATH =
R_LIBS =
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH (sub-shell) = /opt/X11/lib/flat_namespace
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) =

------------------------------ 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 /Users/whistu/abin

------------------------------ OS specific -------------------------------
XQuartz version : 2.7.11

which brew : /usr/local/bin/brew
brew version : Homebrew 2.6.2

– for PyQt4 under brew, consider running:
brew install cartr/qt4/pyqt
** consider linking /usr/local/Cellar/gcc/9.2.0_2/lib/gcc/9/libgomp.1.dylib under /usr/local/lib
– consider installing glib under homebrew
++ found 1 dylib files under ‘/opt/X11/lib/flat_namespace’
– found ‘libXt’ dylib files:
/opt/X11/lib/flat_namespace/libXt.6.dylib
– recent OS X, cheating to check DYLD_LIBRARY_PATH in cur shell ‘csh’…
++ found evar DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace

========================= summary, please fix: =========================

  • insufficient data for AFNI bootcamp

Thanks for sending that. Everything looks fine. Also, when I processed that dset, I was running it on a Mac, as well. Sooooo… hmmph.

Is there more text output from running the script, by any chance? Like the full output? You could email it to me or put it in the upload folder, if that is easier. That might help show some more ideas.

Another thought is: you have 4 CPUs on your computer, and you are using 4 CPUs for this SSW command-- perhaps if you have other applications running at the same time (like a web browser, which can be quite greedy on RAM), then memory is getting used up? If that were the case, I would expect the word “Killed” to appear in the terminal output (that is used in a technical sense when, as your OS will “kill” a process if starts asking for too much computer memory).

–pt

Hey Stu, it is good to hear from you!

Running out of memory still seems the likely culprit.

Paul, what does that message, " +++ Arranging 3 images (each 416x560) into a 3x1 matrix." imply?
Does it imply the relevant dataset covers 416 x 560 voxels? And would that mean there is a big origin shift?

My interpretation is that the “killed” operation (from the operating systems) should be more common on shared clusters, where if it detects that if a process is using too much RAM, it is killed. That suggests that the program memory allocation succeeds, but then the OS decides after the fact that the process is using too much RAM and kills it. More commonly on smaller, personal systems, the actual memory allocation fails, and then the program tries to dereference the resulting NULL pointer and crashes with a seg fault for accessing invalid memory. It seems likely that this SIGSEGV crash is still from a lack of RAM.

Indeed, using 4 CPUs might multiply RAM usage by 4. How much RAM does this machine have?

Consider dropping OMP_NUM_THREADS to 1 or 2, and see what effect that has. And as Paul suggests, close other greedy programs (like Office tools).

  • rick

Howdy-

Rick asked about this message:


+++ Arranging 3 images (each 416x560) into a 3x1 matrix.
You can view image ../init_qc_00_overlap_usrc_obase.jpg with:
aiv ../init_qc_00_overlap_usrc_obase.jpg
\n+* Removing temporary workdir 'o.aw_sub/__workdir_olap_rTdGepEA8Og*'\n

… it actually just comes from the initial QC image, showing the starting alignment. It is from the script @djunct_overlap_check, which is calling 2dcat here to glue a few images together to make “init_qc_00_overlap_usrc_obase.jpg”. I don’t expect this is a problem.

The @SSwarper script gets to Step #4 before crashing-- that is a 3dQwarper step, which might indeed involve a lot of memory. I actually am trying to process the same dset on my Mac with OMP_NUM_THREADS set explicitly to 3, just to see how that goes (I expect it should be fine, just slower than when using the default 8). To do this, in a tcsh script, you could have:


#!/bin/tcsh

setenv OMP_NUM_THREADS 3

@SSwarper ... [rest of command]

If you had a bash script, I think you would do this with:


#!/bin/bash

export OMP_NUM_THREADS=3

@SSwarper ... [rest of command]

–pt

Thanks, PT. I was wondering if the 416x560 was part of the Qwarp dataset dimensions (to make a dataset with grid overlap), but I guess that is not the case.

  • rick

Hi Rick and Paul,

So, using 3 threads worked for one subject, but doesn’t work for other subjects. I’ve posted the data and the output of 3 subjects on the box account.

Please let me know if I can get you anything else to help sort this out.

thanks guys!

Stu

Hi Stu,

If using 3 threads fails, I think you may be stuck dropping it down to 2. That is the least work for you, though it would make the program take longer.

There might be other methods to help this though, such as better initial centering of the datastes (@Align_Centers), possibly based on obliquity (3drefit -oblique_recenter). If the datasets start closer together, then Qwarp needs less memory.

  • rick

Hi Rick,

Using only 2 threads, is an improvement, in the sense that its now finishing about half of the participants correctly. I’m running Mac 10.14.6, R 3.6.3, and my binaries are up-to-date. Any thoughts on problems to check or adjustments to make to operating systems/software?

Thanks,

Stu