commit
0921556456
|
@ -143,6 +143,10 @@ static int DUMMY_stat (const char *path, struct stat *buf, IOR_param_t * param){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int DUMMY_check_params(IOR_param_t * test){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
ior_aiori_t dummy_aiori = {
|
ior_aiori_t dummy_aiori = {
|
||||||
.name = "DUMMY",
|
.name = "DUMMY",
|
||||||
.name_legacy = NULL,
|
.name_legacy = NULL,
|
||||||
|
@ -163,4 +167,5 @@ ior_aiori_t dummy_aiori = {
|
||||||
.finalize = NULL,
|
.finalize = NULL,
|
||||||
.get_options = DUMMY_options,
|
.get_options = DUMMY_options,
|
||||||
.enable_mdtest = true,
|
.enable_mdtest = true,
|
||||||
|
.check_params = DUMMY_check_params
|
||||||
};
|
};
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
static IOR_offset_t POSIX_Xfer(int, void *, IOR_size_t *,
|
static IOR_offset_t POSIX_Xfer(int, void *, IOR_size_t *,
|
||||||
IOR_offset_t, IOR_param_t *);
|
IOR_offset_t, IOR_param_t *);
|
||||||
static void POSIX_Fsync(void *, IOR_param_t *);
|
static void POSIX_Fsync(void *, IOR_param_t *);
|
||||||
|
static void POSIX_Sync(IOR_param_t * );
|
||||||
|
|
||||||
/************************** O P T I O N S *****************************/
|
/************************** O P T I O N S *****************************/
|
||||||
typedef struct{
|
typedef struct{
|
||||||
|
@ -122,6 +123,7 @@ ior_aiori_t posix_aiori = {
|
||||||
.stat = aiori_posix_stat,
|
.stat = aiori_posix_stat,
|
||||||
.get_options = POSIX_options,
|
.get_options = POSIX_options,
|
||||||
.enable_mdtest = true,
|
.enable_mdtest = true,
|
||||||
|
.sync = POSIX_Sync
|
||||||
};
|
};
|
||||||
|
|
||||||
/***************************** F U N C T I O N S ******************************/
|
/***************************** F U N C T I O N S ******************************/
|
||||||
|
@ -588,6 +590,16 @@ static void POSIX_Fsync(void *fd, IOR_param_t * param)
|
||||||
EWARNF("fsync(%d) failed", *(int *)fd);
|
EWARNF("fsync(%d) failed", *(int *)fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void POSIX_Sync(IOR_param_t * param)
|
||||||
|
{
|
||||||
|
int ret = system("sync");
|
||||||
|
if (ret != 0){
|
||||||
|
FAIL("Error executing the sync command, ensure it exists.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close a file through the POSIX interface.
|
* Close a file through the POSIX interface.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -159,6 +159,8 @@ static void S3_Fsync(void*, IOR_param_t*);
|
||||||
static IOR_offset_t S3_GetFileSize(IOR_param_t*, MPI_Comm, char*);
|
static IOR_offset_t S3_GetFileSize(IOR_param_t*, MPI_Comm, char*);
|
||||||
static void S3_init();
|
static void S3_init();
|
||||||
static void S3_finalize();
|
static void S3_finalize();
|
||||||
|
static int S3_check_params(IOR_param_t *);
|
||||||
|
|
||||||
|
|
||||||
/************************** D E C L A R A T I O N S ***************************/
|
/************************** D E C L A R A T I O N S ***************************/
|
||||||
|
|
||||||
|
@ -177,7 +179,8 @@ ior_aiori_t s3_aiori = {
|
||||||
.fsync = S3_Fsync,
|
.fsync = S3_Fsync,
|
||||||
.get_file_size = S3_GetFileSize,
|
.get_file_size = S3_GetFileSize,
|
||||||
.initialize = S3_init,
|
.initialize = S3_init,
|
||||||
.finalize = S3_finalize
|
.finalize = S3_finalize,
|
||||||
|
.check_params = S3_check_params
|
||||||
};
|
};
|
||||||
|
|
||||||
// "S3", plus EMC-extensions enabled
|
// "S3", plus EMC-extensions enabled
|
||||||
|
@ -228,6 +231,22 @@ static void S3_finalize(){
|
||||||
aws_cleanup();
|
aws_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int S3_check_params(IOR_param_t * test){
|
||||||
|
/* N:1 and N:N */
|
||||||
|
IOR_offset_t NtoN = test->filePerProc;
|
||||||
|
IOR_offset_t Nto1 = ! NtoN;
|
||||||
|
IOR_offset_t s = test->segmentCount;
|
||||||
|
IOR_offset_t t = test->transferSize;
|
||||||
|
IOR_offset_t b = test->blockSize;
|
||||||
|
|
||||||
|
if (Nto1 && (s != 1) && (b != t)) {
|
||||||
|
ERR("N:1 (strided) requires xfer-size == block-size");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* modelled on similar macros in iordef.h */
|
/* modelled on similar macros in iordef.h */
|
||||||
#define CURL_ERR(MSG, CURL_ERRNO, PARAM) \
|
#define CURL_ERR(MSG, CURL_ERRNO, PARAM) \
|
||||||
do { \
|
do { \
|
||||||
|
|
|
@ -86,6 +86,8 @@ typedef struct ior_aiori {
|
||||||
void (*finalize)(); /* called once per program after MPI is shutdown */
|
void (*finalize)(); /* called once per program after MPI is shutdown */
|
||||||
option_help * (*get_options)(void ** init_backend_options, void* init_values); /* initializes the backend options as well and returns the pointer to the option help structure */
|
option_help * (*get_options)(void ** init_backend_options, void* init_values); /* initializes the backend options as well and returns the pointer to the option help structure */
|
||||||
bool enable_mdtest;
|
bool enable_mdtest;
|
||||||
|
int (*check_params)(IOR_param_t *); /* check if the provided parameters for the given test and the module options are correct, if they aren't print a message and exit(1) or return 1*/
|
||||||
|
void (*sync)(IOR_param_t * ); /* synchronize every pending operation for this storage */
|
||||||
} ior_aiori_t;
|
} ior_aiori_t;
|
||||||
|
|
||||||
enum bench_type {
|
enum bench_type {
|
||||||
|
|
15
src/ior.c
15
src/ior.c
|
@ -1678,15 +1678,12 @@ static void ValidateTests(IOR_param_t * test)
|
||||||
if (test->useExistingTestFile && test->lustre_set_striping)
|
if (test->useExistingTestFile && test->lustre_set_striping)
|
||||||
ERR("Lustre stripe options are incompatible with useExistingTestFile");
|
ERR("Lustre stripe options are incompatible with useExistingTestFile");
|
||||||
|
|
||||||
/* N:1 and N:N */
|
/* allow the backend to validate the options */
|
||||||
IOR_offset_t NtoN = test->filePerProc;
|
if(test->backend->check_params){
|
||||||
IOR_offset_t Nto1 = ! NtoN;
|
int check = test->backend->check_params(test);
|
||||||
IOR_offset_t s = test->segmentCount;
|
if (check == 0){
|
||||||
IOR_offset_t t = test->transferSize;
|
ERR("The backend returned that the test parameters are invalid.");
|
||||||
IOR_offset_t b = test->blockSize;
|
}
|
||||||
|
|
||||||
if (Nto1 && (s != 1) && (b != t)) {
|
|
||||||
ERR("N:1 (strided) requires xfer-size == block-size");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
50
src/mdtest.c
50
src/mdtest.c
|
@ -148,6 +148,7 @@ static size_t write_bytes;
|
||||||
static int stone_wall_timer_seconds;
|
static int stone_wall_timer_seconds;
|
||||||
static size_t read_bytes;
|
static size_t read_bytes;
|
||||||
static int sync_file;
|
static int sync_file;
|
||||||
|
static int call_sync;
|
||||||
static int path_count;
|
static int path_count;
|
||||||
static int nstride; /* neighbor stride */
|
static int nstride; /* neighbor stride */
|
||||||
static int make_node = 0;
|
static int make_node = 0;
|
||||||
|
@ -263,6 +264,19 @@ static void prep_testdir(int j, int dir_iter){
|
||||||
pos += sprintf(& testdir[pos], ".%d-%d", j, dir_iter);
|
pos += sprintf(& testdir[pos], ".%d-%d", j, dir_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void phase_end(){
|
||||||
|
if (call_sync){
|
||||||
|
if(! backend->sync){
|
||||||
|
FAIL("Error, backend does not provide the sync method, but your requested to use sync.");
|
||||||
|
}
|
||||||
|
backend->sync(& param);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (barriers) {
|
||||||
|
MPI_Barrier(testComm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function copies the unique directory name for a given option to
|
* This function copies the unique directory name for a given option to
|
||||||
* the "to" parameter. Some memory must be allocated to the "to" parameter.
|
* the "to" parameter. Some memory must be allocated to the "to" parameter.
|
||||||
|
@ -836,9 +850,7 @@ void directory_test(const int iteration, const int ntasks, const char *path, ran
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (barriers) {
|
phase_end();
|
||||||
MPI_Barrier(testComm);
|
|
||||||
}
|
|
||||||
t[1] = GetTimeStamp();
|
t[1] = GetTimeStamp();
|
||||||
|
|
||||||
/* stat phase */
|
/* stat phase */
|
||||||
|
@ -864,10 +876,7 @@ void directory_test(const int iteration, const int ntasks, const char *path, ran
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
phase_end();
|
||||||
if (barriers) {
|
|
||||||
MPI_Barrier(testComm);
|
|
||||||
}
|
|
||||||
t[2] = GetTimeStamp();
|
t[2] = GetTimeStamp();
|
||||||
|
|
||||||
/* read phase */
|
/* read phase */
|
||||||
|
@ -894,9 +903,7 @@ void directory_test(const int iteration, const int ntasks, const char *path, ran
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (barriers) {
|
phase_end();
|
||||||
MPI_Barrier(testComm);
|
|
||||||
}
|
|
||||||
t[3] = GetTimeStamp();
|
t[3] = GetTimeStamp();
|
||||||
|
|
||||||
if (remove_only) {
|
if (remove_only) {
|
||||||
|
@ -924,9 +931,7 @@ void directory_test(const int iteration, const int ntasks, const char *path, ran
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (barriers) {
|
phase_end();
|
||||||
MPI_Barrier(testComm);
|
|
||||||
}
|
|
||||||
t[4] = GetTimeStamp();
|
t[4] = GetTimeStamp();
|
||||||
|
|
||||||
if (remove_only) {
|
if (remove_only) {
|
||||||
|
@ -1082,9 +1087,7 @@ void file_test(const int iteration, const int ntasks, const char *path, rank_pro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (barriers) {
|
phase_end();
|
||||||
MPI_Barrier(testComm);
|
|
||||||
}
|
|
||||||
t[1] = GetTimeStamp();
|
t[1] = GetTimeStamp();
|
||||||
|
|
||||||
/* stat phase */
|
/* stat phase */
|
||||||
|
@ -1107,9 +1110,7 @@ void file_test(const int iteration, const int ntasks, const char *path, rank_pro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (barriers) {
|
phase_end();
|
||||||
MPI_Barrier(testComm);
|
|
||||||
}
|
|
||||||
t[2] = GetTimeStamp();
|
t[2] = GetTimeStamp();
|
||||||
|
|
||||||
/* read phase */
|
/* read phase */
|
||||||
|
@ -1136,9 +1137,7 @@ void file_test(const int iteration, const int ntasks, const char *path, rank_pro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (barriers) {
|
phase_end();
|
||||||
MPI_Barrier(testComm);
|
|
||||||
}
|
|
||||||
t[3] = GetTimeStamp();
|
t[3] = GetTimeStamp();
|
||||||
|
|
||||||
if (remove_only) {
|
if (remove_only) {
|
||||||
|
@ -1168,9 +1167,7 @@ void file_test(const int iteration, const int ntasks, const char *path, rank_pro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (barriers) {
|
phase_end();
|
||||||
MPI_Barrier(testComm);
|
|
||||||
}
|
|
||||||
t[4] = GetTimeStamp();
|
t[4] = GetTimeStamp();
|
||||||
if (remove_only) {
|
if (remove_only) {
|
||||||
if (unique_dir_per_task) {
|
if (unique_dir_per_task) {
|
||||||
|
@ -1853,6 +1850,7 @@ void mdtest_init_args(){
|
||||||
stone_wall_timer_seconds = 0;
|
stone_wall_timer_seconds = 0;
|
||||||
read_bytes = 0;
|
read_bytes = 0;
|
||||||
sync_file = 0;
|
sync_file = 0;
|
||||||
|
call_sync = 0;
|
||||||
path_count = 0;
|
path_count = 0;
|
||||||
nstride = 0;
|
nstride = 0;
|
||||||
make_node = 0;
|
make_node = 0;
|
||||||
|
@ -1925,6 +1923,7 @@ mdtest_results_t * mdtest_run(int argc, char **argv, MPI_Comm world_com, FILE *
|
||||||
{'x', NULL, "StoneWallingStatusFile; contains the number of iterations of the creation phase, can be used to split phases across runs", OPTION_OPTIONAL_ARGUMENT, 's', & stoneWallingStatusFile},
|
{'x', NULL, "StoneWallingStatusFile; contains the number of iterations of the creation phase, can be used to split phases across runs", OPTION_OPTIONAL_ARGUMENT, 's', & stoneWallingStatusFile},
|
||||||
{'X', "verify-read", "Verify the data read", OPTION_FLAG, 'd', & verify_read},
|
{'X', "verify-read", "Verify the data read", OPTION_FLAG, 'd', & verify_read},
|
||||||
{'y', NULL, "sync file after writing", OPTION_FLAG, 'd', & sync_file},
|
{'y', NULL, "sync file after writing", OPTION_FLAG, 'd', & sync_file},
|
||||||
|
{'Y', NULL, "call the sync command after each phase (included in the timing; note it causes all IO to be flushed from your node)", OPTION_FLAG, 'd', & call_sync},
|
||||||
{'z', NULL, "depth of hierarchical directory structure", OPTION_OPTIONAL_ARGUMENT, 'd', & depth},
|
{'z', NULL, "depth of hierarchical directory structure", OPTION_OPTIONAL_ARGUMENT, 'd', & depth},
|
||||||
{'Z', NULL, "print time instead of rate", OPTION_FLAG, 'd', & print_time},
|
{'Z', NULL, "print time instead of rate", OPTION_FLAG, 'd', & print_time},
|
||||||
LAST_OPTION
|
LAST_OPTION
|
||||||
|
@ -2008,6 +2007,7 @@ mdtest_results_t * mdtest_run(int argc, char **argv, MPI_Comm world_com, FILE *
|
||||||
VERBOSE(1,-1, "unique_dir_per_task : %s", ( unique_dir_per_task ? "True" : "False" ));
|
VERBOSE(1,-1, "unique_dir_per_task : %s", ( unique_dir_per_task ? "True" : "False" ));
|
||||||
VERBOSE(1,-1, "write_bytes : "LLU"", write_bytes );
|
VERBOSE(1,-1, "write_bytes : "LLU"", write_bytes );
|
||||||
VERBOSE(1,-1, "sync_file : %s", ( sync_file ? "True" : "False" ));
|
VERBOSE(1,-1, "sync_file : %s", ( sync_file ? "True" : "False" ));
|
||||||
|
VERBOSE(1,-1, "call_sync : %s", ( call_sync ? "True" : "False" ));
|
||||||
VERBOSE(1,-1, "depth : %d", depth );
|
VERBOSE(1,-1, "depth : %d", depth );
|
||||||
VERBOSE(1,-1, "make_node : %d", make_node );
|
VERBOSE(1,-1, "make_node : %d", make_node );
|
||||||
|
|
||||||
|
|
|
@ -77,15 +77,15 @@ void* safeMalloc(uint64_t size){
|
||||||
}
|
}
|
||||||
|
|
||||||
void FailMessage(int rank, const char *location, char *format, ...) {
|
void FailMessage(int rank, const char *location, char *format, ...) {
|
||||||
char msg[4096];
|
char msg[4096];
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
vsnprintf(msg, 4096, format, args);
|
vsnprintf(msg, 4096, format, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
fprintf(out_logfile, "%s: Process %d: FAILED in %s, %s: %s\n",
|
fprintf(out_logfile, "%s: Process %d: FAILED in %s, %s: %s\n",
|
||||||
PrintTimestamp(), rank, location, msg, strerror(errno));
|
PrintTimestamp(), rank, location, msg, strerror(errno));
|
||||||
fflush(out_logfile);
|
fflush(out_logfile);
|
||||||
MPI_Abort(testComm, 1);
|
MPI_Abort(testComm, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t NodeMemoryStringToBytes(char *size_str)
|
size_t NodeMemoryStringToBytes(char *size_str)
|
||||||
|
|
Loading…
Reference in New Issue