Skip to content
Snippets Groups Projects
Commit 2b52810e authored by Karim Ahmed's avatar Karim Ahmed
Browse files

Merge branch 'fix/xfel_calibrate_update_bugs' into 'master'

FIX/Include run number in out -folder path if missing

See merge request detectors/pycalibration!217
parents c1375ac5 1ca4b103
No related branches found
No related tags found
1 merge request!217FIX/Include run number in out -folder path if missing
...@@ -818,6 +818,12 @@ def run(): ...@@ -818,6 +818,12 @@ def run():
caltype.upper(), datetime.now().isoformat()) caltype.upper(), datetime.now().isoformat())
if try_report_to_output: if try_report_to_output:
if "out_folder" in args: if "out_folder" in args:
if "run" in args and str(args["run"]) not in args["out_folder"]:
rr = args["run"]
# Only put run, when it is not in the out_folder
if isinstance(rr, int):
rr = "r{:04d}".format(rr)
args["out_folder"] = "{}/{}/".format(args["out_folder"], rr)
out_path = os.path.abspath(args["out_folder"]) out_path = os.path.abspath(args["out_folder"])
else: else:
print("No 'out_folder' defined as argument, outputting to '{}' instead.".format( print("No 'out_folder' defined as argument, outputting to '{}' instead.".format(
......
...@@ -33,5 +33,7 @@ launcher_command = "sbatch -t 24:00:00 --requeue --output {temp_path}/slurm-%j.o ...@@ -33,5 +33,7 @@ launcher_command = "sbatch -t 24:00:00 --requeue --output {temp_path}/slurm-%j.o
free_nodes_cmd = "sinfo -p exfel -t idle -N --noheader | wc -l" free_nodes_cmd = "sinfo -p exfel -t idle -N --noheader | wc -l"
preempt_nodes_cmd = "squeue -p all,grid --noheader | grep max-exfl | egrep -v 'max-exfl18[3-8]|max-exfl100|max-exflg' | wc -l" preempt_nodes_cmd = "squeue -p all,grid --noheader | grep max-exfl | egrep -v 'max-exfl18[3-8]|max-exfl100|max-exflg' | wc -l"
max_reserved = 8 max_reserved = 8
reservation = "xcal" # "xcal" reservation value removed as ITDM
# is giving xcal priority by default.
reservation = ""
reservation_char = "darks" reservation_char = "darks"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment