Skip to content

Commit

Permalink
Merge pull request #47 from cbm-fles/dev_flesctl
Browse files Browse the repository at this point in the history
Add initial reservation support to flesctl
  • Loading branch information
oTTer-Chief committed Mar 12, 2019
2 parents e2d2081 + 6ca271f commit 3d9e895
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions contrib/flesctl/flesctl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ run_id = config["DEFAULT"].getint("NextRunID")
if not run_id:
print("error: no configuration at", flesctl_conf)
sys.exit(1)
reservation = config["DEFAULT"].get("Reservation", None)


def tags():
Expand Down Expand Up @@ -148,9 +149,11 @@ def start(tag):
shutil.copy(log_template, "logbook.txt")

# start run using spm
subprocess.call(["/opt/spm/spm-run", "--batch",
"--logfile", "slurm.out",
"--jobname", "run_{}".format(run_id), "readout.spm"])
cmd = ["/opt/spm/spm-run", "--batch", "--logfile", "slurm.out",
"--jobname", "run_{}".format(run_id)]
if reservation:
cmd += ["--reservation", reservation]
subprocess.call(cmd + ["readout.spm"]);


def current_run_id():
Expand Down
2 changes: 1 addition & 1 deletion contrib/flesctl/skel/private/flesctl.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[DEFAULT]
nextrunid = 1

#reservation = mcbm

0 comments on commit 3d9e895

Please sign in to comment.