def test(**kwargs): cwd = os.getcwd() path = os.path.dirname(__file__) + os.sep path = os.path.realpath(path) make() d = os.path.join('run', 'hello-c') f = os.path.join(path, 'hello.c.x') os.makedirs(d) os.chdir(d) shutil.copy2(f, '.') conf.launch( executable='./hello.c.x', nthread=2, nproc=2, ppn_range=[2], minutes=10, **kwargs ) os.chdir(cwd) d = os.path.join('run', 'hello-f') f = os.path.join(path, 'hello.f.x') os.makedirs(d) os.chdir(d) shutil.copy2(f, '.') conf.launch( executable='./hello.f.x', nthread=2, nproc=2, ppn_range=[2], minutes=10, **kwargs ) os.chdir(cwd) return
#!/usr/bin/env python import os import shutil from . import hello from cst import sord, conf hello.make() sord.make() cwd = os.getcwd() d = os.path.join("run", "test_suite") os.makedirs(d) shutil.copy2("test_suite.py", d) os.chdir(d) job = conf.launch(mode="script", execute="python test_suite.py", nproc=6, minutes=30) os.chdir(cwd)