-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdyno.sh
44 lines (36 loc) · 1.28 KB
/
dyno.sh
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
#!/bin/bash
#
#SBATCH --job-name=dcm2all_A
#SBATCH --output=dcm2all_A_.txt
#SBATCH --ntasks-per-node=1
#SBATCH --time=99:00:00
proj=$2
based=$3
version=$4
scripts=${based}/${version}/scripts
NOW=$(date "+%D-%T")
if [ ${#SLURM_ARRAY_TASK_ID} == 1 ];
then
inputNo="00${SLURM_ARRAY_TASK_ID}"
echo "$1 started $NOW" > ${scripts}/dyno_$1_test_${inputNo}.txt
${scripts}/$1 -p ${proj} -z ${proj}${inputNo} -s A -m no -f yes -l no -b ${based} -t terra
NOW=$(date "+%D-%T")
echo "$1 finished $NOW" >> ${scripts}/dyno_$1_test_${inputNo}.txt
exit 0
elif [ ${#SLURM_ARRAY_TASK_ID} == 2 ];
then
inputNo="0${SLURM_ARRAY_TASK_ID}"
echo "$1 started $NOW" > ${scripts}/dyno_$1_test_${inputNo}.txt
${scripts}/$1 -p ${proj} -z ${proj}${inputNo} -s A -m no -f yes -l no -b ${based} -t terra
NOW=$(date "+%D-%T")
echo "$1 finished $NOW" >> ${scripts}/dyno_$1_test_${inputNo}.txt
exit 0
elif [ ${#SLURM_ARRAY_TASK_ID} == 3 ];
then
inputNo="${SLURM_ARRAY_TASK_ID}"
echo "$1 started $NOW" > ${scripts}/dyno_$1_test_${inputNo}.txt
${scripts}/$1 -p ${proj} -z ${proj}${inputNo} -s A -m no -f yes -l no -b ${based} -t terra
NOW=$(date "+%D-%T")
echo "$1 finished $NOW" >> ${scripts}/dyno_$1_test_${inputNo}.txt
exit 0
fi