[RESOLVED] Error in hcp_msmall - matlab command not found

Hi there!

I am having issues with hcp_msmall, raising a bash error: “matlab: command not found”. All other parts of the pipeline work seamlessly :slight_smile:

I am running QuNex from the docker container, version 0.98.1.
I ran the pipeline through qunex_container without noticeable problems, up to hcp_msmall. Specifically, hcp_icafix finished successfully.
I have 6 BOLDs:
BOLD1 = rest
BOLD2-6 = task

The error says that matlab is an unknown command. Indeed, when running an interactive bash inside the container I found out matlab is an unrecognized command, and that /usr/local/bin does not contain matlab (but does contain R, octave, etc.).

Call:

qunex_container hcp_msmall     
--batchfile="${STUDY_FOLDER}/processing/batch.txt"     
--sessionsfolder="${STUDY_FOLDER}/sessions"     
--sessions="${SESSIONS}"     
--hcp_icafix_bolds="1,2,3,4,5,6"     
--hcp_msmall_bolds="1"     
--dockeropt="-v ${BIND_FOLDER}:${BIND_FOLDER}"    
--hcp_matlab_mode="interpreted"    
--container="${QUNEX_CONTAINER}"

Running inside container bash:

docker container run -it gitlab.qunex.yale.edu:5002/qunex/qunexcontainer:0.98.1 bash 
(qunex) [fe0dfbd8a398 qunex]$ matlab
bash: matlab: command not found
(qunex) [fe0dfbd8a398 qunex]$ ls -la /usr/local/bin/
total 1644
drwxr-xr-x 1 root root    4096 Jul 13  2023 .
drwxr-xr-x 1 root root    4096 Jun  4  2023 ..
lrwxrwxrwx 1 root root      15 Jul 13  2023 mkoctfile -> mkoctfile-4.4.1
-rwxr-xr-x 1 root root 1113728 Jul 13  2023 mkoctfile-4.4.1
lrwxrwxrwx 1 root root      22 Jun  4  2023 nsys -> /etc/alternatives/nsys
lrwxrwxrwx 1 root root      25 Jun  4  2023 nsys-ui -> /etc/alternatives/nsys-ui
lrwxrwxrwx 1 root root      12 Jul 13  2023 octave -> octave-4.4.1
-rwxr-xr-x 1 root root  146632 Jul 13  2023 octave-4.4.1
lrwxrwxrwx 1 root root      16 Jul 13  2023 octave-cli -> octave-cli-4.4.1
-rwxr-xr-x 1 root root  122112 Jul 13  2023 octave-cli-4.4.1
lrwxrwxrwx 1 root root      19 Jul 13  2023 octave-config -> octave-config-4.4.1
-rwxr-xr-x 1 root root  248408 Jul 13  2023 octave-config-4.4.1
-rwxr-xr-x 1 root root    8872 Jun  4  2023 R
-rwxr-xr-x 1 root root   24904 Jun  4  2023 Rscript
(qunex) [fe0dfbd8a398 qunex]$

Logs:
Here is the relevant part of the log (the full file is attached too):

...
Sun Feb 11 13:29:34 EST 2024:MSMAll.sh: Resample the atlas instead of the timeseries
Sun Feb 11 13:30:52 EST 2024:MSMAll.sh: addpath '/opt/HCP/HCPpipelines/global/matlab/cifti-matlab'; addpath '/opt/HCP/HCPpipelines/global/matlab'; addpath '/opt/HCP/HCPpipelines/MSMAll/scripts'; MSMregression('/home/docker/volumes/hcppipelines/asaf_decoy_mouse/decoy/sessions/006/hcp/006/MNINonLinear/fsaverage_LR32k/006.atlas_RSNs_d40_MSMSulc.32k_fs_LR.dscalar.nii','/home/docker/volumes/hcppipelines/asaf_decoy_mouse/decoy/sessions/006/hcp/006/MNINonLinear/Results/rfMRI_REST/rfMRI_REST_Atlas_hp2000_clean_vn.dtseries.nii','/opt/HCP/HCPpipelines/global/templates/MSMAll/rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_d40_ROW_vn/Weights.txt','/home/docker/volumes/hcppipelines/asaf_decoy_mouse/decoy/sessions/006/hcp/006/MNINonLinear/fsaverage_LR32k/006.individual_RSNs_d40_MSMSulc.32k_fs_LR','/home/docker/volumes/hcppipelines/asaf_decoy_mouse/decoy/sessions/006/hcp/006/MNINonLinear/fsaverage_LR32k/006.individual_RSNs_d40_weights.32k_fs_LR.dscalar.nii','/opt/workbench/workbench/bin_rh_linux64/wb_command','WRN','/home/docker/volumes/hcppipelines/asaf_decoy_mouse/decoy/sessions/006/hcp/006/MNINonLinear/Native/MSMAll_InitialReg_1_d40_WRN/Params.txt','NO',0,'NO','NO');
/opt/HCP/HCPpipelines/MSMAll/scripts/MSMAll.sh: line 292: matlab: command not found
Sun Feb 11 13:30:52 EST 2024:MSMAll.sh: While running '/opt/HCP/HCPpipelines/MSMAll/scripts/MSMAll.sh --path=/home/docker/volumes/hcppipelines/asaf_decoy_mouse/decoy/sessions/006/hcp --subject=006 --high-res-mesh=164 --low-res-mesh=32 --output-fmri-name=rfMRI_REST --fmri-proc-string=_Atlas_hp2000_clean_vn --input-pca-registration-name=MSMSulc --input-registration-name=MSMSulc --registration-name-stem=MSMAll_InitialReg --rsn-target-file=/opt/HCP/HCPpipelines/global/templates/MSMAll/rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_dREPLACEDIM_ROW_vn/melodic_oIC.dscalar.nii --rsn-cost-weights=/opt/HCP/HCPpipelines/global/templates/MSMAll/rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_dREPLACEDIM_ROW_vn/Weights.txt --myelin-target-file=/opt/HCP/HCPpipelines/global/templates/MSMAll/Q1-Q6_RelatedParcellation210.MyelinMap_BC_MSMAll_2_d41_WRN_DeDrift.32k_fs_LR.dscalar.nii --topography-roi-file=/opt/HCP/HCPpipelines/global/templates/MSMAll/Q1-Q6_RelatedParcellation210.atlas_Topographic_ROIs.32k_fs_LR.dscalar.nii --topography-target-file=/opt/HCP/HCPpipelines/global/templates/MSMAll/Q1-Q6_RelatedParcellation210.atlas_Topography.32k_fs_LR.dscalar.nii --iterations=CA_CAT --method=WRN --use-migp=NO --ica-dim=40 --regression-params=7@8@9@10@11@12@13@14@15@16@17@18@19@20@21 --vn=NO --rerun=YES --reg-conf=/opt/HCP/HCPpipelines/MSMConfig/MSMAllStrainFinalconf1to1_1to3 --reg-conf-vars=NONE --msm-all-templates=/opt/HCP/HCPpipelines/global/templates/MSMAll --use-ind-mean=YES --matlab-run-mode=1':
Sun Feb 11 13:30:52 EST 2024:MSMAll.sh: While running '/opt/HCP/HCPpipelines/MSMAll/scripts/MSMAll.sh --path=/home/docker/volumes/hcppipelines/asaf_decoy_mouse/decoy/sessions/006/hcp --subject=006 --high-res-mesh=164 --low-res-mesh=32 --output-fmri-name=rfMRI_REST --fmri-proc-string=_Atlas_hp2000_clean_vn --input-pca-registration-name=MSMSulc --input-registration-name=MSMSulc --registration-name-stem=MSMAll_InitialReg --rsn-target-file=/opt/HCP/HCPpipelines/global/templates/MSMAll/rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_dREPLACEDIM_ROW_vn/melodic_oIC.dscalar.nii --rsn-cost-weights=/opt/HCP/HCPpipelines/global/templates/MSMAll/rfMRI_REST_Atlas_MSMAll_2_d41_WRN_DeDrift_hp2000_clean_PCA.ica_dREPLACEDIM_ROW_vn/Weights.txt --myelin-target-file=/opt/HCP/HCPpipelines/global/templates/MSMAll/Q1-Q6_RelatedParcellation210.MyelinMap_BC_MSMAll_2_d41_WRN_DeDrift.32k_fs_LR.dscalar.nii --topography-roi-file=/opt/HCP/HCPpipelines/global/templates/MSMAll/Q1-Q6_RelatedParcellation210.atlas_Topographic_ROIs.32k_fs_LR.dscalar.nii --topography-target-file=/opt/HCP/HCPpipelines/global/templates/MSMAll/Q1-Q6_RelatedParcellation210.atlas_Topography.32k_fs_LR.dscalar.nii --iterations=CA_CAT --method=WRN --use-migp=NO --ica-dim=40 --regression-params=7@8@9@10@11@12@13@14@15@16@17@18@19@20@21 --vn=NO --rerun=YES --reg-conf=/opt/HCP/HCPpipelines/MSMConfig/MSMAllStrainFinalconf1to1_1to3 --reg-conf-vars=NONE --msm-all-templates=/opt/HCP/HCPpipelines/global/templates/MSMAll --use-ind-mean=YES --matlab-run-mode=1':
Sun Feb 11 13:30:52 EST 2024:MSMAll.sh: ERROR: 'matlab -nojvm -nodisplay -nosplash' command failed with return code: 127
Sun Feb 11 13:30:52 EST 2024:MSMAll.sh: ERROR: 'matlab -nojvm -nodisplay -nosplash' command failed with return code: 127

===> ERROR: Command returned with nonzero exit code
---------------------------------------------------
         script: MSMAll.sh
stopped at line: 292
           call: "${interpreter[@]}" <<< "$matlabCode"
       hostname: 1f38e62cc105
      exit code: 127
---------------------------------------------------

===> Aborting execution!
...

error_hcp_msmall_rfMRI_REST_006_2024-02-11_13.29.25.700848.log (26.5 KB)

If there any other logs that are needed please let me know.

Thanks in advance!
Asaf

Hi Asaf,

Welcome to the QuNex forum. The problem is in the parameter setting below:

Interpreted MATLAB can only be used when you are not using a container but you setup QuNex manually on your system and also install MATLAB. When you are using the container, you should skip this parameter. If you skip it, parameter value will be set to compiled, which is the version of MATLAB that should be used in the container.

Let me know how it goes.

Best, Jure

Oh, that’s great. Now it works.
Thanks for such a quick reply, Jure!