From fb57a33f5392436f17c8bce2b325c92804194940 Mon Sep 17 00:00:00 2001 From: Sylvester Joosten <sjoosten@anl.gov> Date: Thu, 17 Jan 2019 13:33:54 -0600 Subject: [PATCH] make sure logfile does not just append, but start a new file for a new run --- launcher/simc-launcher.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/launcher/simc-launcher.in b/launcher/simc-launcher.in index d3b4003..a3dc3e6 100644 --- a/launcher/simc-launcher.in +++ b/launcher/simc-launcher.in @@ -76,6 +76,10 @@ with tempfile.TemporaryDirectory() as tmpdir: print(' - Linking output directories...') os.symlink(output_dir, tmp_output_dir) os.symlink(output_dir, tmp_worksim_dir) + # also cleanup logfile if needed + logfile = '{outdir}/{conf}.log'.format(outdir=output_dir, conf=tmp_conf_name) + if os.path.exists(logfile): + os.remove(logfile) print(' - Linking input file...') os.symlink(data_path, tmp_data_path) -- GitLab