-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstoposJob_HDDM
executable file
·48 lines (38 loc) · 1.31 KB
/
stoposJob_HDDM
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#SBATCH -t 5-00:00 # maximum 5 days on cartesius. Acceptable time formats include "minutes", "minutes:seconds", "hours:minutes:seconds", "days-hours", "days-hours:minutes" and "days-hours:minutes:seconds".
#SBATCH -N 1
#SBATCH -o /home/aeurai/jobs/slurm-%A_%a.out
#SBATCH -e /home/aeurai/jobs/slurm-%A_%a.err
#SBATCH [email protected]
#SBATCH --mail-type=END,FAIL
# load necessary modules
module load stopos
source activate python27 # use anaconda
# determine how many parallel jobs we can run on this node
ncores=`sara-get-num-cores` # 16 in total on LISA normal nodes
((ncores -= 1)) # subtract one for system processes, will have 15
echo "ncores = $ncores"
# loop over the cores available
for ((i=1; i<=ncores; i++)) ; do
(
for ((j=1; j<=1; j++)) ; do
stopos next -p pool
if [ "$STOPOS_RC" != "OK" ]; then
break
fi
echo "Running with parameters: $STOPOS_VALUE"
# see https://userinfo.surfsara.nl/systems/lisa/software/stopos
a=( $STOPOS_VALUE )
d=${a[0]}
v=${a[1]}
i=${a[2]}
s=${a[3]}
# first, run the model
eval "python /home/aeurai/code/serialDDM/fitHDDM.py -r 1 -d $d -v $v -i $i -s $s"
stopos remove -p pool
stopos status -p pool
done
) &
done
wait
# echo "Job $PBS_JOBID finished at `date`" | mail $USER -s "Job $PBS_JOBID"