in Benchmarks/NVIDIA/CPUStream.py [0:0]
def build(self):
current = os.getcwd()
path = "CPUStream"
isdir = os.path.isdir(path)
if not isdir:
results = subprocess.run(
["git", "clone", "https://github.com/UoB-HPC/BabelStream", path],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
tools.write_log(tools.check_error(results))
build_path = os.path.join(current, "CPUStream")
os.chdir(build_path)
babelstream_build_path = os.path.join(build_path, "build")
if not os.path.isdir(babelstream_build_path):
os.mkdir(babelstream_build_path)
os.chdir(babelstream_build_path)
results = subprocess.run(
"cmake -DMODEL=omp ..",
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
tools.write_log(tools.check_error(results))
results = subprocess.run(
["make"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
tools.write_log(tools.check_error(results))
else:
os.chdir(babelstream_build_path)