Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions doc/cpp_fmriprep.slurm
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash
!/bin/bash

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

#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --mem-per-cpu=20000 # megabytes
#SBATCH --partition=batch,debug
#SBATCH --partition=batch

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

subjID=$1
TaskName=$2

# "latest" or procide specific version number
FMRIPREP_VERSION="24.0.0"
FMRIPREP_VERSION="25.2.5"

# set username to locate scratch folder
ceci_username="marcobar"
Expand All @@ -71,7 +70,7 @@ ceci_username="marcobar"
nb_dummy_scans=0

# cluster paths
path_to_singularity_image="$HOME/tools/containers/images/bids/bids-fmriprep--${FMRIPREP_VERSION}.sing"
path_to_singularity_image="$HOME/tools/containers/images/bids/bids-fmriprep--${FMRIPREP_VERSION}.sif"
scratch_dir=$GLOBALSCRATCH
freesurfer_license_folder="$HOME/tools"

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

# 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
# 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
mkdir -p "${scratch_dir}"/work-fmriprep

# create output folder in case it does not exists
Expand Down
12 changes: 6 additions & 6 deletions doc/cpp_mriqc.slurm
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

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

#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --mem-per-cpu=10000 # megabytes
#SBATCH --mem-per-cpu=3000 # megabytes
#SBATCH --partition=batch

#SBATCH --mail-user=marco.barilari@uclouvain.be
Expand All @@ -17,7 +17,7 @@
#export OMP_NUM_THREADS=4
#export MKL_NUM_THREADS=4

## CPP MRIqc script for CECI cluster v0.3.0
## CPP MRIqc script for CECI cluster v0.4.0
#
# writtent by CPP people
#
Expand Down Expand Up @@ -50,18 +50,18 @@ module --force purge
subjID=$1

# "latest" or procide specific version number
MRIQC_VERSION="24.0.0"
MRIQC_VERSION="24.0.2"

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

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

# 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
# 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
mkdir -p "${scratch_dir}"/work-mriqc

# create output folder in case it does not exists
Expand Down
17 changes: 9 additions & 8 deletions doc/cpp_mriqc_group.slurm
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

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

#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --mem-per-cpu=10000 # megabytes
#SBATCH --mem-per-cpu=3000 # megabytes
#SBATCH --partition=batch

#SBATCH --mail-user=marco.barilari@uclouvain.be
Expand All @@ -17,11 +17,12 @@
#export OMP_NUM_THREADS=4
#export MKL_NUM_THREADS=4

## CPP MRIqc script for CECI cluster v0.3.0
## CPP MRIqc script for CECI cluster v0.4.0
#
# writtent by CPP people
#
# Submission command for Lemaitre4 after running mriqc for each participant
# !!! to run from within `raw` folder
#
# sbatch cpp_mriqc_group.slurm

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

module --force purge

# "latest" or procide specific version number
MRIQC_VERSION="24.0.0"
# "latest" or provide specific version number
MRIQC_VERSION="24.0.2"

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

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

# 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
# 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
mkdir -p "${scratch_dir}"/work-mriqc

# create mriqc output folder in case they don't exist
Expand All @@ -62,6 +63,6 @@ singularity run --cleanenv \
"${path_to_singularity_image}" \
/bids_dir \
/output \
--work-dir /scratch_dir/work-mriqc/"${subjID}" \
--work-dir /scratch_dir/work-mriqc/group \
--verbose-reports \
group
6 changes: 3 additions & 3 deletions doc/run_fmriprep.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ To contribute see [here](https://cpp-lln-lab.github.io/CPP_HPC/contributing/)
- install datalad on your user (see [here](https://github.com/cpp-lln-lab/CPP_HPC/install_datalad))
- get the fmriprep singularity image as follow:

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/)
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/)

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

cd tools/containers

datalad get images/bids/bids-fmriprep--24.0.0.sing
datalad get images/bids/bids-fmriprep--25.2.5.sif
```

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:
Expand All @@ -42,7 +42,7 @@ datald update --merge
Depending on the cluster “unlock” is needed or not. No need for `lemaitre4`.

```bash
datalad unlock containers/images/bids/bids-fmriprep--24.0.0.sing
datalad unlock containers/images/bids/bids-fmriprep--25.2.5.sif
```

## Submit a fmriprep job via a `slurm` script
Expand Down
16 changes: 13 additions & 3 deletions doc/run_mriqc.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ To contribute see [here](https://cpp-lln-lab.github.io/CPP_HPC/contributing/)

## Prepare to run MRIqc on the cluster

- have your data on the cluster and unlock them if they are managed by datalad
- 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)
- install datalad on your user (see [here](https://github.com/cpp-lln-lab/CPP_HPC/install_datalad))
- get the fmriprep singularity image as follow:

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/)
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/)

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

cd containers

datalad get images/bids/bids-mriqc--24.0.0.sing
datalad get images/bids/bids-mriqc--24.0.2.sif
```

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:
Expand Down Expand Up @@ -116,6 +116,16 @@ sbatch cpp_mriqc_group.slurm

## TIPS

### Troubleshooting

- ERROR: `OSError: [Errno 30] Read-only file system: '/home/mriqc/.cache'`

add this flag to the singulairy inputs

```bash
-B "$HOME/tools/containers/images/bids":/home/mriqc \
```

### check your job

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