-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_namd_frontera.py
More file actions
64 lines (42 loc) · 1.53 KB
/
build_namd_frontera.py
File metadata and controls
64 lines (42 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
#This script clones charm and builds charm with different options
# clone charm
from charm_header import *
#os.system("git clone charmgit:charm charm");
# cd into it and build charm with options
#os.chdir("charm");
builds=["ucx","impi","mpich","mpichnoucx","ompi","ompinoucx","ucxompi"]
namd_dir="/scratch1/03808/nbhat4/namd"
print 'basedir is' + str(basedirs[key])
buildType="debug"
# Now change the directory
os.chdir(namd_dir);
#print 'basebuild is' + str(basebuilds[key])
mode = "smp"
for build in builds:
charmArch = frontera_basebuilds[build] + archmap[key]
if(build == "ucxompi"):
charmArch += "-ompipmix"
charmArch += "-" + mode
if(build != "ucx"):
charmArch += "-" + build
charmArch += "-" + buildType
#print preBuildEnv[build]
buildStr = "./config Linux-x86_64-g++" + space + " --charm-base " + basedirs[key] + " --charm-arch "+ charmArch
if(buildType == "debug"):
buildStr += " --with-debug"
#print buildStr
newDir = " Linux-x86_64-g++-"+ mode + "-" + build + "-" + buildType
moveStr = "mv Linux-x86_64-g++ "+ newDir
#print moveStr
makeStr = " make -j56 -C " + newDir
#print moveStr
finalCommand = preBuildEnv[build] + " && which mpicc && " + buildStr + " && " + moveStr + " && " + makeStr
print finalCommand
#buildStr += space + num_proc + buildTypeMap2[buildType]
#finalCommand = preBuildEnv[build]
#finalCommand += " && which mpicc && "
#finalCommand += buildStr
##print buildStr
#print "Final command is:" + finalCommand
##os.system(buildStr)
os.system(finalCommand)