Exemplo n.º 1
0
def getCurrentEnv():
    return filter(lambda x: "PrgEnv" in x, module("list", "-t").splitlines())[0]
Exemplo n.º 2
0
    cmake_defines.append("-DGMX_MPI=ON")

if args.U:
    cmake_undefines = ["-U" + arg for arg in args.U]
else:
    cmake_undefines = []


def getCurrentEnv():
    return filter(lambda x: "PrgEnv" in x, module("list", "-t").splitlines())[0]


currentEnv = getCurrentEnv()
print("Current Programming Environment is: " + currentEnv)

module("swap", currentEnv, "PrgEnv-" + args.PrgEnv)
module("load", "cmake")
if args.perftools:
    module("load", "perftools")
os.environ["CRAY_NPU_ACCESS"] = "0"  # required, see Bug #803906

currentEnv = getCurrentEnv()
print("Current Programming Environment after swapping is: " + currentEnv)

os.environ["CC"] = "cc"
os.environ["CXX"] = "CC"
os.environ["F77"] = "ftn"


def follow_run(command_list):
    os.system(" ".join(command_list))