5ttgen 'run_first_all' error

Dear MRtrix3 team,

I’m trying to run the 5ttgen command to conduct tissue segmentation in preparation for Anatomically Constrained Tractography (ACT). I encounter the following error when I try to do this:

$ 5ttgen fsl T1.coreg.nii 5tt_act.mif  
5ttgen: 
5ttgen: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
5ttgen: 
5ttgen: Generated temporary directory: /ibscratch/users/uqisaham/CAI_imaging/files_relevant_to_analysis/mrtrix3_Preprocessed_Data/C_S01_PZ_3T/HARDI/5ttgen-tmp-I8AC9V/
Command:  mrconvert /ibscratch/users/uqisaham/CAI_imaging/files_relevant_to_analysis/mrtrix3_Preprocessed_Data/C_S01_PZ_3T/HARDI/T1.coreg.nii /ibscratch/users/uqisaham/CAI_imaging/files_relevant_to_analysis/mrtrix3_Preprocessed_Data/C_S01_PZ_3T/HARDI/5ttgen-tmp-I8AC9V/input.mif
5ttgen: Changing to temporary directory (/ibscratch/users/uqisaham/CAI_imaging/files_relevant_to_analysis/mrtrix3_Preprocessed_Data/C_S01_PZ_3T/HARDI/5ttgen-tmp-I8AC9V/)
Command:  mrconvert input.mif T1.nii -stride -1,+2,+3
Command:  maskfilter /clusterdata/apps/fsl/data/standard/MNI152_T1_1mm_brain_mask_dil.nii.gz dilate mni_mask.nii -npass 4
Command:  standard_space_roi T1.nii T1_preBET.nii.gz -maskMASK mni_mask.nii -roiFOV
Command:  bet T1_preBET.nii.gz T1_BET.nii.gz -f 0.15 -R
Command:  fast T1_BET.nii.gz
Command:  run_first_all -s L_Accu,R_Accu,L_Caud,R_Caud,L_Pall,R_Pall,L_Puta,R_Puta,L_Thal,R_Thal -i T1.nii -o first
5ttgen: 
**5ttgen: [ERROR] Command failed: run_first_all -s L_Accu,R_Accu,L_Caud,R_Caud,L_Pall,R_Pall,L_Puta,R_Puta,L_Thal,R_Thal -i T1.nii -o first (fsl.py:168)**
5ttgen: Output of failed command:
The command you have requested cannot be found or is not executable
Unable to run job: denied: host "compute-0-0.local" is no submit host.
Exiting.
5ttgen: Changing back to original directory (/ibscratch/users/uqisaham/CAI_imaging/files_relevant_to_analysis/mrtrix3_Preprocessed_Data/C_S01_PZ_3T/HARDI)
5ttgen: Script failed while executing the command: run_first_all -s L_Accu,R_Accu,L_Caud,R_Caud,L_Pall,R_Pall,L_Puta,R_Puta,L_Thal,R_Thal -i T1.nii -o first
5ttgen: For debugging, inspect contents of temporary directory: /ibscratch/users/uqisaham/CAI_imaging/files_relevant_to_analysis/mrtrix3_Preprocessed_Data/C_S01_PZ_3T/HARDI/5ttgen-tmp-I8AC9V/

The input image is the recommended T1-weighted image co-registered to the diffusion imaging series as per the instructions here: http://mrtrix.readthedocs.io/en/latest/quantitative_structural_connectivity/act.html.

Initially I thought that the issue had something to do with path definition to FSL on our computers but this is not the case. FSL is working correctly and I was informed that it was recently updated on our computers.

Our IT team have asked that I contact you about this issue. I can’t run this command on head node so any suggestions to resolve this issue would be appreciated!

EDIT (04/09/2017): Another researcher at my institute has encountered the same error.

Kind regards,
Ishani

In case you’re still having this problem, I think the issue here is with FSL’s run_first_all trying to use the Sun Grid Engine (SGE) backend to launch jobs, when it is itself running from an SGE job. I’m guessing on your cluster, the system is configured not to allow compute nodes to submit jobs, which would explain this line in the output:

In which case, you would need to prevent run_first_all from trying to use SGE, and instead run on the local node. Judging from the other relevant threads related to SGE, it might be sufficient to modify your SGE job (the one that invokes 5ttgen) so that the SGE_ROOT environment variable is unset. Maybe by adding this line in the script before 5ttgen is invoked:

unset SGE_ROOT

or prefixing the 5ttgen call with SGE_ROOT="" to clear the variable, like this:

SGE_ROOT="" 5ttgen fsl T1.coreg.nii 5tt_act.mif

Hopefully one of these will work. The idea is to ensure fsl_sub doesn’t detect the presence of an SGE queue - hope that makes sense… More details about this on the FSL wiki.

2 Likes

Thank you very much!

I passed this along to our IT team and when prefixing 5ttgen with SGE_ROOT="" the 5ttgen script runs without incident.

Thank you again!