IOR
|
#include <mpi.h>
#include <time.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include "md-workbench.h"
#include "config.h"
#include "aiori.h"
#include "utilities.h"
#include "parse_options.h"
Go to the source code of this file.
Data Structures | |
struct | op_stat_t |
struct | time_result_t |
struct | phase_stat_t |
struct | benchmark_options |
Macros | |
#define | DIRMODE S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IXOTH |
#define | CHECK_MPI_RET(ret) if (ret != MPI_SUCCESS){ printf("Unexpected error in MPI on Line %d\n", __LINE__);} |
#define | LLU (long long unsigned) |
#define | min(a, b) (a < b ? a : b) |
#define | oprintf(...) do { fprintf(o.logfile, __VA_ARGS__); fflush(o.logfile); } while(0); |
Functions | |
static void | def_dset_name (char *out_name, int n, int d) |
static void | def_obj_name (char *out_name, int n, int d, int i) |
void | init_options () |
static void | mdw_wait (double runtime) |
static void | init_stats (phase_stat_t *p, size_t repeats) |
static float | add_timed_result (double start, double phase_start_timer, time_result_t *results, size_t pos, double *max_time, double *out_op_time) |
static void | print_detailed_stat_header () |
static int | sum_err (phase_stat_t *p) |
static double | statistics_mean (int count, double *arr) |
static double | statistics_std_dev (int count, double *arr) |
static void | statistics_minmax (int count, double *arr, double *out_min, double *out_max) |
static void | print_p_stat (char *buff, const char *name, phase_stat_t *p, double t, int print_global) |
static int | compare_floats (time_result_t *x, time_result_t *y) |
static double | runtime_quantile (int repeats, time_result_t *times, float quantile) |
static uint64_t | aggregate_timers (int repeats, int max_repeats, time_result_t *times, time_result_t *global_times) |
static void | compute_histogram (const char *name, time_result_t *times, time_statistics_t *stats, size_t repeats, int writeLatencyFile) |
static void | end_phase (const char *name, phase_stat_t *p) |
void | run_precreate (phase_stat_t *s, int current_index) |
void | run_benchmark (phase_stat_t *s, int *current_index_p) |
void | run_cleanup (phase_stat_t *s, int start_index) |
static void | printTime () |
static int | return_position () |
static void | store_position (int position) |
mdworkbench_results_t * | md_workbench_run (int argc, char **argv, MPI_Comm world_com, FILE *out_logfile) |
Variables | |
struct benchmark_options | o |
static option_help | options [] |
#define CHECK_MPI_RET | ( | ret | ) | if (ret != MPI_SUCCESS){ printf("Unexpected error in MPI on Line %d\n", __LINE__);} |
Definition at line 24 of file md-workbench.c.
Referenced by aggregate_timers(), end_phase(), and run_benchmark().
#define DIRMODE S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IXOTH |
Definition at line 22 of file md-workbench.c.
Referenced by md_workbench_run(), and run_precreate().
#define LLU (long long unsigned) |
Definition at line 25 of file md-workbench.c.
#define min | ( | a, | |
b | |||
) | (a < b ? a : b) |
Definition at line 26 of file md-workbench.c.
Referenced by Gfarm_get_file_size(), statistics_minmax(), summarize_results_rank0(), and TimeDeviation().
#define oprintf | ( | ... | ) | do { fprintf(o.logfile, __VA_ARGS__); fflush(o.logfile); } while(0); |
Definition at line 28 of file md-workbench.c.
Referenced by end_phase(), md_workbench_run(), printTime(), run_benchmark(), run_cleanup(), and run_precreate().
|
static |
Definition at line 181 of file md-workbench.c.
References GetTimeStamp(), time_result_t::runtime, and time_result_t::time_since_app_start.
Referenced by run_benchmark(), run_cleanup(), and run_precreate().
|
static |
Definition at line 356 of file md-workbench.c.
References CHECK_MPI_RET, benchmark_options::com, o, benchmark_options::rank, and benchmark_options::size.
Referenced by end_phase().
|
static |
Definition at line 346 of file md-workbench.c.
References time_result_t::runtime.
Referenced by compute_histogram().
|
static |
Definition at line 379 of file md-workbench.c.
References compare_floats(), ERRF, benchmark_options::global_iteration, benchmark_options::latency_file_prefix, time_statistics_t::max, MAX_PATHLEN, time_statistics_t::median, time_statistics_t::min, NULL, o, time_statistics_t::q1, time_statistics_t::q3, time_statistics_t::q90, time_statistics_t::q99, benchmark_options::rank, benchmark_options::relative_waiting_factor, time_result_t::runtime, and runtime_quantile().
Referenced by end_phase().
|
static |
Definition at line 130 of file md-workbench.c.
References o, and benchmark_options::prefix.
Referenced by run_cleanup(), and run_precreate().
|
static |
Definition at line 134 of file md-workbench.c.
References o, and benchmark_options::prefix.
Referenced by run_benchmark(), run_cleanup(), and run_precreate().
|
static |
Definition at line 409 of file md-workbench.c.
References aggregate_timers(), CHECK_MPI_RET, benchmark_options::com, compute_histogram(), mdworkbench_results_t::count, benchmark_options::dset_count, phase_stat_t::dset_create, init_stats(), benchmark_options::latency_keep_all, phase_stat_t::max_op_time, MAX_PATHLEN, benchmark_options::num, o, oprintf, benchmark_options::precreate, print_p_stat(), benchmark_options::process_report, benchmark_options::rank, benchmark_options::read_only, phase_stat_t::repeats, mdworkbench_results_t::result, benchmark_options::results, benchmark_options::size, mdworkbench_result_t::stats_create, phase_stat_t::stats_create, mdworkbench_result_t::stats_delete, phase_stat_t::stats_delete, mdworkbench_result_t::stats_read, phase_stat_t::stats_read, mdworkbench_result_t::stats_stat, phase_stat_t::stats_stat, phase_stat_t::stonewall_iterations, phase_stat_t::t, phase_stat_t::t_all, phase_stat_t::time_create, phase_stat_t::time_delete, phase_stat_t::time_read, and phase_stat_t::time_stat.
Referenced by md_workbench_run().
void init_options | ( | ) |
Definition at line 138 of file md-workbench.c.
References benchmark_options::interface, and o.
Referenced by md_workbench_run().
|
static |
Definition at line 171 of file md-workbench.c.
References phase_stat_t::repeats, phase_stat_t::time_create, phase_stat_t::time_delete, phase_stat_t::time_read, and phase_stat_t::time_stat.
Referenced by end_phase(), and md_workbench_run().
mdworkbench_results_t* md_workbench_run | ( | int | argc, |
char ** | argv, | ||
MPI_Comm | world_com, | ||
FILE * | out_logfile | ||
) |
Definition at line 876 of file md-workbench.c.
References benchmark_options::adaptive_waiting_mode, aiori_select(), airoi_create_all_module_options(), airoi_update_module_options(), benchmark_options::backend, benchmark_options::backend_options, ior_aiori::check_params, benchmark_options::com, mdworkbench_results_t::count, DIRMODE, benchmark_options::dset_count, ior_aiori::enable_mdtest, end_phase(), ERR, EWARNF, benchmark_options::file_size, ior_aiori::finalize, GetTimeStamp(), benchmark_options::global_iteration, global_options, benchmark_options::hints, init_clock(), init_options(), init_stats(), ior_aiori::initialize, benchmark_options::interface, benchmark_options::iterations, benchmark_options::logfile, ior_aiori::mkdir, NULL, benchmark_options::num, o, oprintf, option_parse(), out_logfile, benchmark_options::phase_benchmark, benchmark_options::phase_cleanup, benchmark_options::phase_precreate, phase_stat_t::phase_start_timer, benchmark_options::precreate, benchmark_options::prefix, print_detailed_stat_header(), benchmark_options::print_detailed_stats, printTime(), benchmark_options::quiet_output, benchmark_options::random_buffer_offset, benchmark_options::rank, benchmark_options::relative_waiting_factor, benchmark_options::results, return_position(), ior_aiori::rmdir, run_benchmark(), run_cleanup(), run_precreate(), benchmark_options::size, benchmark_options::start_item_number, benchmark_options::stonewall_timer, benchmark_options::stonewall_timer_wear_out, store_position(), phase_stat_t::t, and ior_aiori::xfer_hints.
Referenced by main().
|
static |
Definition at line 152 of file md-workbench.c.
References GetTimeStamp(), NULL, o, and benchmark_options::relative_waiting_factor.
Referenced by run_benchmark().
|
static |
Definition at line 193 of file md-workbench.c.
Referenced by md_workbench_run().
|
static |
Definition at line 229 of file md-workbench.c.
References mdworkbench_results_t::count, phase_stat_t::dset_create, phase_stat_t::dset_delete, op_stat_t::err, mdworkbench_result_t::errors, mdworkbench_results_t::errors, benchmark_options::file_size, mdworkbench_result_t::iterations_done, time_statistics_t::max, mdworkbench_result_t::max_op_time, phase_stat_t::max_op_time, time_statistics_t::median, time_statistics_t::min, o, phase_stat_t::obj_create, phase_stat_t::obj_delete, phase_stat_t::obj_read, phase_stat_t::obj_stat, benchmark_options::print_detailed_stats, time_statistics_t::q1, time_statistics_t::q3, time_statistics_t::q90, time_statistics_t::q99, benchmark_options::quiet_output, mdworkbench_result_t::rate, benchmark_options::read_only, benchmark_options::relative_waiting_factor, phase_stat_t::repeats, mdworkbench_results_t::result, benchmark_options::results, mdworkbench_result_t::runtime, benchmark_options::size, statistics_mean(), statistics_minmax(), statistics_std_dev(), phase_stat_t::stats_create, phase_stat_t::stats_delete, phase_stat_t::stats_read, phase_stat_t::stats_stat, phase_stat_t::stonewall_iterations, op_stat_t::suc, sum_err(), phase_stat_t::t, and phase_stat_t::t_all.
Referenced by end_phase().
|
static |
Definition at line 837 of file md-workbench.c.
References oprintf.
Referenced by md_workbench_run().
|
static |
Definition at line 844 of file md-workbench.c.
References benchmark_options::com, ERRF, o, benchmark_options::rank, and benchmark_options::run_info_file.
Referenced by md_workbench_run().
void run_benchmark | ( | phase_stat_t * | s, |
int * | current_index_p | ||
) |
Definition at line 594 of file md-workbench.c.
References add_timed_result(), aligned_buffer_alloc(), aligned_buffer_free(), benchmark_options::backend, benchmark_options::backend_options, CHECK_MPI_RET, ior_aiori::close, benchmark_options::com, ior_aiori::create, def_obj_name(), ior_aiori::delete, benchmark_options::dset_count, op_stat_t::err, ERRF, EWARNF, FAIL, benchmark_options::file_size, generate_memory_pattern(), GetTimeStamp(), benchmark_options::gpu_memory_flags, benchmark_options::ignore_precreate_errors, IOR_CREAT, IOR_RDONLY, IOR_WRONLY, phase_stat_t::max_op_time, MAX_PATHLEN, mdw_wait(), NULL, benchmark_options::num, o, phase_stat_t::obj_create, phase_stat_t::obj_delete, phase_stat_t::obj_read, phase_stat_t::obj_stat, benchmark_options::offset, ior_aiori::open, oprintf, phase_stat_t::phase_start_timer, benchmark_options::precreate, benchmark_options::random_buffer_offset, benchmark_options::rank, READ, benchmark_options::read_only, benchmark_options::relative_waiting_factor, phase_stat_t::repeats, benchmark_options::size, ior_aiori::stat, phase_stat_t::stonewall_iterations, benchmark_options::stonewall_timer, benchmark_options::stonewall_timer_wear_out, op_stat_t::suc, phase_stat_t::t, phase_stat_t::time_create, phase_stat_t::time_delete, phase_stat_t::time_read, phase_stat_t::time_stat, update_write_memory_pattern(), benchmark_options::verbosity, verify_memory_pattern(), benchmark_options::verify_read, WRITE, and ior_aiori::xfer.
Referenced by md_workbench_run().
void run_cleanup | ( | phase_stat_t * | s, |
int | start_index | ||
) |
Definition at line 768 of file md-workbench.c.
References add_timed_result(), benchmark_options::backend, benchmark_options::backend_options, def_dset_name(), def_obj_name(), ior_aiori::delete, benchmark_options::dset_count, phase_stat_t::dset_delete, GetTimeStamp(), phase_stat_t::max_op_time, MAX_PATHLEN, o, phase_stat_t::obj_delete, oprintf, phase_stat_t::phase_start_timer, benchmark_options::precreate, benchmark_options::rank, ior_aiori::rmdir, op_stat_t::suc, phase_stat_t::time_delete, and benchmark_options::verbosity.
Referenced by md_workbench_run().
void run_precreate | ( | phase_stat_t * | s, |
int | current_index | ||
) |
Definition at line 536 of file md-workbench.c.
References add_timed_result(), aligned_buffer_alloc(), aligned_buffer_free(), benchmark_options::backend, benchmark_options::backend_options, ior_aiori::close, ior_aiori::create, def_dset_name(), def_obj_name(), DIRMODE, benchmark_options::dset_count, phase_stat_t::dset_create, op_stat_t::err, ERRF, FAIL, benchmark_options::file_size, generate_memory_pattern(), GetTimeStamp(), benchmark_options::gpu_memory_flags, benchmark_options::ignore_precreate_errors, IOR_CREAT, IOR_WRONLY, phase_stat_t::max_op_time, MAX_PATHLEN, ior_aiori::mkdir, NULL, o, phase_stat_t::obj_create, oprintf, phase_stat_t::phase_start_timer, benchmark_options::precreate, benchmark_options::random_buffer_offset, benchmark_options::rank, op_stat_t::suc, phase_stat_t::time_create, update_write_memory_pattern(), benchmark_options::verbosity, WRITE, and ior_aiori::xfer.
Referenced by md_workbench_run().
|
static |
Definition at line 350 of file md-workbench.c.
References time_result_t::runtime.
Referenced by compute_histogram().
|
static |
Definition at line 201 of file md-workbench.c.
References o, and benchmark_options::size.
Referenced by print_p_stat(), and statistics_std_dev().
|
static |
Definition at line 218 of file md-workbench.c.
References min, o, and benchmark_options::size.
Referenced by print_p_stat().
|
static |
Definition at line 209 of file md-workbench.c.
References o, benchmark_options::size, and statistics_mean().
Referenced by print_p_stat().
|
static |
Definition at line 863 of file md-workbench.c.
References ERRF, o, benchmark_options::rank, and benchmark_options::run_info_file.
Referenced by md_workbench_run().
|
static |
Definition at line 197 of file md-workbench.c.
References phase_stat_t::dset_create, phase_stat_t::dset_delete, op_stat_t::err, phase_stat_t::obj_create, phase_stat_t::obj_delete, phase_stat_t::obj_read, and phase_stat_t::obj_stat.
Referenced by print_p_stat().
struct benchmark_options o |
Definition at line 128 of file md-workbench.c.
Referenced by aggregate_timers(), aio_check_params(), aio_Close(), aio_create(), aio_finalize(), aio_Fsync(), aio_initialize(), aio_Open(), aio_options(), aio_Sync(), aio_Xfer(), compute_histogram(), createGlobalOptions(), def_dset_name(), def_obj_name(), DFS_check_params(), DFS_Create(), DFS_Finalize(), DFS_Init(), DFS_Open(), DFS_options(), DUMMY_Create(), DUMMY_options(), DUMMY_Xfer(), end_phase(), HDF5_check_params(), HDF5_Open(), HDF5_options(), HDFS_access(), HDFS_Close(), HDFS_Create_Or_Open(), HDFS_Delete(), HDFS_Fsync(), HDFS_GetFileSize(), HDFS_mkdir(), HDFS_options(), HDFS_rmdir(), HDFS_stat(), HDFS_statfs(), HDFS_Xfer(), IME_Open(), IME_Options(), init_options(), ior_mmap_file(), md_workbench_run(), mdw_wait(), MMAP_Close(), MMAP_Fsync(), MMAP_options(), MMAP_Xfer(), MPIIO_options(), NCMPI_Create(), NCMPI_Open(), NCMPI_options(), NCMPI_Xfer(), option_parse(), option_parse_token(), POSIX_check_params(), POSIX_Close(), POSIX_Create(), POSIX_Open(), POSIX_options(), POSIX_Xfer(), print_current_option_section(), print_help_section(), print_p_stat(), return_position(), run_benchmark(), run_cleanup(), run_precreate(), S3_check_params(), S3_Create(), S3_Delete(), S3_final(), S3_init(), S3_mkdir(), S3_Open(), S3_options(), S3_rmdir(), S3_stat(), S3_statfs(), S3_Xfer(), SeekOffset(), SetupDataSet(), statistics_mean(), statistics_minmax(), statistics_std_dev(), and store_position().
|
static |
Definition at line 803 of file md-workbench.c.