-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsbatch_generate.sh
50 lines (44 loc) · 1.43 KB
/
sbatch_generate.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
45
46
47
48
49
50
#!/bin/bash
# check locally: bash sbatch_generate.sh
#SBATCH --job-name=nkd_table
#SBATCH --mail-type=ALL
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=16
#SBATCH --time=42:00:00
#SBATCH --array=4-30 #4-30
#SBATCH --partition=mini
#SBATCH --qos=short
#SBATCH --qos=expedite #expedite 6 hours, short 2 hours
#SBATCH --output=log/%x_%A_%a.log
#SBATCH --error=log/%x_%A_%a.err
#SBATCH --nice=200 #larger number with smaller priority
#SBATCH --begin=23:00:00
#SBATCH --test-only
# echo "n=30, k=1,2,3"
echo "SLURM_JOBID: " $SLURM_JOBID
echo "SLURM_ARRAY_TASK_ID: " $SLURM_ARRAY_TASK_ID
echo "SLURM_ARRAY_JOB_ID: " $SLURM_ARRAY_JOB_ID
echo "SLURM_JOB_ACCOUNT: " $SLURM_JOB_ACCOUNT
echo "SLURM_JOB_NAME: " $SLURM_JOB_NAME
echo "SLURM_NTASKS: " $SLURM_NTASKS
echo "SLURMD_NODENAME: " $SLURMD_NODENAME
echo "SLURM_PROCID: " $SLURM_PROCID
date
#n_start=$SLURM_ARRAY_TASK_ID
#(( n_end = $SLURM_ARRAY_TASK_ID + 1 ))
(( num_cores = 16 ))
#(( n_start = $SLURM_ARRAY_TASK_ID ))
(( n_start = 34 - $SLURM_ARRAY_TASK_ID ))
#(( n_start = 30 ))
#srun ./generate_css_code.out num_cores=$num_cores \
#cp generate_css_code.out .job${index}
# 1 for debug, 2 for small
index=1
srun ./.job${index} num_cores=$num_cores \
code_folder="../data/CSS-Codes/run3" \
n_start="$((n_start))" \
n_end="$((n_start+1))" \
num_trials="$((num_cores*50))" \
note="node-${SLURMD_NODENAME}-proc-${SLURM_PROCID}"
date
# n=5-30, num_cores*10 takes one hour to finish on 4 nodes