-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_preprocess.slurm
32 lines (28 loc) · 1.02 KB
/
run_preprocess.slurm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash -l
#
# Multithreading example job script for MPCDF Cobra.
# In addition to the Python example shown here, the script
# is valid for any multi-threaded program, including
# plain OpenMP, parallel Matlab, Julia, and similar cases.
#
#SBATCH -o /u/kroma/PRAWN/logs/preprocess_py_%j.out
#SBATCH -e /u/kroma/PRAWN/logs/preprocess_py_%j.out
#SBATCH -D ./
#SBATCH -J preprocess
#SBATCH --nodes=1 # request a full node
#SBATCH --ntasks-per-node=1 # only start 1 task via srun because Python multiprocessing starts more tasks internally
#SBATCH --cpus-per-task=72 # assign all the cores to that first task to make room for multithreading
#SBATCH --time=01:00:00
#SBATCH [email protected]
#SBATCH --mail-type=ALL
# Check if the correct number of arguments is provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 sub_ses_str"
exit 1
fi
# Access the arguments and set variables
sub_ses_str="$1"
conda activate prawn
conda info --envs
cd /u/kroma/PRAWN
srun python3 /u/kroma/PRAWN/src/preprocess.py $sub_ses_str