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) ...@@ -8,4 +8,9 @@ indir=$(pwd)
pushd $outdir pushd $outdir
cp -r $indir/bedpost . 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 ...@@ -29,11 +29,18 @@ echo $indx > $dti_txt2
fslroi $dti $dti_b0 0 1 fslroi $dti $dti_b0 0 1
bet $dti_b0 $dti_b -f 0.2 -R -n -m bet $dti_b0 $dti_b -f 0.2 -R -n -m
eddy \ job_id=$(fsl_sub --coprocessor=cuda eddy \
--imain=$dti \ --imain=$dti \
--mask=$dti_b --acqp=$dti_txt \ --mask=$dti_b \
--index=$dti_txt2 \ --acqp=$dti_txt \
--bvecs=$dti_bvec \ --index=$dti_txt2 \
--bvals=$dti_bval \ --bvecs=$dti_bvec \
--repol \ --bvals=$dti_bval \
--out=$dti_u --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) ...@@ -8,9 +8,15 @@ indir=$(pwd)
pushd $outdir pushd $outdir
for i in {1..172}; do for i in {1..172}; do
probtrackx2_gpu -x $indir/masks/$i.nii.gz \ job_id=$(fsl_sub --coprocessor=cuda probtrackx2_gpu \
--dir=$indir/probtrackx/$i --forcedir -P 200 \ -x $indir/masks/$i.nii.gz \
-s $indir/bedpost.bedpostX/merged \ --dir=$indir/probtrackx/$i --forcedir -P 200 \
-m $indir/bedpost.bedpostX/nodif_brain_mask \ -s $indir/bedpost.bedpostX/merged \
--opd --pd -l -c 0.2 --distthresh=0 -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 done
...@@ -27,7 +27,17 @@ echo "-------------" ...@@ -27,7 +27,17 @@ echo "-------------"
echo "Running mmorf" echo "Running mmorf"
echo "-------------" echo "-------------"
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 # Combine warps
echo "" 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