Hi all,
Firstly, I’ve asked a couple of questions here recently as our group gets up to speed with using HCP processing and the support is very timely and helpful, so thank you!
My issue is in running the hcp_pre_freesurfer command. For each session, I get the message that the command has exited with error code 1 and am directed to a log file (pasted below). There is a Python error that I’ve googled and traced to having something to do with the LD_LIBRARY_PATH environment variable, according to these posts: Trying to run hp-toolbox from HPLIP but gives python errors - Ask Ubuntu, 14.04 - Python Error when opening software-center - Ask Ubuntu)
Here is a minimal example to re-create the error. Running the offending line outside of the QuNex container:
jj1006 :python
Python 3.6.8 (default, May 8 2021, 09:11:34)
[GCC 8.4.1 20210423 (Red Hat 8.4.1-2)] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
from pyexpat import *
exit()
No error. Now within the container:
erso[0]:opt$ python
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
from pyexpat import *
Traceback (most recent call last):
File “”, line 1, in
ImportError: /usr/lib64/python3.6/lib-dynload/pyexpat.cpython-36m-x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt
I’d greatly appreciate any insight.
Best,
John
Full log file:
Generated by QuNex 0.91.11 on 2021-11-08_10.26.1636385181
Running external command via QuNex:
PreFreeSurfer/PreFreeSurferPipeline.sh \
–path=“/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp” \
–subject=“170508_4PR00011” \
–t1=“/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/unprocessed/T1w/170508_4PR00011_T1w_MPR1.nii.gz@/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/unprocessed/T1w/170508_4PR00011_T1w_MPR2.nii.gz” \
–t2=“/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/unprocessed/T2w/170508_4PR00011_T2w_SPC1.nii.gz@/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/unprocessed/T2w/170508_4PR00011_T2w_SPC2.nii.gz” \
–t1template=“global/templates/MNI152_T1_0.8mm.nii.gz” \
–t1templatebrain=“global/templates/MNI152_T1_0.8mm_brain.nii.gz” \
–t1template2mm=“global/templates/MNI152_T1_2mm.nii.gz” \
–t2template=“global/templates/MNI152_T2_0.8mm.nii.gz” \
–t2templatebrain=“global/templates/MNI152_T2_0.8mm_brain.nii.gz” \
–t2template2mm=“global/templates/MNI152_T2_2mm.nii.gz” \
–templatemask=“global/templates/MNI152_T1_0.8mm_brain_mask.nii.gz” \
–template2mmmask=“global/templates/MNI152_T1_2mm_brain_mask_dil.nii.gz” \
–brainsize=“150” \
–fnirtconfig=“global/config/T1_2_MNI152_2mm.cnf” \
–t1samplespacing=“0.0000021” \
–t2samplespacing=“0.0000021” \
–gdcoeffs=“/autofs/space/nihilus_001/users/john/logistics/scanner_info/coeff.grad” \
–avgrdcmethod=“NONE” \
–processing-mode=“HCPStyleData”
Test file:
/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/MNINonLinear/T1w_restore_brain.nii.gz
========================================
DIRECTORY: /opt/HCP/HCPpipelines
PRODUCT: HCP Pipeline Scripts
VERSION: v4.3.0
Mon Nov 8 10:26:21 EST 2021:PreFreeSurferPipeline.sh: HCPPIPEDIR: /opt/HCP/HCPpipelines
Mon Nov 8 10:26:21 EST 2021:PreFreeSurferPipeline.sh: FSLDIR: /opt/fsl/fsl
Mon Nov 8 10:26:21 EST 2021:PreFreeSurferPipeline.sh: HCPPIPEDIR_Global: /opt/HCP/HCPpipelines/global/scripts
Mon Nov 8 10:26:21 EST 2021:PreFreeSurferPipeline.sh: Platform Information Follows:
Linux erso.nmr.mgh.harvard.edu 4.18.0-310.el8.x86_64 #1 SMP Tue Jun 8 00:24:50 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Mon Nov 8 10:26:21 EST 2021:PreFreeSurferPipeline.sh: Parsing Command Line Options
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: Finished Parsing Command Line Options
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: StudyFolder: /autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: Subject: 170508_4PR00011
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T1wInputImages: /autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/unprocessed/T1w/170508_4PR00011_T1w_MPR1.nii.gz@/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/unprocessed/T1w/170508_4PR00011_T1w_MPR2.nii.gz
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T2wInputImages: /autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/unprocessed/T2w/170508_4PR00011_T2w_SPC1.nii.gz@/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/unprocessed/T2w/170508_4PR00011_T2w_SPC2.nii.gz
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T1wTemplate: global/templates/MNI152_T1_0.8mm.nii.gz
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T1wTemplateBrain: global/templates/MNI152_T1_0.8mm_brain.nii.gz
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T1wTemplate2mm: global/templates/MNI152_T1_2mm.nii.gz
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T2wTemplate: global/templates/MNI152_T2_0.8mm.nii.gz
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T2wTemplateBrain: global/templates/MNI152_T2_0.8mm_brain.nii.gz
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T2wTemplate2mm: global/templates/MNI152_T2_2mm.nii.gz
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: TemplateMask: global/templates/MNI152_T1_0.8mm_brain_mask.nii.gz
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: Template2mmMask: global/templates/MNI152_T1_2mm_brain_mask_dil.nii.gz
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: BrainSize: 150
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: FNIRTConfig: global/config/T1_2_MNI152_2mm.cnf
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: MagnitudeInputName:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: PhaseInputName:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: GEB0InputName:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: TE:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: SpinEchoPhaseEncodeNegative:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: SpinEchoPhaseEncodePositive:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: SEEchoSpacing:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: SEUnwarpDir:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T1wSampleSpacing: 0.0000021
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T2wSampleSpacing: 0.0000021
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: UnwarpDir:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: GradientDistortionCoeffs: /autofs/space/nihilus_001/users/john/logistics/scanner_info/coeff.grad
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: AvgrdcSTRING: NONE
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: TopupConfig:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: BiasFieldSmoothingSigma:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: UseJacobian: true
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T1wBiasCorrect:
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: CustomBrain: NONE
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: ProcessingMode: HCPStyleData
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T1wFolder: /autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/T1w
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: T2wFolder: /autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/T2w
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: AtlasSpaceFolder: /autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/MNINonLinear
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: POSIXLY_CORRECT=
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: Processing Modality: T1w
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: Performing Gradient Nonlinearity Correction
Mon Nov 8 10:26:22 EST 2021:PreFreeSurferPipeline.sh: mkdir -p /autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/T1w/T1w1_GradientDistortionUnwarp
GradientDistortionUnwarp.sh: HCPPIPEDIR: /opt/HCP/HCPpipelines
GradientDistortionUnwarp.sh: FSLDIR: /opt/fsl/fsl
Mon Nov 8 10:26:23 EST 2021:GradientDistortionUnwarp.sh: START
Traceback (most recent call last):
File “/autofs/space/nihilus_001/users/john/analyses/pyenv/bin/gradient_unwarp.py”, line 11, in
from gradunwarp.core import (globals, coeffs, utils)
File “/autofs/space/nihilus_001/users/john/analyses/pyenv/lib64/python3.6/site-packages/gradunwarp/core/init.py”, line 8, in
from .unwarp_resample import Unwarper
File “/autofs/space/nihilus_001/users/john/analyses/pyenv/lib64/python3.6/site-packages/gradunwarp/core/unwarp_resample.py”, line 20, in
import nibabel as nib
File “/autofs/space/nihilus_001/users/john/analyses/pyenv/lib64/python3.6/site-packages/nibabel/init.py”, line 47, in
from .loadsave import load, save
File “/autofs/space/nihilus_001/users/john/analyses/pyenv/lib64/python3.6/site-packages/nibabel/loadsave.py”, line 18, in
from .imageclasses import all_image_classes
File “/autofs/space/nihilus_001/users/john/analyses/pyenv/lib64/python3.6/site-packages/nibabel/imageclasses.py”, line 13, in
from .cifti2 import Cifti2Image
File “/autofs/space/nihilus_001/users/john/analyses/pyenv/lib64/python3.6/site-packages/nibabel/cifti2/init.py”, line 20, in
from .parse_cifti2 import Cifti2Extension
File “/autofs/space/nihilus_001/users/john/analyses/pyenv/lib64/python3.6/site-packages/nibabel/cifti2/parse_cifti2.py”, line 15, in
from .cifti2 import (Cifti2MetaData, Cifti2Header, Cifti2Label,
File “/autofs/space/nihilus_001/users/john/analyses/pyenv/lib64/python3.6/site-packages/nibabel/cifti2/cifti2.py”, line 22, in
from … import xmlutils as xml
File “/autofs/space/nihilus_001/users/john/analyses/pyenv/lib64/python3.6/site-packages/nibabel/xmlutils.py”, line 15, in
from xml.parsers.expat import ParserCreate
File “/usr/lib64/python3.6/xml/parsers/expat.py”, line 4, in
from pyexpat import *
ImportError: /usr/lib64/python3.6/lib-dynload/pyexpat.cpython-36m-x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt
Mon Nov 8 10:26:26 EST 2021:GradientDistortionUnwarp.sh: While running ‘/opt/HCP/HCPpipelines/global/scripts/GradientDistortionUnwarp.sh --workingdir=/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/T1w/T1w1_GradientDistortionUnwarp --coeffs=/autofs/space/nihilus_001/users/john/logistics/scanner_info/coeff.grad --in=/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/T1w/T1w1_GradientDistortionUnwarp/T1w1 --out=/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/T1w/T1w1_gdc --owarp=/autofs/cluster/bang/TAW_New/fMRI_processing/qunex/study_main/sessions/170508_4PR00011/hcp/170508_4PR00011/T1w/xfms/T1w1_gdc_warp’:
Mon Nov 8 10:26:26 EST 2021:GradientDistortionUnwarp.sh: ERROR: ‘gradient_unwarp.py’ command failed with return code: 1
Mon Nov 8 10:26:26 EST 2021:GradientDistortionUnwarp.sh: ERROR: ‘gradient_unwarp.py’ command failed with return code: 1
===> ERROR: Command returned with nonzero exit code
script: GradientDistortionUnwarp.sh