From 6d830d55ccae53dca6f0338dfee1274312c93161 Mon Sep 17 00:00:00 2001 From: Jonathan Herman Date: Fri, 19 Oct 2012 02:58:19 -0400 Subject: Better error handling. --- run_exps.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'run_exps.py') diff --git a/run_exps.py b/run_exps.py index 19dbad1..8812bc6 100755 --- a/run_exps.py +++ b/run_exps.py @@ -26,7 +26,7 @@ def parse_args(): parser.add_option('-d', '--duration', dest='duration', type='int', help='duration (seconds) of tasks') parser.add_option('-o', '--out-dir', dest='out_dir', - help='directory for data output', default="run-data") + help='directory for data output', default=("%s/run-data"%os.getcwd())) parser.add_option('-p', '--params', dest='param_file', help='file with experiment parameters') parser.add_option('-c', '--schedule-file', dest='sched_file', @@ -47,7 +47,7 @@ def convert_data(data): r"\s*{\s*(?P.*?)\s*?}$)|" r"(?P^" r"(?P\w+?spin)?\s*" - r"(?P[\w\-_\d\. ]+)\s*$)", + r"(?P[\w\-_\d\. \=]+)\s*$)", re.S|re.I|re.M) procs = [] @@ -134,8 +134,8 @@ def run_exp(name, schedule, scheduler, kernel, duration, work_dir, out_dir): proc_entries = [] executables = [] - if kernel and not lu.uname_matches(kernel): - raise InvalidKernel(kernel) + # if kernel and not lu.uname_matches(kernel): + # raise InvalidKernel(kernel) # Parse values for proc entries for entry_conf in schedule['proc']: @@ -196,7 +196,7 @@ def main(): for exp in args: path = "%s/%s" % (os.getcwd(), exp) - out_dir = "%s/%s" % (out_base, exp) + out_dir = "%s/%s" % (out_base, os.path.split(exp.strip('/'))[1]) if not os.path.exists(path): raise IOError("Invalid experiment: %s" % path) -- cgit v1.2.2