[RESOLVED] Seed-to-Roi fc using ROIExtract.sh

Description:

Cannot run ROIExtract function

Call:

/gpfs/project/fas/n3/software/qunex/connector/functions/ROIExtract.sh --roifile='/gpfs/project/fas/n3/software/qunex/library/data/parcellations/GlasserParcellation/Q1-Q6_RelatedParcellation210.LR.CorticalAreas_dil_Colors.32k_fs_LR_subcortexfilled.dscalar.nii' --inputfile='/gpfs/project/fas/n3/Studies/Pushkarskaya.OCD.MB/subjects/pb1047/images/functional/bold1_OCD_dACC_aDMN_pdACC_CIFTI_all_Fz.dscalar.nii' --outpath='/gpfs/project/fas/n3/Studies/Pushkarskaya.OCD.MB/analysis/' --outname='1047_bold1_pdACC_GlasserROI'

Logs:

No logs were generated in my study folder. The error message: Opening log file: /tmp/java/log.4362 
ERROR: ROIExtract generation did not complete correctly

** For an example of how to report an issue, please refer to this post.

It was a memory allocation issue. RESOLVED.

Hi Helen, you can also use the qunex or qunexContainer command to run this instead of calling the script directly. That way you can also specify the scheduler options and memory request in the command itself.
Something like:

--studyfolder="/gpfs/project/fas/n3/Studies/Pushkarskaya.OCD.MB/" \
--sessions="pb1047" \
--roifile='/gpfs/project/fas/n3/software/qunex/library/data/parcellations/GlasserParcellation/Q1-Q6_RelatedParcellation210.LR.CorticalAreas_dil_Colors.32k_fs_LR_subcortexfilled.dscalar.nii' \
--inputfile='/gpfs/project/fas/n3/Studies/Pushkarskaya.OCD.MB/subjects/pb1047/images/functional/bold1_OCD_dACC_aDMN_pdACC_CIFTI_all_Fz.dscalar.nii' \
--outpath='/gpfs/project/fas/n3/Studies/Pushkarskaya.OCD.MB/analysis/' \
--outname='1047_bold1_pdACC_GlasserROI' \
--scheduler="SLURM,time=1-00:00:00,ntasks=1,mem=20000,partition=day"```
1 Like

Lisa - just a few hours later the same problem is back. Neither of the versions works. same non specific error message. The previous solution - memory allocation does not help anymore.

I think it is an issue with how my account is set up. Lisa can run the code with no problems, but I can’t. Is it possible that ROiExtract routine tries to save some temporary output in some directory to which I don’t have access?

I checked the ROIExtract file:

– Completion check

if [[ -f ${outpath}/${outname}.csv ]]; then
echo β€œβ€
geho β€œ------------------------- Successful completion of work --------------------------------”
echo β€œβ€
else
reho β€œ------------------------- ERROR --------------------------------”
echo β€œβ€
reho " ROIExtract generation did not complete correctly."
echo β€œβ€
reho β€œ----------------------------------------------------------------”
fi

}

This means that I was never able to run the code. I only received the message that the code works because Lisa already generated the output.

Rachael found the issue.
I needed to run this line:
srun --pty -p day --time=6:00:00 --ntasks-per-node=1 --mem=10000 bash -l
before initiating the Matlab script.

I typically run
srun --pty -p day --time=6:00:00 --mem=10000 bash -l
but it was not sufficient.

That makes sense, the --ntasks-per-node=1 will force the scheduler to find enough memory on a single node to run the Matlab functions required for that step. Thanks for bringing this up Helen!