Merge pull request #267 from hpc/feature-md-workbench

Feature: md-workbench
master
Julian Kunkel 2020-11-10 19:05:20 +00:00 committed by GitHub
commit 13f9721dbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1095 additions and 12 deletions

View File

@ -1,20 +1,25 @@
SUBDIRS = . test
bin_PROGRAMS = ior mdtest
bin_PROGRAMS = ior mdtest md-workbench
if USE_CAPS
bin_PROGRAMS += IOR MDTEST
bin_PROGRAMS += IOR MDTEST MD-WORKBENCH
endif
noinst_HEADERS = ior.h utilities.h parse_options.h aiori.h iordef.h ior-internal.h option.h mdtest.h aiori-debug.h aiori-POSIX.h
noinst_HEADERS = ior.h utilities.h parse_options.h aiori.h iordef.h ior-internal.h option.h mdtest.h aiori-debug.h aiori-POSIX.h md-workbench.h
lib_LIBRARIES = libaiori.a
libaiori_a_SOURCES = ior.c mdtest.c utilities.c parse_options.c ior-output.c option.c
libaiori_a_SOURCES = ior.c mdtest.c utilities.c parse_options.c ior-output.c option.c md-workbench.c
extraSOURCES = aiori.c aiori-DUMMY.c
extraLDADD =
extraLDFLAGS =
extraCPPFLAGS =
md_workbench_SOURCES = md-workbench-main.c
md_workbench_LDFLAGS =
md_workbench_LDADD = libaiori.a
md_workbench_CPPFLAGS =
ior_SOURCES = ior-main.c
ior_LDFLAGS =
ior_LDADD = libaiori.a
@ -128,6 +133,16 @@ mdtest_LDFLAGS += $(extraLDFLAGS)
mdtest_LDADD += $(extraLDADD)
mdtest_CPPFLAGS += $(extraCPPFLAGS)
md_workbench_SOURCES += $(extraSOURCES)
md_workbench_LDFLAGS += $(extraLDFLAGS)
md_workbench_LDADD += $(extraLDADD)
md_workbench_CPPFLAGS += $(extraCPPFLAGS)
MD_WORKBENCH_SOURCES = $(md_workbench_SOURCES)
MD_WORKBENCH_LDFLAGS = $(md_workbench_LDFLAGS)
MD_WORKBENCH_LDADD = $(md_workbench_LDADD)
MD_WORKBENCH_CPPFLAGS = $(md_workbench_CPPFLAGS)
IOR_SOURCES = $(ior_SOURCES)
IOR_LDFLAGS = $(ior_LDFLAGS)
IOR_LDADD = $(ior_LDADD)
@ -141,7 +156,8 @@ MDTEST_CPPFLAGS = $(mdtest_CPPFLAGS)
libaiori_a_SOURCES += $(extraSOURCES)
libaiori_a_CPPFLAGS = $(extraCPPFLAGS)
# Generate config file with build flags to allow reuse of library
# Generate a config file with the build flags to allow the reuse of library
.PHONY: build.conf
all-local: build.conf
build.conf:
@echo LDFLAGS=$(LDFLAGS) $(extraLDFLAGS) $(extraLDADD) > build.conf

View File

@ -497,7 +497,7 @@ aiori_fd_t *POSIX_Open(char *testFileName, int flags, aiori_mod_opt_t * param)
*fd = open64(testFileName, fd_oflag);
if (*fd < 0)
ERRF("open64(\"%s\", %d) failed", testFileName, fd_oflag);
ERRF("open64(\"%s\", %d) failed: %s", testFileName, fd_oflag, strerror(errno));
#ifdef HAVE_LUSTRE_USER
if (o->lustre_ignore_locks) {

13
src/md-workbench-main.c Normal file
View File

@ -0,0 +1,13 @@
#include <mpi.h>
#include "md-workbench.h"
int main(int argc, char ** argv){
MPI_Init(& argc, & argv);
//phase_stat_t* results =
md_workbench_run(argc, argv, MPI_COMM_WORLD, stdout);
// API check, access the results of the first phase which is precrate.
//printf("Max op runtime: %f\n", results->max_op_time);
MPI_Finalize();
return 0;
}

1018
src/md-workbench.c Normal file

File diff suppressed because it is too large Load Diff

42
src/md-workbench.h Normal file
View File

@ -0,0 +1,42 @@
#ifndef IOR_MD_WORKBENCH_H
#define IOR_MD_WORKBENCH_H
#include <stdint.h>
#include <stdio.h>
#include <mpi.h>
typedef struct{
float min;
float q1;
float median;
float q3;
float q90;
float q99;
float max;
} time_statistics_t;
// statistics for running a single phase
typedef struct{ // NOTE: if this type is changed, adjust end_phase() !!!
time_statistics_t stats_create;
time_statistics_t stats_read;
time_statistics_t stats_stat;
time_statistics_t stats_delete;
int errors;
double rate;
double max_op_time;
double runtime;
uint64_t iterations_done;
} mdworkbench_result_t;
typedef struct{
int count; // the number of results
int errors;
mdworkbench_result_t result[];
} mdworkbench_results_t;
// @Return The first statistics returned are precreate, then iteration many benchmark runs, the last is cleanup
mdworkbench_results_t* md_workbench_run(int argc, char ** argv, MPI_Comm world_com, FILE * out_logfile);
#endif

View File

@ -30,13 +30,7 @@ extern enum OutputFormat_t outputFormat; /* format of the output */
* Try using the system's PATH_MAX, which is what realpath and such use.
*/
#define MAX_PATHLEN PATH_MAX
#ifdef __linux__
#define ERROR_LOCATION __func__
#else
#define ERROR_LOCATION __LINE__
#endif
void* safeMalloc(uint64_t size);