-
Notifications
You must be signed in to change notification settings - Fork 0
/
MAH_control.py
executable file
·47 lines (41 loc) · 1.28 KB
/
MAH_control.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
#!/usr/bin/env python
import sys
from subprocess import Popen
import time
master_ens_list = ['mpi411','mpi570','mpi701',
'L16','L20','L28',
'qu_L24','qu_L28','qu_L32']
nblock_list = []
if len(sys.argv)> 1:
ens_list = []
for iarg in sys.argv[1:]:
if 'mpi' in iarg and 'ens' in iarg:
ens_list.append(['mpi411','mpi570','mpi701'])
elif 'latspace' in iarg and 'ens' in iarg:
ens_list.append(['L16','L20','L28'])
elif 'quenched' in iarg and 'ens' in iarg:
ens_list.append(['qu_L24','qu_L28','qu_L32'])
elif 'nblock' in iarg:
nblock_list.append(iarg)
elif iarg not in master_ens_list:
print('Warning, ensemble name not found: ',iarg)
else:
ens_list.append(iarg)
else:
ens_list = master_ens_list
if len(ens_list) == 0:
ens_list = master_ens_list
if len(nblock_list) == 0:
nblock_list = ['nblock1','nblock2','nblock3']
print()
print('Running over ensembles')
print(', '.join(ens_list))
print()
cprocs = []
for iens in ens_list:
for iblock in nblock_list:
print(' starting job ',iens,iblock)
cprocs.append(Popen(['./Mat_Alpha_Hack.py',iens,iblock]))
time.sleep(5)
for cp in cprocs:
cp.wait()