Skip to content

Commit df2c4d2

Browse files
Merge pull request #41 from marcobarilari/marc_update-slurm-files
update slurm files for fmriprep and mriqc
2 parents 1400712 + 8e6122c commit df2c4d2

5 files changed

Lines changed: 36 additions & 26 deletions

File tree

doc/cpp_fmriprep.slurm

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#!/bin/bash
1+
!/bin/bash
22

33
#SBATCH --job-name=fMRIprep
44
#SBATCH --time=9:00:00 # hh:mm:ss
55

66
#SBATCH --ntasks=1
77
#SBATCH --cpus-per-task=4
88
#SBATCH --mem-per-cpu=20000 # megabytes
9-
#SBATCH --partition=batch,debug
9+
#SBATCH --partition=batch
1010

1111
#SBATCH --mail-user=marco.barilari@uclouvain.be
1212
#SBATCH --mail-type=ALL
@@ -59,10 +59,9 @@ set -e -x -u -o pipefail
5959
module --force purge
6060

6161
subjID=$1
62-
TaskName=$2
6362

6463
# "latest" or procide specific version number
65-
FMRIPREP_VERSION="24.0.0"
64+
FMRIPREP_VERSION="25.2.5"
6665

6766
# set username to locate scratch folder
6867
ceci_username="marcobar"
@@ -71,7 +70,7 @@ ceci_username="marcobar"
7170
nb_dummy_scans=0
7271

7372
# cluster paths
74-
path_to_singularity_image="$HOME/tools/containers/images/bids/bids-fmriprep--${FMRIPREP_VERSION}.sing"
73+
path_to_singularity_image="$HOME/tools/containers/images/bids/bids-fmriprep--${FMRIPREP_VERSION}.sif"
7574
scratch_dir=$GLOBALSCRATCH
7675
freesurfer_license_folder="$HOME/tools"
7776

@@ -80,7 +79,7 @@ root_dir="$HOME/path-to-project-yoda-fodler"
8079
bids_dir="$root_dir/inputs/raw"
8180
output_dir="$root_dir/outputs/derivatives/fmriprep"
8281

83-
# make the scratch folder, here there is no limit space and fmriprep can store stuff in case of crash and do not start from zero again
82+
# make the scratch folder, here there is no limit space and fmriprep can store temp files in case of crash and it does not start from zero again
8483
mkdir -p "${scratch_dir}"/work-fmriprep
8584

8685
# create output folder in case it does not exists

doc/cpp_mriqc.slurm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

33
#SBATCH --job-name=MRIqc
4-
#SBATCH --time=4:00:00 # hh:mm:ss
4+
#SBATCH --time=0:30:00 # hh:mm:ss
55

66
#SBATCH --ntasks=1
77
#SBATCH --cpus-per-task=4
8-
#SBATCH --mem-per-cpu=10000 # megabytes
8+
#SBATCH --mem-per-cpu=3000 # megabytes
99
#SBATCH --partition=batch
1010

1111
#SBATCH --mail-user=marco.barilari@uclouvain.be
@@ -17,7 +17,7 @@
1717
#export OMP_NUM_THREADS=4
1818
#export MKL_NUM_THREADS=4
1919

20-
## CPP MRIqc script for CECI cluster v0.3.0
20+
## CPP MRIqc script for CECI cluster v0.4.0
2121
#
2222
# writtent by CPP people
2323
#
@@ -50,18 +50,18 @@ module --force purge
5050
subjID=$1
5151

5252
# "latest" or procide specific version number
53-
MRIQC_VERSION="24.0.0"
53+
MRIQC_VERSION="24.0.2"
5454

5555
# cluster paths
56-
path_to_singularity_image="$HOME/tools/containers/images/bids/bids-mriqc--${MRIQC_VERSION}.sing"
56+
path_to_singularity_image="$HOME/tools/containers/images/bids/bids-mriqc--${MRIQC_VERSION}.sif"
5757
scratch_dir=$GLOBALSCRATCH
5858

5959
# data paths
6060
root_dir="$HOME/path-to-project-yoda-fodler"
6161
bids_dir="$root_dir/inputs/raw"
6262
output_dir="$root_dir/outputs/derivatives/mriqc"
6363

64-
# make the scratch folder, here there is no limit space and fmriprep can store stuff in case of crash and do not start from zero again
64+
# make the scratch folder, here there is no space limit and mriqc can store temp files in case of crash and it does not start from zero again
6565
mkdir -p "${scratch_dir}"/work-mriqc
6666

6767
# create output folder in case it does not exists

doc/cpp_mriqc_group.slurm

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

33
#SBATCH --job-name=MRIqc
4-
#SBATCH --time=4:00:00 # hh:mm:ss
4+
#SBATCH --time=0:30:00 # hh:mm:ss
55

66
#SBATCH --ntasks=1
77
#SBATCH --cpus-per-task=4
8-
#SBATCH --mem-per-cpu=10000 # megabytes
8+
#SBATCH --mem-per-cpu=3000 # megabytes
99
#SBATCH --partition=batch
1010

1111
#SBATCH --mail-user=marco.barilari@uclouvain.be
@@ -17,11 +17,12 @@
1717
#export OMP_NUM_THREADS=4
1818
#export MKL_NUM_THREADS=4
1919

20-
## CPP MRIqc script for CECI cluster v0.3.0
20+
## CPP MRIqc script for CECI cluster v0.4.0
2121
#
2222
# writtent by CPP people
2323
#
2424
# Submission command for Lemaitre4 after running mriqc for each participant
25+
# !!! to run from within `raw` folder
2526
#
2627
# sbatch cpp_mriqc_group.slurm
2728

@@ -37,19 +38,19 @@ set -e -x -u -o pipefail
3738

3839
module --force purge
3940

40-
# "latest" or procide specific version number
41-
MRIQC_VERSION="24.0.0"
41+
# "latest" or provide specific version number
42+
MRIQC_VERSION="24.0.2"
4243

4344
# cluster paths
44-
path_to_singularity_image="$HOME/tools/containers/images/bids/bids-mriqc--${MRIQC_VERSION}.sing"
45+
path_to_singularity_image="$HOME/tools/containers/images/bids/bids-mriqc--${MRIQC_VERSION}.sif"
4546
scratch_dir=$GLOBALSCRATCH
4647

4748
# data paths
4849
root_dir="$HOME/path-to-project-yoda-fodler"
4950
bids_dir="$root_dir/inputs/raw"
5051
output_dir="$root_dir/outputs/derivatives/mriqc"
5152

52-
# make the scratch folder, here there is no limit space and fmriprep can store stuff in case of crash and do not start from zero again
53+
# make the scratch folder, here there is no space limit and mriqc can store temp files in case of crash and it does not start from zero again
5354
mkdir -p "${scratch_dir}"/work-mriqc
5455

5556
# create mriqc output folder in case they don't exist
@@ -62,6 +63,6 @@ singularity run --cleanenv \
6263
"${path_to_singularity_image}" \
6364
/bids_dir \
6465
/output \
65-
--work-dir /scratch_dir/work-mriqc/"${subjID}" \
66+
--work-dir /scratch_dir/work-mriqc/group \
6667
--verbose-reports \
6768
group

doc/run_fmriprep.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ To contribute see [here](https://cpp-lln-lab.github.io/CPP_HPC/contributing/)
2020
- install datalad on your user (see [here](https://github.com/cpp-lln-lab/CPP_HPC/install_datalad))
2121
- get the fmriprep singularity image as follow:
2222

23-
here the example is with `fmriprp version 24.0.0` but check for newer version, list of fmriprep version available [here](https://hub.docker.com/r/nipreps/fmriprep/tags/)
23+
here the example is with `fmriprp version 25.2.5` but check for newer version, list of fmriprep version available [here](https://hub.docker.com/r/nipreps/fmriprep/tags/)
2424

2525
```bash
2626
datalad install -s https://github.com/ReproNim/containers.git ~/tools/containers
2727

2828
cd tools/containers
2929

30-
datalad get images/bids/bids-fmriprep--24.0.0.sing
30+
datalad get images/bids/bids-fmriprep--25.2.5.sif
3131
```
3232

3333
In case you have installed the repo a while a ago and you want to use a new version of fmriprep., update the `containers` repo via:
@@ -42,7 +42,7 @@ datald update --merge
4242
Depending on the cluster “unlock” is needed or not. No need for `lemaitre4`.
4343

4444
```bash
45-
datalad unlock containers/images/bids/bids-fmriprep--24.0.0.sing
45+
datalad unlock containers/images/bids/bids-fmriprep--25.2.5.sif
4646
```
4747

4848
## Submit a fmriprep job via a `slurm` script

doc/run_mriqc.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ To contribute see [here](https://cpp-lln-lab.github.io/CPP_HPC/contributing/)
1616

1717
## Prepare to run MRIqc on the cluster
1818

19-
- have your data on the cluster and unlock them if they are managed by datalad
19+
- have your data on the cluster and unlock them if they are managed by datalad (for MRIqc v24.0.2 data should not need to be unlocked)
2020
- install datalad on your user (see [here](https://github.com/cpp-lln-lab/CPP_HPC/install_datalad))
2121
- get the fmriprep singularity image as follow:
2222

23-
here the example is with `MRIqc version 24.0.0` but check for newer version, list of fmriprep version available [here](https://hub.docker.com/r/nipreps/fmriprep/tags/)
23+
here the example is with `MRIqc version 24.0.2` but check for newer version, list of fmriprep version available [here](https://hub.docker.com/r/nipreps/fmriprep/tags/)
2424

2525
```bash
2626
datalad install https://github.com/ReproNim/containers.git
2727

2828
cd containers
2929

30-
datalad get images/bids/bids-mriqc--24.0.0.sing
30+
datalad get images/bids/bids-mriqc--24.0.2.sif
3131
```
3232

3333
In case you have installe the repo a while a ago and you want to use a new version of fmriprep., update the `containers` repo via:
@@ -116,6 +116,16 @@ sbatch cpp_mriqc_group.slurm
116116

117117
## TIPS
118118

119+
### Troubleshooting
120+
121+
- ERROR: `OSError: [Errno 30] Read-only file system: '/home/mriqc/.cache'`
122+
123+
add this flag to the singulairy inputs
124+
125+
```bash
126+
-B "$HOME/tools/containers/images/bids":/home/mriqc \
127+
```
128+
119129
### check your job
120130

121131
see [here](https://github.com/cpp-lln-lab.github.io/CPP_HPC/cluster_code_snippets/#check-your-running-jobs)

0 commit comments

Comments
 (0)