diff --git a/util/job_launching/common.py b/util/job_launching/common.py index ff8d029478..cc2c047b96 100644 --- a/util/job_launching/common.py +++ b/util/job_launching/common.py @@ -52,7 +52,7 @@ def get_argfoldername(argpair: dict): name = argpair.get("name", "") if name != "": return name - elif args == "": + elif args == "" or args is None: return "NO_ARGS" else: foldername = re.sub(r"[^a-z^A-Z^0-9]", "_", str(args).strip()) diff --git a/util/job_launching/run_simulations.py b/util/job_launching/run_simulations.py index 040f7aa95a..306109cced 100755 --- a/util/job_launching/run_simulations.py +++ b/util/job_launching/run_simulations.py @@ -376,17 +376,19 @@ def _log_job(self, torque_out, benchmark, args, build_handle, kernel_name=None): def find_benchmark_trace_dir(self, appargs_subdir): """Find the benchmark trace directory for the given appargs_subdir.""" benchmark_trace_dir = None - paths_to_try = ( - [os.path.join(options.trace_dir, appargs_subdir, "traces")] - + glob.glob( - os.path.join( - options.trace_dir, "**", "**", appargs_subdir, "traces" + subdirs = [appargs_subdir] + # 2.0.0/2.0.1 wrote empty-args runs to "None" instead of "NO_ARGS" + if os.path.basename(appargs_subdir) == "NO_ARGS": + subdirs.append(os.path.join(os.path.dirname(appargs_subdir), "None")) + paths_to_try = [] + for subdir in subdirs: + paths_to_try += ( + [os.path.join(options.trace_dir, subdir, "traces")] + + glob.glob( + os.path.join(options.trace_dir, "**", "**", subdir, "traces") ) + + glob.glob(os.path.join(options.trace_dir, "**", subdir, "traces")) ) - + glob.glob( - os.path.join(options.trace_dir, "**", appargs_subdir, "traces") - ) - ) for path in paths_to_try: try: benchmark_trace_dir = common.dir_option_test( diff --git a/util/plotting/plot-correlation.py b/util/plotting/plot-correlation.py index 7d9b73a911..c70fac44eb 100755 --- a/util/plotting/plot-correlation.py +++ b/util/plotting/plot-correlation.py @@ -1125,6 +1125,9 @@ def find_hw_base_dirs(hw_dir): # Construct appargs relative to the base_dir rel_path = os.path.relpath(csv_dir, base_dir) appargs = rel_path + # 2.0.0/2.0.1 wrote empty-args runs to "None" instead of "NO_ARGS" + if os.path.basename(appargs) == "None": + appargs = os.path.join(os.path.dirname(appargs), "NO_ARGS") logger.log("Found CSVs in {0}, appargs={1}".format(csv_dir, appargs)) kdata = [] for csvf in csvs: