Skip to content
Snippets Groups Projects
Commit 8b2d65cc authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

MNT: Run GPU jobs via fsl_sub, so they can be run locally or on the cluster

parent 706fd549
No related branches found
No related tags found
1 merge request!56MNT: Run GPU jobs via fsl_sub, so they can be run locally or on the cluster
Pipeline #19310 skipped
......@@ -8,4 +8,9 @@ indir=$(pwd)
pushd $outdir
cp -r $indir/bedpost .
bedpostx_gpu bedpost
job_id=$(fsl_sub --coprocessor=cuda bedpostx_gpu bedpost)
touch ${outdir}/wait
fsl_sub --jobhold ${job_id} rm wait
while [ -e ${outdir}/wait ]; do
sleep 1m
done
......@@ -29,11 +29,18 @@ echo $indx > $dti_txt2
fslroi $dti $dti_b0 0 1
bet $dti_b0 $dti_b -f 0.2 -R -n -m
eddy \
--imain=$dti \
--mask=$dti_b --acqp=$dti_txt \
--index=$dti_txt2 \
--bvecs=$dti_bvec \
--bvals=$dti_bval \
--repol \
--out=$dti_u
job_id=$(fsl_sub --coprocessor=cuda eddy \
--imain=$dti \
--mask=$dti_b \
--acqp=$dti_txt \
--index=$dti_txt2 \
--bvecs=$dti_bvec \
--bvals=$dti_bval \
--repol \
--out=$dti_u)
touch ${outdir}/wait
fsl_sub --jobhold ${job_id} rm wait
while [ -e ${outdir}/wait ]; do
sleep 1m
done
......@@ -8,9 +8,15 @@ indir=$(pwd)
pushd $outdir
for i in {1..172}; do
probtrackx2_gpu -x $indir/masks/$i.nii.gz \
--dir=$indir/probtrackx/$i --forcedir -P 200 \
-s $indir/bedpost.bedpostX/merged \
-m $indir/bedpost.bedpostX/nodif_brain_mask \
--opd --pd -l -c 0.2 --distthresh=0
job_id=$(fsl_sub --coprocessor=cuda probtrackx2_gpu \
-x $indir/masks/$i.nii.gz \
--dir=$indir/probtrackx/$i --forcedir -P 200 \
-s $indir/bedpost.bedpostX/merged \
-m $indir/bedpost.bedpostX/nodif_brain_mask \
--opd --pd -l -c 0.2 --distthresh=0)
touch ${outdir}/wait
fsl_sub --jobhold ${job_id} rm wait
while [ -e ${outdir}/wait ]; do
sleep 1m
done
done
......@@ -27,7 +27,17 @@ echo "-------------"
echo "Running mmorf"
echo "-------------"
echo ""
mmorf --version --config ${MMORF_CONFIG}
# Use fsl_sub in case we are running on the
# cluster. This will just run normally if running
# locally (but fsl_sub will still return a job id
# that can be used in the subsequent hold call).
job_id=$(fsl_sub --coprocessor=cuda mmorf --version --config ${MMORF_CONFIG})
touch ${outdir}/wait
fsl_sub --jobhold ${job_id} rm wait
while [ -e ${outdir}/wait ]; do
sleep 1m
done
# Combine warps
echo ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment