diff options
Diffstat (limited to 'Tools/performance_tests/run_automated.py')
-rw-r--r-- | Tools/performance_tests/run_automated.py | 55 |
1 files changed, 19 insertions, 36 deletions
diff --git a/Tools/performance_tests/run_automated.py b/Tools/performance_tests/run_automated.py index a6a05fb54..1a4184013 100644 --- a/Tools/performance_tests/run_automated.py +++ b/Tools/performance_tests/run_automated.py @@ -67,7 +67,7 @@ parser.add_argument('--architecture', default='knl', help='which architecture to cross-compile for NERSC machines') parser.add_argument('--mode', - choices=['run', 'read', 'browse_output_files', 'write_csv'], + choices=['run', 'read', 'browse_output_files'], default='run', help='whether to run perftests or read their perf output. run calls read') args = parser.parse_args() @@ -79,20 +79,17 @@ architecture = args.architecture # Set behavior variables ######################## -write_csv = False +update_perf_log_repo = False browse_output_files = False -if args.mode == 'write_csv': - write_csv = True if args.mode == 'browse_output_files': browse_output_file = True if args.mode == 'read': - write_csv = True browse_output_files = True recompile = args.recompile perf_database_file = 'my_tests_database.h5' if args.automated == True: run_name = 'automated_tests' - perf_database_file = 'automated_tests_database.h5' + perf_database_file = machine + '_results.h5' rename_archive = True store_full_input = False update_perf_log_repo = True @@ -263,36 +260,22 @@ for n_node in n_node_list: # Extract sub-set of pandas data frame, write it to # csv file and copy this file to perf_logs repo # ------------------------------------------------- -if write_csv: - # Extract small data from data frame and write them to - # First, generate csv files - df = pd.read_hdf( perf_database_file ) - # One large file - df.loc[:,'step_time'] = pd.Series(df['time_running']/df['n_steps'], index=df.index) - # Make smaller dataframe with only data to be written to csv file - df_small = df.copy() - df_small.loc[ df_small['input_file']=='automated_test_6_output_2ppc', 'step_time'] = \ - df_small[ df_small['input_file']=='automated_test_6_output_2ppc' ]['time_WritePlotFile'] - df_small = df_small.loc[:, ['date', 'input_file', 'git_hashes', 'n_node', 'n_mpi_per_node', 'n_omp', 'rep', 'start_date', 'time_initialization', 'step_time'] ] - # Write to csv - df_small.to_csv( csv_file[machine] ) - # Errors may occur depending on the version of pandas. I had errors with v0.21.0 solved with 0.23.0 - # Second, move files to perf_logs repo - if update_perf_log_repo: - # get perf_logs repo - git_repo = git.Repo( perf_logs_repo ) - if push_on_perf_log_repo: - git_repo.git.stash('save') - git_repo.git.pull() - # move csv file to perf_logs repon and commit the new version - shutil.move( csv_file[machine], perf_logs_repo + '/logs_csv/' + csv_file[machine] ) - os.chdir( perf_logs_repo ) - sys.path.append('./') - import generate_index_html - git_repo.git.add('./index.html') - git_repo.git.add('./logs_csv/' + csv_file[machine]) - index = git_repo.index - index.commit("automated tests") +if update_perf_log_repo: + # get perf_logs repo + git_repo = git.Repo( perf_logs_repo ) + if push_on_perf_log_repo: + git_repo.git.stash('save') + git_repo.git.pull() + # move csv file to perf_logs repon and commit the new version + shutil.move( perf_database_file, perf_logs_repo + '/logs_hdf5/' + perf_database_file ) + os.chdir( perf_logs_repo ) + sys.path.append('./') + import generate_index_html + git_repo.git.add('./index.html') + git_repo.git.add('./logs_csv/' + csv_file[machine]) + git_repo.git.add('./logs_hdf5/' + perf_database_file) + index = git_repo.index + index.commit("automated tests") # Rename all result directories for archiving purposes: # include date in the name, and a counter to avoid over-writing |