-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbatch
More file actions
33 lines (27 loc) · 760 Bytes
/
Copy pathbatch
File metadata and controls
33 lines (27 loc) · 760 Bytes
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
#!/usr/bin/env zsh
#BSUB -J "project_ic"
#BSUB -o '/rwthfs/rz/cluster/work/rb570596/ProjectIC/matlab/output/logs/project_ic.txt'
#BSUB -u reinhold.bertram@rwth-aachen.de
#BSUB -N
#BSUB -W 3:00
#BSUB -n 8
#BSUB -M 4096
#BSUB -a openmp
module load MISC
module load matlab
cd $WORK/ProjectIC/matlab
# start non-interactive batch job
if [[ -z ${LSB_DJOB_NUMPROC} || ${LSB_DJOB_NUMPROC} -le 1 ]]; then
# serial case ( with #BSUB -n 1 )
matlabcmd="matlab -singleCompThread"
else
# parallel
mytasks=${LSB_DJOB_NUMPROC}
let mytasks-=1
matlabcmd="taskset -c 0-$mytasks matlab"
fi
$matlabcmd -nodisplay -nodesktop -nosplash -logfile job.log <<EOF
if getenv('LSB_DJOB_NUMPROC') > '1' matlabpool('OPEN','local',getenv('LSB_DJOB_NUMPROC')); end
main
exit
EOF