Skip to content

Commit 44fc9e6

Browse files
committed
performance analysis script with atomic limit data
1 parent 8562842 commit 44fc9e6

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

scripts/gen_data_atomic.py

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import os
2+
import numpy as np
3+
import subprocess
4+
import time
5+
import distutils
6+
from distutils.spawn import find_executable
7+
import sys
8+
import shutil
9+
import itertools
10+
import argparse
11+
import collections
12+
13+
#nbos_array = [1, 5, 16]
14+
nbos_array = [1,2,3,4,5,6,8,12,16]
15+
#nbos_array = [8,12,16]
16+
nbos_array = [3]
17+
#nbos_array = [1,2,3,4,5,8,16]
18+
#nbos_array = [6,5,4,3,2,1][::-1]
19+
#nferm_array = [16,32,48,64]
20+
nferm_array = [4,8,16,24,32,48,64,96,128,160]
21+
#nferm_array=[16,24,32,48,64]
22+
#nferm_array=[4,8,12]#16,24,32,48,64]
23+
#nferm_array = [48]
24+
#kpts_array = [4, 8, 16, 32]#, 32]
25+
#kpts_array = [4,8,16,24,32,48,64]
26+
kpts_array =[16]
27+
28+
U=20.0
29+
beta = 1.0
30+
31+
dry_run = False # True
32+
33+
inp_section="atomic"
34+
data_dir="data_atomic"
35+
resume=False
36+
plaintext=0
37+
df_sc_iter = 150
38+
df_sc_cutoff = 1e-8
39+
40+
def main():
41+
counter = 0
42+
origdir = os.path.abspath(os.getcwd())
43+
for nbos in nbos_array:
44+
for nferm in nferm_array:
45+
for kpts in kpts_array:
46+
exec_dir=origdir + os.path.sep+data_dir+os.path.sep + "b" + str(nbos) + os.path.sep + "f" + str(nferm) + os.path.sep + "k" + str(kpts)
47+
os.makedirs(exec_dir) if not os.path.exists(exec_dir) else None
48+
os.chdir(exec_dir)
49+
50+
prepare_string = ["generate_atomic",
51+
"--nfermionic", str(nferm),
52+
"--nbosonic", str(nbos),
53+
"--U", str(U),
54+
"--beta", str(beta),
55+
"--output", "atomic.h5",
56+
"--plaintext", str(int(plaintext))
57+
]
58+
df_string = ["hub_df_cubic2d",
59+
"--input", "atomic.h5",
60+
"--output", "output.h5",
61+
"--inp_section", inp_section,
62+
"--df_sc_iter", str(df_sc_iter),
63+
"--df_sc_cutoff", str(df_sc_cutoff),
64+
"--nbosonic", str(nbos),
65+
"--resume", str(int(resume)),
66+
"--kpts", str(kpts),
67+
"--plaintext", str(int(plaintext))
68+
]
69+
if not dry_run:
70+
print " ".join(prepare_string)
71+
print subprocess.call(" ".join(prepare_string), shell=True)
72+
print " ".join(df_string)
73+
print subprocess.call(" ".join(df_string), shell=True)
74+
75+
counter = counter + 1
76+
77+
os.chdir(origdir)
78+
79+
print counter, "calcs ran"
80+
81+
if __name__ == "__main__":
82+
main()

0 commit comments

Comments
 (0)