The appendix contains helpful information that is more general to running programs than specific to any process.
A.1 List a Variable from .json File for All Participants
Depending on what variable you want to look at, change which .json files to look through. In the example below, you are searching through the T1w files and grabbing slice thickness. You can change the grep to look for other lines in your .json file. Grep is a Unix command used to search files for the occurrence of a string of characters that matches a specified pattern.
for i in $(find ~/BIDS/ACAP -type f -name "*T1w.json"); do grep -Ha "SliceThickness" $i done
A.2 Run an Interactive Session on Compute Node
If you need to test code, you can run an interactive session on a compute node. Remember that you cannot run code on the head node, because anything running longer than 5 minutes will be automatically cancelled. Also it’s really not good to push the head node into doing any computations.
salloc --mem-per-cpu=16G --nodes=1 --ntasks=1 --time='02:00:00'
A.3 Job Cancelled Due to Time Limit
If you ever need to check whether a job didn’t finish because of a time limit.
for i in $(ls ~/logfiles/ACAP/20190122-181229/); do grep -Hn "DUE TO TIME LIMIT" ~/logfiles/ACAP/20190122-181229/$i done
You will get a list with the filename that shows you when hit your walltime. You will have to go back to your job script and edit the walltime to allow for more time and rerun the few participants or all the participants if their process didn’t complete.
If you want to just run a few participants you can just type their sbatch code.
sbatch \ -o ~/logfiles/ACAP/20190122-181229/output_sub-ACAP1147_ses-BL.txt \ -e ~/logfiles/ACAP/20190122-181229/error_sub-ACAP1147_ses-BL.txt \ ~/scripts/ACAP/antsCT-job.sh \ sub-ACAP1147_ses-BL
Or resubmit the batch script if most participants need to be rerun.