Skip to content

Commit

Permalink
added cori machinefile; added compiler section in machinefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Youngsung Kim committed Apr 11, 2017
1 parent 94a8e87 commit b9ecd4f
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 61 deletions.
18 changes: 18 additions & 0 deletions machines/cori_nersc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[general]
name = Cori
id = cori

[shell]
command = hostname
startswith = cori
pattern = nid\d+

[compiler]
gnu = module swap PrgEnv-intel PrgEnv-gnu

[variable]
prerun_build =
prerun_run =
prerun_kernel_build =
prerun_kernel_run =
work_directory = $SCRATCH
3 changes: 3 additions & 0 deletions machines/yellowstone_ncar
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ command = hostname
startswith = yslogin,pronghorn,caldera
pattern = ys\d+

[compiler]
gnu = module purge; module load gnu

[variable]
prerun_build =
prerun_run =
Expand Down
4 changes: 3 additions & 1 deletion tests/functional/compflag/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def test_strace():
# create a kgen command
cmds = []
cmds.append(KGEN_APP)
cmds.append('--prerun build="%(cmd)s",run="%(cmd)s",kernel_build="%(cmd)s",kernel_run="%(cmd)s"'%{'cmd': 'module purge; module load gnu'})
if inc.has_section('compiler') and inc.has_option('compiler', 'gnu') and inc.get('compiler', 'gnu'):
cmds.extend(['--prerun', 'build="%(cmd)s",run="%(cmd)s",kernel_build="%(cmd)s",kernel_run="%(cmd)s"'%\
{'cmd': inc.get('compiler', 'gnu')}])
cmds.append('--cmd-clean "cd %s; make clean"'%outdir)
cmds.append('--cmd-build "cd %s; make build"'%outdir)
cmds.append('--cmd-run "cd %s; make run"'%outdir)
Expand Down
7 changes: 5 additions & 2 deletions tests/unit/extract/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def extractor():
shutil.copy(filename, outdir)

args = []
args.extend(['--prerun', 'build="%(cmd)s",run="%(cmd)s",kernel_build="%(cmd)s",kernel_run="%(cmd)s"'%\
{'cmd': 'module purge; module load gnu'}])
if inc.has_section('compiler') and inc.has_option('compiler', 'gnu') and inc.get('compiler', 'gnu'):
args.extend(['--prerun', 'build="%(cmd)s",run="%(cmd)s",kernel_build="%(cmd)s",kernel_run="%(cmd)s"'%\
{'cmd': inc.get('compiler', 'gnu')}])
args.extend(['--cmd-clean', 'cd %s; make clean'%outdir])
args.extend(['--cmd-build', 'cd %s; make build'%outdir])
args.extend(['--cmd-run', 'cd %s; make run'%outdir])
Expand Down Expand Up @@ -76,6 +77,8 @@ def test_run(extractor):

assert True
else:
print ('ERROR: stdout', out)
print ('ERROR: stderr', err)
assert False


Expand Down
5 changes: 3 additions & 2 deletions tests/unit/extract/test_tolerance.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def extractor():
shutil.copy(filename, outdir)

args = []
args.extend(['--prerun', 'build="%(cmd)s",run="%(cmd)s",kernel_build="%(cmd)s",kernel_run="%(cmd)s"'%\
{'cmd': 'module purge; module load gnu'}])
if inc.has_section('compiler') and inc.has_option('compiler', 'gnu') and inc.get('compiler', 'gnu'):
args.extend(['--prerun', 'build="%(cmd)s",run="%(cmd)s",kernel_build="%(cmd)s",kernel_run="%(cmd)s"'%\
{'cmd': inc.get('compiler', 'gnu')}])
args.extend(['--cmd-clean', 'cd %s; make clean'%outdir])
args.extend(['--cmd-build', 'cd %s; make build'%outdir])
args.extend(['--cmd-run', 'cd %s; make run'%outdir])
Expand Down
56 changes: 0 additions & 56 deletions tests/unit/extract/test_tolerance.py.bak

This file was deleted.

0 comments on commit b9ecd4f

Please sign in to comment.