diff options
author | 2019-09-02 14:46:15 -0700 | |
---|---|---|
committer | 2019-09-02 14:46:15 -0700 | |
commit | 33e7d3adbdc7c8e602befb5e9eb49c0d2b18b71f (patch) | |
tree | 8393230057c88b7f5efabc855fccb876eba6e0fa /Tools/performance_tests/functions_perftest.py | |
parent | 923f75d607556542a1faee15a773771c6836f55b (diff) | |
download | WarpX-33e7d3adbdc7c8e602befb5e9eb49c0d2b18b71f.tar.gz WarpX-33e7d3adbdc7c8e602befb5e9eb49c0d2b18b71f.tar.zst WarpX-33e7d3adbdc7c8e602befb5e9eb49c0d2b18b71f.zip |
fix more bugs in perf tests when running on Cori
Diffstat (limited to 'Tools/performance_tests/functions_perftest.py')
-rw-r--r-- | Tools/performance_tests/functions_perftest.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Tools/performance_tests/functions_perftest.py b/Tools/performance_tests/functions_perftest.py index bdcacd21b..b8066984d 100644 --- a/Tools/performance_tests/functions_perftest.py +++ b/Tools/performance_tests/functions_perftest.py @@ -72,9 +72,13 @@ def run_batch(run_name, res_dir, bin_name, config_command, architecture='knl',\ return 0 def run_batch_nnode(test_list, res_dir, bin_name, config_command, machine, architecture='knl', Cname='knl', n_node=1, runtime_param_list=[]): + if machine == 'cori': + from cori import time_min, get_batch_string, get_run_string + if machine == 'summit': + from summit import time_min, get_batch_string, get_run_string # Clean res_dir if os.path.exists(res_dir): - shutil.rmtree(res_dir, ignore_errors=True) + shutil.rmtree(res_dir, ignore_errors=True) os.makedirs(res_dir) # Copy files to res_dir cwd = os.environ['AUTOMATED_PERF_TESTS'] + '/warpx/Tools/performance_tests/' @@ -84,11 +88,11 @@ def run_batch_nnode(test_list, res_dir, bin_name, config_command, machine, archi # Calculate simulation time. Take 5 min + 2 min / simulation job_time_min = time_min(len(test_list)) job_time_str = str(int(job_time_min/60)) + ':' + str(int(job_time_min%60)) + ':00' - batch_string = cori.get_batch_string() + batch_string = get_batch_string(test_list, job_time_str, Cname, n_node) for count, current_test in enumerate(test_list): shutil.copy(cwd + current_test.input_file, res_dir) - run_string = get_run_string() + run_string = get_run_string(current_test, architecture, n_node, count, bin_name, runtime_param_list) batch_string += run_string batch_string += 'rm -rf plotfiles ; rm -rf lab_frame_data\n' batch_file = 'batch_script.sh' |