forked from qlan3/Explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
53 lines (43 loc) · 1.39 KB
/
run.py
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
import os
import sys
from utils.submitter import Submitter
def make_dir(dir):
if not os.path.exists(dir):
os.makedirs(dir, exist_ok=True)
def main(argv):
sbatch_cfg = {
# Account name
'account': 'rrg-whitem',
# Job name
'job-name': 'catcher',
# Job time
'time': '0-10:00:00',
# GPU/CPU type
'--cpus-per-task': 1,
# Memory
'mem-per-cpu': '2000M',
# Email address
'mail-user': '[email protected]'
}
# sbatch configs backup for different games
# sbatch_cfg['job-name'], sbatch_cfg['time'], sbatch_cfg['mem-per-cpu'] = 'catcher', '0-10:00:00', '2000M'
# sbatch_cfg['job-name'], sbatch_cfg['time'], sbatch_cfg['mem-per-cpu'] = 'copter', '0-05:00:00', '2000M'
# sbatch_cfg['job-name'], sbatch_cfg['time'], sbatch_cfg['mem-per-cpu'] = 'lunar', '0-07:00:00', '2000M'
# sbatch_cfg['job-name'], sbatch_cfg['time'], sbatch_cfg['mem-per-cpu'] = 'minatar', '1-08:00:00', '4000M'
general_cfg = {
# User name
'user': 'qlan3',
# Sbatch script path
'script-path': './sbatch.sh',
# Check time interval in minutes
'check-time-interval': 5,
# Clusters info: {name: capacity}
'clusters': {'Cedar': 3000},
# Job indexes list
'job-list': list(range(1, 30+1))
}
make_dir(f"output/{sbatch_cfg['job-name']}")
submitter = Submitter(general_cfg, sbatch_cfg)
submitter.submit()
if __name__=='__main__':
main(sys.argv)