Skip to content
Snippets Groups Projects
Commit 0b0901c7 authored by David Trudgian's avatar David Trudgian
Browse files

Bump version, fix bin for modules

parent 5dd9d13e
No related merge requests found
...@@ -88,11 +88,16 @@ def main(): ...@@ -88,11 +88,16 @@ def main():
if 'gres' in p.vals: if 'gres' in p.vals:
gres = str(p.vals['gres']) gres = str(p.vals['gres'])
sbatch_cmd = [ 'sbatch', '-N', nodes, '-p', partition, '-t', time_limit, '--gres', gres, '-oparam_runner_%j.out' ] sbatch_cmd = 'sbatch' + ' -N ' + nodes + ' -p ' + partition + ' -t ' + time_limit + ' --gres ' + gres + ' -oparam_runner_%j.out'
else: else:
sbatch_cmd = [ 'sbatch', '-N', nodes, '-p', partition, '-t', time_limit, '-oparam_runner_%j.out' ] sbatch_cmd = 'sbatch' + ' -N ' + nodes + ' -p ' + partition + ' -t ' + time_limit + ' -oparam_runner_%j.out'
batch_script = "#!/bin/bash\n" batch_script = "#!/bin/bash\n"
if 'modules' in p.vals.keys():
for mod_name in p.vals['modules']:
batch_script += "module add %s\n" % mod_name
batch_script += python_exe batch_script += python_exe
batch_script += ' -u ' batch_script += ' -u '
batch_script += this_script batch_script += this_script
...@@ -101,9 +106,10 @@ def main(): ...@@ -101,9 +106,10 @@ def main():
batch_script += ' 2>&1\n' batch_script += ' 2>&1\n'
logger.debug(sbatch_cmd) logger.debug(sbatch_cmd)
logger.debug(batch_script)
sbatch_proc = subprocess.Popen( sbatch_cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, sbatch_proc = subprocess.Popen( sbatch_cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE, env=os.environ.copy())
stdout, stderr = sbatch_proc.communicate(batch_script) stdout, stderr = sbatch_proc.communicate(batch_script)
......
...@@ -10,7 +10,7 @@ def read(fname): ...@@ -10,7 +10,7 @@ def read(fname):
setup( setup(
name = "param_runner", name = "param_runner",
version = "1.0.0a2", version = "1.0.0a4",
author = "David Trudgian", author = "David Trudgian",
author_email = "david.trudgian@utsouthwestern.edu", author_email = "david.trudgian@utsouthwestern.edu",
description = ("Parameter exploration on SLURM clusters."), description = ("Parameter exploration on SLURM clusters."),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment