-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSBATCH_num.sh
More file actions
67 lines (48 loc) · 1.53 KB
/
SBATCH_num.sh
File metadata and controls
67 lines (48 loc) · 1.53 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
# enter your name on the cluster of condensed matter group
your_name=michishita
job_name=test
# N represent the parallel process you want to use
N=20
# you should make directory which holds the data, and the name should represent "when you calculate","what you calculate", and "what parameter you use".
dir=TMD_11_02_NH_K900
# The name of code which you want to run
file=TMD_NH.out
# The name of directory you put the running code
file_dir=julia
# I recommend you to make directory named "Data", which hold all data folders.
mkdir -p /home/${your_name}/Data/${dir}/
# copy the runnig file to the data directory
cp ./${file_dir}/${file} ./Data/${dir}/
cd ./Data/${dir}/
# make job.sh
cat >job.sh <<EOF
#!/bin/sh
#SBATCH --ntasks=${N}
#SBATCH --cpus-per-task=1
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=${N}
#SBATCH --ntasks-per-socket=${N}
#PBS -N ${job_name}
orig_dir=/home/michishita/Data/${dir}
root_dir=/work/michishita/${dir} #work
mkdir -p \$root_dir
cp \${orig_dir}/${file} \${root_dir}/
cd \${root_dir}
#If you input the parameters
W_SIZE=24000
W_MAX=2.4
#If you use c++
set OMP_NUM_THREADS=${N}
./${file} \$W_SIZE \$W_MAX
#if you use julia
julia ${file}
#Move the results(output files) to the Data directory
mv \${root_dir}/* \${orig_dir}
EOF
# you can choose the cluster p~~ instead of "p1792gb", such as "pcebu", "pepyc"
#sbatch -p p1792gb job.sh
# if you want to get e-mail after teh job finishes
sbatch -p ptuba -w tuba9 --mail-type=END --mail-user=yoshihiro.michishita@riken.jp job.sh
echo "job is playing"
cd ./../..