Hi again,
Running 3dMVM on a 500 GB RAM system. I can’t tell if this is a memory (RAM) issue or something else.
3dMVM with -resid has worked before on this server with about 1800 subjects. Now I’m running with 2700 subjects. The results files are generated but not the residuals. I get this error:
*** caught segfault ***
address 0x7f79f8cbf820, cause 'memory not mapped'
Traceback:
1: write.c.AFNI(filename, dset = brk, label = label, space = space, note = note, origin = origin, delta = delta, orient = orient, idcode = idcode, defhead = defhead, verb = verb, maskinf = maskinf, scale = scale, addFDR = addFDR, statsym = statsym, view = view, com_hist = com_hist, type = type, TR = TR, overwrite = overwrite)
2: write.AFNI(lop$resid, out[, , , (NoBrick + 1):(NoBrick + (!is.null(lop$resid)) * nrow(lop$dataStr)), drop = FALSE], label = NULL, defhead = head, idcode = newid.AFNI(), com_hist = lop$com_history, type = "MRI_float", scale = FALSE)
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault
We are trying an analysis with quite some covariates that we want to correct for, so this is the command:
3dMVM -prefix results -jobs 15 -dataTable @table.txt -mask ../GM_mask.nii.gz -resid residuals \
-bsVars "PRS*MDDstatus*array+age+drinking+smoking+PC1+PC2+PC3+PC4+PC5+PC6+X_loc+Y_loc+Z_loc+X_fov+Y_fov+Z_fov" \
-qVars "age,drinking,smoking,PC1,PC2,PC3,PC4,PC5,PC6,X_loc,Y_loc,Z_loc,X_fov,Y_fov,Z_fov"
Where we are interested in PRS and MDDstatus
array is a categorical variable that we want to “correct” for.
The following are all quantitative variables we want to “correct” for as well.
age+drinking+smoking+PC1+PC2+PC3+PC4+PC5+PC6+X_loc+Y_loc+Z_loc+X_fov+Y_fov+Z_fov
This is a snipped from the table:
Subj PRS MDDstatus age drinking smoking array PC1 PC2 PC3 PC4 PC5 PC6 X_loc Y_loc Z_loc X_fov Y_fov Z_fov InputFile
1001008 HighPRS cMDD 49 4 0 one -12.0098 4.05069 -2.28523 1.3164200000000001 -4.06671 -1.6778 1.9178400000000002 58 -44.1087 167 222 210 ../../struc/s_2_T1_1001008_20252_2_0_HighPRS_cMDD_female_struc_GM_to_template_GM_mod.nii.gz
1001794 HighPRS CTL 77 3 0 one -14.285 4.48078 -3.0890400000000002 3.11305 11.2623 0.775404 -2.2406 74 -55.1268 177 240 228 ../../struc/s_2_T1_1001794_20252_2_0_HighPRS_CTL_female_struc_GM_to_template_GM_mod.nii.gz
1004009 HighPRS rMDD 56 4 0 one -12.4654 3.3837300000000003 -1.7773700000000001 1.47738 -8.0986 -3.11829 0.25755500000000003 64 -22.6047 161 222 181 ../../struc/s_2_T1_1004009_20252_2_0_HighPRS_rMDD_female_struc_GM_to_template_GM_mod.nii.gz
My installation looks good:
afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture: 64bit
system: Linux
release: 3.10.0-1160.45.1.el7.x86_64
version: #1 SMP Wed Oct 13 17:20:51 UTC 2021
distribution: CentOS Linux 7.9.2009 Core
number of CPUs: 72
apparent login shell: bash
shell RC file: .bashrc (exists)
--------------------- AFNI and related program tests ---------------------
which afni : /usr/local/afni/afni
afni version : Precompiled binary linux_centos_7_64: Oct 12 2021
: AFNI_21.3.01 'Trajan'
AFNI_version.txt : AFNI_21.3.01, linux_centos_7_64, Oct 12 2021
which python : /opt/conda/3/2019.10/bin/python
python version : 3.7.4
which R : /bin/R
R version : R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
which tcsh : /bin/tcsh
instances of various programs found in PATH:
afni : 1 (/usr/local/afni/afni)
R : 1 (/usr/bin/R)
python : 2
/opt/conda/3/2019.10/bin/python3.7
/usr/bin/python2.7
python2 : 1 (/usr/bin/python2.7)
python3 : 2
/opt/conda/3/2019.10/bin/python3.7
/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 : success
R RHOME : /usr/lib64/R
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
++ module loaded: matplotlib.pyplot
module file : /opt/conda/3/2019.10/lib/python3.7/site-packages/matplotlib/pyplot.py
-------------------------------- env vars --------------------------------
PATH = /usr/local/cuda-10.2/bin:/usr/local/cuda-10.2/bin:/opt/conda/3/2019.10/bin:/opt/conda/3/2019.10/condabin:/usr/lib/qt-3.3/bin:/bin:/usr/bin:/opt/thinlinc/bin:/usr/local/bin:/usr/bin/X11:/sbin:/usr/sbin:/usr/local/sbin:/opt/puppetlabs/bin:/usr/local/afni:/usr/local/afni
PYTHONPATH =
R_LIBS = /home/robka95/R/x86_64-redhat-linux-gnu-library/3.6/
LD_LIBRARY_PATH = /usr/local/cuda-10.2/lib64
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 /usr/local/afni
------------------------------ OS specific -------------------------------
which yum : /bin/yum
yum version : 3.4.3
========================= summary, please fix: =========================
* just be aware: login shell 'bash', but our code examples use 'tcsh'
* shell bash: MISSING login setup file, e.g. .bash_profile
* shell bash: consider sourcing (non-login) .bashrc from (login) .bash_profile
* please run: cp /usr/local/afni/AFNI.afnirc ~/.afnirc
* please run: "suma -update_env" for .sumarc
* please run: apsearch -update_all_afni_help
* insufficient data for AFNI bootcamp
Is this simply running out of memory or is it something else?
Bonus question:
In the results file, I see the expected main effects of PRS, MDD, array and their interactions. I also see the result from each q-var. Are the results from the q-vars also taking the full model into account? I.e. if a q-var, like drinking, is signficiant, that’s not biased due to drinkers also are smoking, since we also have the smoking qvar in there?
Thanks!