From ef1a9824c3a266df7d96e28debebf079b7ffdaa1 Mon Sep 17 00:00:00 2001 From: IndPrinciple Date: Mon, 2 Oct 2023 16:31:32 +0800 Subject: [PATCH] portfolio script bug fix --- portfolio/portfolio.fo.parallel.py | 4 +++- portfolio/portfolio.lams.parallel.py | 4 +++- portfolio/portfolio.sh.sequential.py | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/portfolio/portfolio.fo.parallel.py b/portfolio/portfolio.fo.parallel.py index e8b86ae11..de8c0e7b5 100755 --- a/portfolio/portfolio.fo.parallel.py +++ b/portfolio/portfolio.fo.parallel.py @@ -30,10 +30,12 @@ class RunResult: def __init__(self, conf_path, preferred_time): + import os + cwd = os.path.dirname(os.path.realpath(__file__)) + conf_path = cwd + "/" + conf_path self._conf_path = conf_path self._preferred_time = preferred_time - import os if not os.path.isfile(conf_path): raise ValueError("{0} cannot be found".format(conf_path)) if not (os.access(conf_path, os.X_OK)): diff --git a/portfolio/portfolio.lams.parallel.py b/portfolio/portfolio.lams.parallel.py index fd8b17a43..6db9082df 100755 --- a/portfolio/portfolio.lams.parallel.py +++ b/portfolio/portfolio.lams.parallel.py @@ -30,10 +30,12 @@ class RunResult: def __init__(self, conf_path, preferred_time): + import os + cwd = os.path.dirname(os.path.realpath(__file__)) + conf_path = cwd + "/" + conf_path self._conf_path = conf_path self._preferred_time = preferred_time - import os if not os.path.isfile(conf_path): raise ValueError("{0} cannot be found".format(conf_path)) if not (os.access(conf_path, os.X_OK)): diff --git a/portfolio/portfolio.sh.sequential.py b/portfolio/portfolio.sh.sequential.py index b4b5f10ae..20aa6b4f9 100755 --- a/portfolio/portfolio.sh.sequential.py +++ b/portfolio/portfolio.sh.sequential.py @@ -21,10 +21,12 @@ class RunResult: def __init__(self, conf_path, preferred_time): + import os + cwd = os.path.dirname(os.path.realpath(__file__)) + conf_path = cwd + "/" + conf_path self._conf_path = conf_path self._preferred_time = preferred_time - import os if not os.path.isfile(conf_path): raise ValueError("{0} cannot be found".format(conf_path)) if not (os.access(conf_path, os.X_OK)):