MDTest library option.
Moved core functionality / variables used by both implementations to utilitiesmaster
parent
bcaea2a39f
commit
a6bfa0f94b
|
@ -15,7 +15,7 @@ ior_LDFLAGS =
|
|||
ior_LDADD =
|
||||
ior_CPPFLAGS =
|
||||
|
||||
mdtest_SOURCES = mdtest.c utilities.c getopt/optlist.c
|
||||
mdtest_SOURCES = mdtest-main.c mdtest.c utilities.c getopt/optlist.c
|
||||
mdtest_LDFLAGS =
|
||||
mdtest_LDADD =
|
||||
mdtest_CPPFLAGS =
|
||||
|
|
49
src/ior.c
49
src/ior.c
|
@ -36,19 +36,9 @@
|
|||
#include "parse_options.h"
|
||||
|
||||
|
||||
/* globals used by other files, also defined "extern" in ior.h */
|
||||
int numTasksWorld = 0;
|
||||
int rank = 0;
|
||||
int rankOffset = 0;
|
||||
int tasksPerNode = 0; /* tasks per node */
|
||||
int verbose = VERBOSE_0; /* verbose output */
|
||||
MPI_Comm testComm;
|
||||
|
||||
/* file scope globals */
|
||||
extern char **environ;
|
||||
int totalErrorCount = 0;
|
||||
double wall_clock_delta = 0;
|
||||
double wall_clock_deviation;
|
||||
|
||||
const ior_aiori_t *backend;
|
||||
|
||||
|
@ -77,6 +67,8 @@ int main(int argc, char **argv)
|
|||
IOR_test_t *tests_head;
|
||||
IOR_test_t *tptr;
|
||||
|
||||
mpi_comm_world = MPI_COMM_WORLD;
|
||||
|
||||
/*
|
||||
* check -h option from commandline without starting MPI;
|
||||
* if the help option is requested in a script file (showHelp=TRUE),
|
||||
|
@ -504,7 +496,7 @@ static int CountErrors(IOR_param_t * test, int access, int errors)
|
|||
* NOTE: This also assumes that the task count on all nodes is equal
|
||||
* to the task count on the host running MPI task 0.
|
||||
*/
|
||||
static int CountTasksPerNode(int numTasks, MPI_Comm comm)
|
||||
int CountTasksPerNode(int numTasks, MPI_Comm comm)
|
||||
{
|
||||
/* for debugging and testing */
|
||||
if (getenv("IOR_FAKE_TASK_PER_NODES")){
|
||||
|
@ -988,31 +980,6 @@ static void GetTestFileName(char *testFileName, IOR_param_t * test)
|
|||
free (fileNames);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get time stamp. Use MPI_Timer() unless _NO_MPI_TIMER is defined,
|
||||
* in which case use gettimeofday().
|
||||
*/
|
||||
static double GetTimeStamp(void)
|
||||
{
|
||||
double timeVal;
|
||||
#ifdef _NO_MPI_TIMER
|
||||
struct timeval timer;
|
||||
|
||||
if (gettimeofday(&timer, (struct timezone *)NULL) != 0)
|
||||
ERR("cannot use gettimeofday()");
|
||||
timeVal = (double)timer.tv_sec + ((double)timer.tv_usec / 1000000);
|
||||
#else /* not _NO_MPI_TIMER */
|
||||
timeVal = MPI_Wtime(); /* no MPI_CHECK(), just check return value */
|
||||
if (timeVal < 0)
|
||||
ERR("cannot use MPI_Wtime()");
|
||||
#endif /* _NO_MPI_TIMER */
|
||||
|
||||
/* wall_clock_delta is difference from root node's time */
|
||||
timeVal -= wall_clock_delta;
|
||||
|
||||
return (timeVal);
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert IOR_offset_t value to human readable string. This routine uses a
|
||||
* statically-allocated buffer internally and so is not re-entrant.
|
||||
|
@ -1266,7 +1233,7 @@ static void PrintRemoveTiming(double start, double finish, int rep)
|
|||
*/
|
||||
static void RemoveFile(char *testFileName, int filePerProc, IOR_param_t * test)
|
||||
{
|
||||
int tmpRankOffset;
|
||||
int tmpRankOffset = 0;
|
||||
if (filePerProc) {
|
||||
/* in random tasks, delete own file */
|
||||
if (test->reorderTasksRandom == TRUE) {
|
||||
|
@ -1885,9 +1852,9 @@ static void *malloc_and_touch(size_t size)
|
|||
|
||||
static void file_hits_histogram(IOR_param_t *params)
|
||||
{
|
||||
int *rankoffs;
|
||||
int *filecont;
|
||||
int *filehits;
|
||||
int *rankoffs = NULL;
|
||||
int *filecont = NULL;
|
||||
int *filehits = NULL;
|
||||
int ifile;
|
||||
int jfile;
|
||||
|
||||
|
@ -2614,7 +2581,7 @@ static IOR_offset_t *GetOffsetArrayRandom(IOR_param_t * test, int pretendRank,
|
|||
|
||||
static IOR_offset_t WriteOrReadSingle(IOR_offset_t pairCnt, IOR_offset_t *offsetArray, int pretendRank,
|
||||
IOR_offset_t * transferCount, int * errors, IOR_param_t * test, int * fd, IOR_io_buffers* ioBuffers, int access){
|
||||
IOR_offset_t amtXferred;
|
||||
IOR_offset_t amtXferred = 0;
|
||||
IOR_offset_t transfer;
|
||||
|
||||
void *buffer = ioBuffers->buffer;
|
||||
|
|
24
src/ior.h
24
src/ior.h
|
@ -40,15 +40,6 @@
|
|||
|
||||
|
||||
#include "iordef.h"
|
||||
|
||||
extern int numTasksWorld;
|
||||
extern int rank;
|
||||
extern int rankOffset;
|
||||
extern int tasksPerNode;
|
||||
extern int verbose;
|
||||
extern MPI_Comm testComm;
|
||||
|
||||
|
||||
/******************** DATA Packet Type ***************************************/
|
||||
/* Holds the types of data packets: generic, offset, timestamp, incompressible */
|
||||
|
||||
|
@ -91,6 +82,7 @@ typedef struct IO_BUFFERS
|
|||
|
||||
typedef struct
|
||||
{
|
||||
FILE * out_logfile;
|
||||
char debug[MAX_STR]; /* debug info string */
|
||||
unsigned int mode; /* file permissions */
|
||||
unsigned int openFlags; /* open flags (see also <open>) */
|
||||
|
@ -142,7 +134,7 @@ typedef struct
|
|||
int storeFileOffset; /* use file offset as stored signature */
|
||||
int deadlineForStonewalling; /* max time in seconds to run any test phase */
|
||||
int stoneWallingWearOut; /* wear out the stonewalling, once the timout is over, each process has to write the same amount */
|
||||
int stoneWallingWearOutIterations; /* the number of iterations for the stonewallingWearOut, needed for readBack */
|
||||
uint64_t stoneWallingWearOutIterations; /* the number of iterations for the stonewallingWearOut, needed for readBack */
|
||||
int maxTimeDuration; /* max time in minutes to run each test */
|
||||
int outlierThreshold; /* warn on outlier N seconds from mean */
|
||||
int verbose; /* verbosity */
|
||||
|
@ -222,7 +214,13 @@ typedef struct
|
|||
typedef struct {
|
||||
double *writeTime;
|
||||
double *readTime;
|
||||
int errors;
|
||||
size_t pairs_accessed; // number of I/Os done, useful for deadlineForStonewalling
|
||||
|
||||
double stonewall_time;
|
||||
long long stonewall_min_data_accessed;
|
||||
long long stonewall_avg_data_accessed;
|
||||
|
||||
IOR_offset_t *aggFileSizeFromStat;
|
||||
IOR_offset_t *aggFileSizeFromXfer;
|
||||
IOR_offset_t *aggFileSizeForBW;
|
||||
|
@ -240,5 +238,11 @@ IOR_test_t *CreateTest(IOR_param_t *init_params, int test_num);
|
|||
void AllocResults(IOR_test_t *test);
|
||||
void GetPlatformName(char *);
|
||||
void init_IOR_Param_t(IOR_param_t *p);
|
||||
int CountTasksPerNode(int numTasks, MPI_Comm comm);
|
||||
|
||||
/*
|
||||
* This function runs IOR given by command line, useful for testing
|
||||
*/
|
||||
IOR_test_t * ior_run(int argc, char **argv, MPI_Comm world_com, FILE * out_logfile);
|
||||
|
||||
#endif /* !_IOR_H */
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#include "mdtest.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
MPI_Init(&argc, &argv);
|
||||
|
||||
mdtest_run(argc, argv, MPI_COMM_WORLD, stdout);
|
||||
|
||||
MPI_Finalize();
|
||||
return 0;
|
||||
}
|
1343
src/mdtest.c
1343
src/mdtest.c
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,36 @@
|
|||
#ifndef _MDTEST_H
|
||||
#define _MDTEST_H
|
||||
|
||||
#include <mpi.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
MDTEST_DIR_CREATE_NUM = 0,
|
||||
MDTEST_DIR_STAT_NUM = 1,
|
||||
MDTEST_DIR_READ_NUM = 1,
|
||||
MDTEST_DIR_REMOVE_NUM = 3,
|
||||
MDTEST_FILE_CREATE_NUM = 4,
|
||||
MDTEST_FILE_STAT_NUM = 5,
|
||||
MDTEST_FILE_READ_NUM = 6,
|
||||
MDTEST_FILE_REMOVE_NUM = 7,
|
||||
MDTEST_TREE_CREATE_NUM = 8,
|
||||
MDTEST_TREE_REMOVE_NUM = 9,
|
||||
MDTEST_LAST_NUM
|
||||
} mdtest_test_num_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double rate[MDTEST_LAST_NUM];
|
||||
double time[MDTEST_LAST_NUM];
|
||||
uint64_t items[MDTEST_LAST_NUM];
|
||||
|
||||
uint64_t stonewall_last_item[MDTEST_LAST_NUM];
|
||||
double stonewall_time[MDTEST_LAST_NUM];
|
||||
uint64_t stonewall_item_min[MDTEST_LAST_NUM];
|
||||
uint64_t stonewall_item_sum[MDTEST_LAST_NUM];
|
||||
} mdtest_results_t;
|
||||
|
||||
mdtest_results_t * mdtest_run(int argc, char **argv, MPI_Comm world_com, FILE * out_logfile);
|
||||
|
||||
#endif
|
|
@ -21,8 +21,9 @@
|
|||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "getopt/optlist.h"
|
||||
|
||||
#include <getopt/optlist.h>
|
||||
#include "utilities.h"
|
||||
#include "ior.h"
|
||||
#include "aiori.h"
|
||||
#include "parse_options.h"
|
||||
|
@ -55,6 +56,14 @@ static IOR_offset_t StringToBytes(char *size_str)
|
|||
case 'G':
|
||||
size <<= 30;
|
||||
break;
|
||||
case 't':
|
||||
case 'T':
|
||||
size <<= 40;
|
||||
break;
|
||||
case 'p':
|
||||
case 'P':
|
||||
size <<= 50;
|
||||
break;
|
||||
}
|
||||
} else if (rc == 0) {
|
||||
size = -1;
|
||||
|
@ -102,7 +111,6 @@ static void CheckRunSettings(IOR_test_t *tests)
|
|||
{
|
||||
IOR_test_t *ptr;
|
||||
IOR_param_t *params;
|
||||
int needRead, needWrite;
|
||||
|
||||
for (ptr = tests; ptr != NULL; ptr = ptr->next) {
|
||||
params = &ptr->params;
|
||||
|
@ -121,16 +129,13 @@ static void CheckRunSettings(IOR_test_t *tests)
|
|||
* of HDFS, which doesn't support opening RDWR.
|
||||
* (We assume int-valued params are exclusively 0 or 1.)
|
||||
*/
|
||||
needRead = params->readFile |
|
||||
params->checkRead |
|
||||
params->checkWrite; /* checkWrite reads the file */
|
||||
needWrite = params->writeFile;
|
||||
if ((params->openFlags & IOR_RDWR)
|
||||
&& (needRead ^ needWrite))
|
||||
{
|
||||
/* need to either read or write, but not both */
|
||||
&& ((params->readFile | params->checkRead)
|
||||
^ (params->writeFile | params->checkWrite))
|
||||
&& (params->openFlags & IOR_RDWR)) {
|
||||
|
||||
params->openFlags &= ~(IOR_RDWR);
|
||||
if (needRead) {
|
||||
if (params->readFile | params->checkRead) {
|
||||
params->openFlags |= IOR_RDONLY;
|
||||
params->openFlags &= ~(IOR_CREAT|IOR_EXCL);
|
||||
}
|
||||
|
@ -140,7 +145,7 @@ static void CheckRunSettings(IOR_test_t *tests)
|
|||
|
||||
/* If numTasks set to 0, use all tasks */
|
||||
if (params->numTasks == 0) {
|
||||
MPI_CHECK(MPI_Comm_size(MPI_COMM_WORLD,
|
||||
MPI_CHECK(MPI_Comm_size(mpi_comm_world,
|
||||
¶ms->numTasks),
|
||||
"MPI_Comm_size() error");
|
||||
RecalculateExpectedFileSize(params);
|
||||
|
@ -159,7 +164,7 @@ void DecodeDirective(char *line, IOR_param_t *params)
|
|||
|
||||
rc = sscanf(line, " %[^=# \t\r\n] = %[^# \t\r\n] ", option, value);
|
||||
if (rc != 2 && rank == 0) {
|
||||
fprintf(stdout, "Syntax error in configuration options: %s\n",
|
||||
fprintf(out_logfile, "Syntax error in configuration options: %s\n",
|
||||
line);
|
||||
MPI_CHECK(MPI_Abort(MPI_COMM_WORLD, -1), "MPI_Abort() error");
|
||||
}
|
||||
|
@ -180,7 +185,7 @@ void DecodeDirective(char *line, IOR_param_t *params)
|
|||
} else if (strcasecmp(option, "stoneWallingWearOut") == 0) {
|
||||
params->stoneWallingWearOut = atoi(value);
|
||||
} else if (strcasecmp(option, "stoneWallingWearOutIterations") == 0) {
|
||||
params->stoneWallingWearOutIterations = atoi(value);
|
||||
params->stoneWallingWearOutIterations = atoll(value);
|
||||
} else if (strcasecmp(option, "maxtimeduration") == 0) {
|
||||
params->maxTimeDuration = atoi(value);
|
||||
} else if (strcasecmp(option, "outlierthreshold") == 0) {
|
||||
|
@ -331,7 +336,7 @@ void DecodeDirective(char *line, IOR_param_t *params)
|
|||
params->summary_every_test = atoi(value);
|
||||
} else {
|
||||
if (rank == 0)
|
||||
fprintf(stdout, "Unrecognized parameter \"%s\"\n",
|
||||
fprintf(out_logfile, "Unrecognized parameter \"%s\"\n",
|
||||
option);
|
||||
MPI_CHECK(MPI_Abort(MPI_COMM_WORLD, -1), "MPI_Abort() error");
|
||||
}
|
||||
|
@ -455,13 +460,11 @@ IOR_test_t *ReadConfigScript(char *scriptName)
|
|||
*/
|
||||
IOR_test_t *ParseCommandLine(int argc, char **argv)
|
||||
{
|
||||
static char * const opts =
|
||||
char * const opts =
|
||||
"a:A:b:BcCd:D:eEf:FgG:hHi:Ij:J:kKl:mM:nN:o:O:pPqQ:rRs:St:T:uU:vVwWxX:YzZ";
|
||||
int i;
|
||||
static IOR_test_t *tests = NULL;
|
||||
|
||||
/* suppress getopt() error message when a character is unrecognized */
|
||||
opterr = 0;
|
||||
IOR_test_t *tests = NULL;
|
||||
char * optarg;
|
||||
|
||||
init_IOR_Param_t(&initialTestParams);
|
||||
GetPlatformName(initialTestParams.platform);
|
||||
|
@ -562,7 +565,7 @@ IOR_test_t *ParseCommandLine(int argc, char **argv)
|
|||
initialTestParams.dataPacketType = offset;
|
||||
break;
|
||||
default:
|
||||
fprintf(stdout,
|
||||
fprintf(out_logfile,
|
||||
"Unknown arguement for -l %s generic assumed\n", optarg);
|
||||
break;
|
||||
}
|
||||
|
@ -652,20 +655,14 @@ IOR_test_t *ParseCommandLine(int argc, char **argv)
|
|||
initialTestParams.reorderTasksRandom = TRUE;
|
||||
break;
|
||||
default:
|
||||
fprintf(stdout,
|
||||
fprintf(out_logfile,
|
||||
"ParseCommandLine: unknown option `-%c'.\n",
|
||||
optopt);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = optind; i < argc; i++)
|
||||
fprintf(stdout, "non-option argument: %s\n", argv[i]);
|
||||
|
||||
/* If an IOR script was not used, initialize test queue to the defaults */
|
||||
if (tests == NULL) {
|
||||
tests = CreateTest(&initialTestParams, 0);
|
||||
AllocResults(tests);
|
||||
}
|
||||
tests = CreateTest(&initialTestParams, 0);
|
||||
AllocResults(tests);
|
||||
|
||||
CheckRunSettings(tests);
|
||||
|
||||
|
|
|
@ -16,10 +16,6 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
# define _GNU_SOURCE /* Needed for O_DIRECT in fcntl */
|
||||
#endif /* __linux__ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
@ -51,9 +47,16 @@
|
|||
|
||||
extern int errno;
|
||||
extern int numTasks;
|
||||
extern int rank;
|
||||
extern int rankOffset;
|
||||
extern int verbose;
|
||||
|
||||
/* globals used by other files, also defined "extern" in ior.h */
|
||||
int numTasksWorld = 0;
|
||||
int rank = 0;
|
||||
int rankOffset = 0;
|
||||
int tasksPerNode = 0; /* tasks per node */
|
||||
int verbose = VERBOSE_0; /* verbose output */
|
||||
MPI_Comm testComm;
|
||||
MPI_Comm mpi_comm_world;
|
||||
FILE * out_logfile;
|
||||
|
||||
/***************************** F U N C T I O N S ******************************/
|
||||
|
||||
|
@ -120,9 +123,9 @@ void DumpBuffer(void *buffer,
|
|||
to assume that it must always be */
|
||||
for (i = 0; i < ((size / sizeof(IOR_size_t)) / 4); i++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
fprintf(stdout, IOR_format" ", dumpBuf[4 * i + j]);
|
||||
fprintf(out_logfile, IOR_format" ", dumpBuf[4 * i + j]);
|
||||
}
|
||||
fprintf(stdout, "\n");
|
||||
fprintf(out_logfile, "\n");
|
||||
}
|
||||
return;
|
||||
} /* DumpBuffer() */
|
||||
|
@ -188,7 +191,7 @@ void OutputToRoot(int numTasks, MPI_Comm comm, char *stringToDisplay)
|
|||
/* display strings */
|
||||
if (rank == 0) {
|
||||
for (i = 0; i < numTasks; i++) {
|
||||
fprintf(stdout, "%s\n", stringArray[i]);
|
||||
fprintf(out_logfile, "%s\n", stringArray[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,7 +220,7 @@ void ExtractHint(char *settingVal, char *valueVal, char *hintString)
|
|||
tmpPtr2 = (char *)strstr(settingPtr, "IOR_HINT__GPFS__");
|
||||
if (tmpPtr1 == tmpPtr2) {
|
||||
settingPtr += strlen("IOR_HINT__GPFS__");
|
||||
fprintf(stdout,
|
||||
fprintf(out_logfile,
|
||||
"WARNING: Unable to set GPFS hints (not implemented.)\n");
|
||||
}
|
||||
}
|
||||
|
@ -304,7 +307,7 @@ void ShowHints(MPI_Info * mpiHints)
|
|||
MPI_CHECK(MPI_Info_get(*mpiHints, key, MPI_MAX_INFO_VAL - 1,
|
||||
value, &flag),
|
||||
"cannot get info object value");
|
||||
fprintf(stdout, "\t%s = %s\n", key, value);
|
||||
fprintf(out_logfile, "\t%s = %s\n", key, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -399,14 +402,14 @@ void ShowFileSystemSize(char *fileSystem)
|
|||
if (realpath(fileSystem, realPath) == NULL) {
|
||||
ERR("unable to use realpath()");
|
||||
}
|
||||
fprintf(stdout, "Path: %s\n", realPath);
|
||||
fprintf(stdout, "FS: %.1f %s Used FS: %2.1f%% ",
|
||||
fprintf(out_logfile, "Path: %s\n", realPath);
|
||||
fprintf(out_logfile, "FS: %.1f %s Used FS: %2.1f%% ",
|
||||
totalFileSystemSizeHR, fileSystemUnitStr,
|
||||
usedFileSystemPercentage);
|
||||
fprintf(stdout, "Inodes: %.1f Mi Used Inodes: %2.1f%%\n",
|
||||
fprintf(out_logfile, "Inodes: %.1f Mi Used Inodes: %2.1f%%\n",
|
||||
(double)totalInodes / (double)(1<<20),
|
||||
usedInodePercentage);
|
||||
fflush(stdout);
|
||||
fflush(out_logfile);
|
||||
#endif /* !_WIN32 */
|
||||
|
||||
return;
|
||||
|
@ -474,3 +477,65 @@ int uname(struct utsname *name)
|
|||
return 0;
|
||||
}
|
||||
#endif /* _WIN32 */
|
||||
|
||||
|
||||
double wall_clock_deviation;
|
||||
double wall_clock_delta = 0;
|
||||
|
||||
/*
|
||||
* Get time stamp. Use MPI_Timer() unless _NO_MPI_TIMER is defined,
|
||||
* in which case use gettimeofday().
|
||||
*/
|
||||
double GetTimeStamp(void)
|
||||
{
|
||||
double timeVal;
|
||||
#ifdef _NO_MPI_TIMER
|
||||
struct timeval timer;
|
||||
|
||||
if (gettimeofday(&timer, (struct timezone *)NULL) != 0)
|
||||
ERR("cannot use gettimeofday()");
|
||||
timeVal = (double)timer.tv_sec + ((double)timer.tv_usec / 1000000);
|
||||
#else /* not _NO_MPI_TIMER */
|
||||
timeVal = MPI_Wtime(); /* no MPI_CHECK(), just check return value */
|
||||
if (timeVal < 0)
|
||||
ERR("cannot use MPI_Wtime()");
|
||||
#endif /* _NO_MPI_TIMER */
|
||||
|
||||
/* wall_clock_delta is difference from root node's time */
|
||||
timeVal -= wall_clock_delta;
|
||||
|
||||
return (timeVal);
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine any spread (range) between node times.
|
||||
*/
|
||||
static double TimeDeviation(void)
|
||||
{
|
||||
double timestamp;
|
||||
double min = 0;
|
||||
double max = 0;
|
||||
double roottimestamp;
|
||||
|
||||
MPI_CHECK(MPI_Barrier(mpi_comm_world), "barrier error");
|
||||
timestamp = GetTimeStamp();
|
||||
MPI_CHECK(MPI_Reduce(×tamp, &min, 1, MPI_DOUBLE,
|
||||
MPI_MIN, 0, mpi_comm_world),
|
||||
"cannot reduce tasks' times");
|
||||
MPI_CHECK(MPI_Reduce(×tamp, &max, 1, MPI_DOUBLE,
|
||||
MPI_MAX, 0, mpi_comm_world),
|
||||
"cannot reduce tasks' times");
|
||||
|
||||
/* delta between individual nodes' time and root node's time */
|
||||
roottimestamp = timestamp;
|
||||
MPI_CHECK(MPI_Bcast(&roottimestamp, 1, MPI_DOUBLE, 0, mpi_comm_world),
|
||||
"cannot broadcast root's time");
|
||||
wall_clock_delta = timestamp - roottimestamp;
|
||||
|
||||
return max - min;
|
||||
}
|
||||
|
||||
void init_clock(){
|
||||
/* check for skew between tasks' start times */
|
||||
wall_clock_deviation = TimeDeviation();
|
||||
}
|
||||
|
|
|
@ -18,6 +18,15 @@
|
|||
#include <mpi.h>
|
||||
#include "ior.h"
|
||||
|
||||
extern int numTasksWorld;
|
||||
extern int rank;
|
||||
extern int rankOffset;
|
||||
extern int tasksPerNode;
|
||||
extern int verbose;
|
||||
extern MPI_Comm testComm;
|
||||
extern MPI_Comm mpi_comm_world;
|
||||
extern FILE * out_logfile;
|
||||
|
||||
void set_o_direct_flag(int *fd);
|
||||
|
||||
char *CurrentTimeString(void);
|
||||
|
@ -29,4 +38,9 @@ void SeedRandGen(MPI_Comm);
|
|||
void SetHints (MPI_Info *, char *);
|
||||
void ShowHints (MPI_Info *);
|
||||
|
||||
void init_clock(void);
|
||||
double GetTimeStamp(void);
|
||||
|
||||
extern double wall_clock_deviation;
|
||||
extern double wall_clock_delta;
|
||||
#endif /* !_UTILITIES_H */
|
||||
|
|
|
@ -7,9 +7,10 @@
|
|||
# Example: export IOR_EXTRA="-v -v -v"
|
||||
|
||||
IOR_MPIRUN=${IOR_MPIRUN:-mpiexec -np}
|
||||
IOR_EXEC=${IOR_EXEC:-./build/src/ior}
|
||||
IOR_BIN_DIR=${IOR_EXEC:-./build/src}
|
||||
IOR_OUT=${IOR_OUT:-./build/test}
|
||||
IOR_EXTRA=${IOR_EXTRA:-./build/test} # Add global options like verbosity
|
||||
IOR_EXTRA=${IOR_EXTRA:-} # Add global options like verbosity
|
||||
MDTEST_EXTRA=${MDTEST_EXTRA:-}
|
||||
|
||||
################################################################################
|
||||
mkdir -p ${IOR_OUT}
|
||||
|
@ -21,16 +22,24 @@ if [[ ! -e ${IOR_OUT} ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -e $IOR_EXEC ]]; then
|
||||
echo "IOR Executable \"$IOR_EXEC\" does not exist! Call me from the root directory!"
|
||||
if [[ ! -e ${IOR_BIN_DIR}/ior ]]; then
|
||||
echo "IOR Executable \"${IOR_BIN_DIR}/ior\" does not exist! Call me from the root directory!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -e ${IOR_BIN_DIR}/mdtest ]]; then
|
||||
echo "MDTest Executable \"${IOR_BIN_DIR}/mdtest\" does not exist! Call me from the root directory!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
ERRORS=0 # Number of errors detected while running
|
||||
I=0
|
||||
function TEST(){
|
||||
WHAT="${IOR_MPIRUN} ${@} ${IOR_EXTRA} -o /dev/shm/ior"
|
||||
function IOR(){
|
||||
RANKS=$1
|
||||
shift
|
||||
WHAT="${IOR_MPIRUN} $RANKS ${IOR_BIN_DIR}/ior ${@} ${IOR_EXTRA} -o /dev/shm/ior"
|
||||
$WHAT 1>${IOR_OUT}/$I 2>&1
|
||||
if [[ $? != 0 ]]; then
|
||||
echo -n "ERR"
|
||||
|
@ -42,25 +51,42 @@ function TEST(){
|
|||
I=$((${I}+1))
|
||||
}
|
||||
|
||||
TEST 1 ${IOR_EXEC} -a POSIX -w -z -F -Y -e -i1 -m -t 100k -b 1000k
|
||||
TEST 1 ${IOR_EXEC} -a POSIX -w -z -F -k -e -i2 -m -t 100k -b 100k
|
||||
TEST 1 ${IOR_EXEC} -a POSIX -r -z -F -k -e -i1 -m -t 100k -b 100k
|
||||
function MDTEST(){
|
||||
RANKS=$1
|
||||
shift
|
||||
WHAT="${IOR_MPIRUN} $RANKS ${IOR_BIN_DIR}/mdtest ${@} ${MDTEST_EXTRA} -d /dev/shm/ior"
|
||||
$WHAT 1>${IOR_OUT}/$I 2>&1
|
||||
if [[ $? != 0 ]]; then
|
||||
echo -n "ERR"
|
||||
ERRORS=$(($ERRORS + 1))
|
||||
else
|
||||
echo -n "OK "
|
||||
fi
|
||||
echo " $WHAT"
|
||||
I=$((${I}+1))
|
||||
}
|
||||
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -w -z -C -F -k -e -i1 -m -t 100k -b 100k
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -w -z -C -Q 1 -F -k -e -i1 -m -t 100k -b 100k
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -r -z -Z -Q 2 -F -k -e -i1 -m -t 100k -b 100k
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -r -z -Z -Q 3 -X 13 -F -k -e -i1 -m -t 100k -b 100k
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -w -z -Z -Q 1 -X -13 -F -e -i1 -m -t 100k -b 100k
|
||||
MDTEST 1 -a POSIX
|
||||
|
||||
IOR 1 -a POSIX -w -z -F -Y -e -i1 -m -t 100k -b 1000k
|
||||
IOR 1 -a POSIX -w -z -F -k -e -i2 -m -t 100k -b 100k
|
||||
IOR 1 -a POSIX -r -z -F -k -e -i1 -m -t 100k -b 100k
|
||||
|
||||
IOR 2 -a POSIX -w -z -C -F -k -e -i1 -m -t 100k -b 100k
|
||||
IOR 2 -a POSIX -w -z -C -Q 1 -F -k -e -i1 -m -t 100k -b 100k
|
||||
IOR 2 -a POSIX -r -z -Z -Q 2 -F -k -e -i1 -m -t 100k -b 100k
|
||||
IOR 2 -a POSIX -r -z -Z -Q 3 -X 13 -F -k -e -i1 -m -t 100k -b 100k
|
||||
IOR 2 -a POSIX -w -z -Z -Q 1 -X -13 -F -e -i1 -m -t 100k -b 100k
|
||||
|
||||
#shared tests
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -w -z -Y -e -i1 -m -t 100k -b 100k
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -w -k -e -i1 -m -t 100k -b 100k
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -r -z -k -e -i1 -m -t 100k -b 100k
|
||||
IOR 2 -a POSIX -w -z -Y -e -i1 -m -t 100k -b 100k
|
||||
IOR 2 -a POSIX -w -k -e -i1 -m -t 100k -b 100k
|
||||
IOR 2 -a POSIX -r -z -k -e -i1 -m -t 100k -b 100k
|
||||
|
||||
#test mutually exclusive options
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -w -z -k -e -i1 -m -t 100k -b 100k
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -w -z - -k -e -i1 -m -t 100k -b 100k
|
||||
TEST 2 ${IOR_EXEC} -a POSIX -w -Z -i1 -m -t 100k -b 100k -d 0.1
|
||||
IOR 2 -a POSIX -w -z -k -e -i1 -m -t 100k -b 100k
|
||||
IOR 2 -a POSIX -w -z - -k -e -i1 -m -t 100k -b 100k
|
||||
IOR 2 -a POSIX -w -Z -i1 -m -t 100k -b 100k -d 0.1
|
||||
|
||||
if [[ ${ERRORS} == 0 ]] ; then
|
||||
echo "PASSED"
|
||||
|
|
|
@ -21,7 +21,7 @@ function runTest(){
|
|||
sudo -u testuser PATH=$PATH make || exit 1
|
||||
|
||||
cd /data/
|
||||
sudo -u testuser PATH=$PATH IOR_EXEC=$BUILD/$FLAVOR/src/ior IOR_OUT=$BUILD/$FLAVOR/test ./testing/basic-tests.sh
|
||||
sudo -u testuser PATH=$PATH IOR_BIN_DIR=$BUILD/$FLAVOR/src IOR_OUT=$BUILD/$FLAVOR/test ./testing/basic-tests.sh
|
||||
|
||||
ERROR=$(($ERROR + $?))
|
||||
popd > /dev/null
|
||||
|
|
|
@ -21,7 +21,7 @@ function runTest(){
|
|||
ln -sf $(which mpiexec.$FLAVOR) /usr/bin/mpiexec
|
||||
|
||||
cd /data/
|
||||
sudo -u testuser IOR_EXEC=$BUILD/$FLAVOR/src/ior IOR_OUT=$BUILD/$FLAVOR/test ./testing/basic-tests.sh
|
||||
sudo -u testuser IOR_BIN_DIR=$BUILD/$FLAVOR/src IOR_OUT=$BUILD/$FLAVOR/test ./testing/basic-tests.sh
|
||||
|
||||
ERROR=$(($ERROR + $?))
|
||||
popd > /dev/null
|
||||
|
|
|
@ -22,7 +22,7 @@ function runTest(){
|
|||
|
||||
cd /data/
|
||||
|
||||
sudo -u testuser IOR_EXEC=$BUILD/$FLAVOR/src/ior IOR_OUT=$BUILD/$FLAVOR/test ./testing/basic-tests.sh
|
||||
sudo -u testuser IOR_BIN_DIR=$BUILD/$FLAVOR/src IOR_OUT=$BUILD/$FLAVOR/test ./testing/basic-tests.sh
|
||||
|
||||
ERROR=$(($ERROR + $?))
|
||||
popd > /dev/null
|
||||
|
|
Loading…
Reference in New Issue