commit
13f9721dbc
|
@ -1,20 +1,25 @@
|
||||||
SUBDIRS = . test
|
SUBDIRS = . test
|
||||||
|
|
||||||
bin_PROGRAMS = ior mdtest
|
bin_PROGRAMS = ior mdtest md-workbench
|
||||||
if USE_CAPS
|
if USE_CAPS
|
||||||
bin_PROGRAMS += IOR MDTEST
|
bin_PROGRAMS += IOR MDTEST MD-WORKBENCH
|
||||||
endif
|
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
|
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
|
extraSOURCES = aiori.c aiori-DUMMY.c
|
||||||
extraLDADD =
|
extraLDADD =
|
||||||
extraLDFLAGS =
|
extraLDFLAGS =
|
||||||
extraCPPFLAGS =
|
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_SOURCES = ior-main.c
|
||||||
ior_LDFLAGS =
|
ior_LDFLAGS =
|
||||||
ior_LDADD = libaiori.a
|
ior_LDADD = libaiori.a
|
||||||
|
@ -128,6 +133,16 @@ mdtest_LDFLAGS += $(extraLDFLAGS)
|
||||||
mdtest_LDADD += $(extraLDADD)
|
mdtest_LDADD += $(extraLDADD)
|
||||||
mdtest_CPPFLAGS += $(extraCPPFLAGS)
|
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_SOURCES = $(ior_SOURCES)
|
||||||
IOR_LDFLAGS = $(ior_LDFLAGS)
|
IOR_LDFLAGS = $(ior_LDFLAGS)
|
||||||
IOR_LDADD = $(ior_LDADD)
|
IOR_LDADD = $(ior_LDADD)
|
||||||
|
@ -141,7 +156,8 @@ MDTEST_CPPFLAGS = $(mdtest_CPPFLAGS)
|
||||||
libaiori_a_SOURCES += $(extraSOURCES)
|
libaiori_a_SOURCES += $(extraSOURCES)
|
||||||
libaiori_a_CPPFLAGS = $(extraCPPFLAGS)
|
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
|
all-local: build.conf
|
||||||
build.conf:
|
build.conf:
|
||||||
@echo LDFLAGS=$(LDFLAGS) $(extraLDFLAGS) $(extraLDADD) > build.conf
|
@echo LDFLAGS=$(LDFLAGS) $(extraLDFLAGS) $(extraLDADD) > build.conf
|
||||||
|
|
|
@ -497,7 +497,7 @@ aiori_fd_t *POSIX_Open(char *testFileName, int flags, aiori_mod_opt_t * param)
|
||||||
|
|
||||||
*fd = open64(testFileName, fd_oflag);
|
*fd = open64(testFileName, fd_oflag);
|
||||||
if (*fd < 0)
|
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
|
#ifdef HAVE_LUSTRE_USER
|
||||||
if (o->lustre_ignore_locks) {
|
if (o->lustre_ignore_locks) {
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -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
|
|
@ -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.
|
* Try using the system's PATH_MAX, which is what realpath and such use.
|
||||||
*/
|
*/
|
||||||
#define MAX_PATHLEN PATH_MAX
|
#define MAX_PATHLEN PATH_MAX
|
||||||
|
|
||||||
|
|
||||||
#ifdef __linux__
|
|
||||||
#define ERROR_LOCATION __func__
|
#define ERROR_LOCATION __func__
|
||||||
#else
|
|
||||||
#define ERROR_LOCATION __LINE__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void* safeMalloc(uint64_t size);
|
void* safeMalloc(uint64_t size);
|
||||||
|
|
Loading…
Reference in New Issue