Added an uncompressible data packet to IOR.
Changed how the -l option works. Now you choose the type of datapacket -l i incompressible data packets -l incompressible incompressible data packets -l timestamp timestamped data packets -l t timestamped data packets -l offset offset data packets -l o offset data packets -G option now is either the seed for the incompressible random packets or the timestamp, depending on the input to the -l option. -G will no long timestamp packets on its own without the additon of -l timestamp or -l t I kept shorter versions of the options for the sake of typing sanity.master
parent
37738dab26
commit
08d14e986d
|
@ -74,7 +74,7 @@ These options are to be used on the command line. E.g., 'IOR -a POSIX -b 4K'.
|
||||||
-J N setAlignment -- HDF5 alignment in bytes (e.g.: 8, 4k, 2m, 1g)
|
-J N setAlignment -- HDF5 alignment in bytes (e.g.: 8, 4k, 2m, 1g)
|
||||||
-k keepFile -- don't remove the test file(s) on program exit
|
-k keepFile -- don't remove the test file(s) on program exit
|
||||||
-K keepFileWithError -- keep error-filled file(s) after data-checking
|
-K keepFileWithError -- keep error-filled file(s) after data-checking
|
||||||
-l storeFileOffset -- use file offset as stored signature
|
-l data packet type-- type of packet that will be created [offset|incompressible|timestamp|o|i|t]
|
||||||
-m multiFile -- use number of reps (-i) for multiple file count
|
-m multiFile -- use number of reps (-i) for multiple file count
|
||||||
-M N memoryPerNode -- hog memory on the node (e.g.: 2g, 75%)
|
-M N memoryPerNode -- hog memory on the node (e.g.: 2g, 75%)
|
||||||
-n noFill -- no fill in HDF5 file creation
|
-n noFill -- no fill in HDF5 file creation
|
||||||
|
|
57
src/ior.c
57
src/ior.c
|
@ -224,6 +224,7 @@ void init_IOR_Param_t(IOR_param_t * p)
|
||||||
p->blockSize = 1048576;
|
p->blockSize = 1048576;
|
||||||
p->transferSize = 262144;
|
p->transferSize = 262144;
|
||||||
p->randomSeed = -1;
|
p->randomSeed = -1;
|
||||||
|
p->incompressibleSeed = 573;
|
||||||
p->testComm = MPI_COMM_WORLD;
|
p->testComm = MPI_COMM_WORLD;
|
||||||
p->setAlignment = 1;
|
p->setAlignment = 1;
|
||||||
p->lustre_start_ost = -1;
|
p->lustre_start_ost = -1;
|
||||||
|
@ -762,7 +763,7 @@ static void DisplayUsage(char **argv)
|
||||||
" -J N setAlignment -- HDF5 alignment in bytes (e.g.: 8, 4k, 2m, 1g)",
|
" -J N setAlignment -- HDF5 alignment in bytes (e.g.: 8, 4k, 2m, 1g)",
|
||||||
" -k keepFile -- don't remove the test file(s) on program exit",
|
" -k keepFile -- don't remove the test file(s) on program exit",
|
||||||
" -K keepFileWithError -- keep error-filled file(s) after data-checking",
|
" -K keepFileWithError -- keep error-filled file(s) after data-checking",
|
||||||
" -l storeFileOffset -- use file offset as stored signature",
|
" -l datapacket type-- type of packet that will be created [offset|incompressible|timestamp|o|i|t]",
|
||||||
" -m multiFile -- use number of reps (-i) for multiple file count",
|
" -m multiFile -- use number of reps (-i) for multiple file count",
|
||||||
" -M N memoryPerNode -- hog memory on the node (e.g.: 2g, 75%)",
|
" -M N memoryPerNode -- hog memory on the node (e.g.: 2g, 75%)",
|
||||||
" -n noFill -- no fill in HDF5 file creation",
|
" -n noFill -- no fill in HDF5 file creation",
|
||||||
|
@ -852,6 +853,25 @@ void DistributeHints(void)
|
||||||
* ints, store transfer offset. If storeFileOffset option is used, the file
|
* ints, store transfer offset. If storeFileOffset option is used, the file
|
||||||
* (not transfer) offset is stored instead.
|
* (not transfer) offset is stored instead.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static void
|
||||||
|
FillIncompressibleBuffer(void* buffer, IOR_param_t * test)
|
||||||
|
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
unsigned long long hi, lo;
|
||||||
|
unsigned long long *buf = (unsigned long long *)buffer;
|
||||||
|
|
||||||
|
for (i = 0; i < test->transferSize / sizeof(unsigned long long); i++) {
|
||||||
|
hi = ((unsigned long long) rand_r(&test->incompressibleSeed) << 32);
|
||||||
|
lo = (unsigned long long) rand_r(&test->incompressibleSeed);
|
||||||
|
buf[i] = hi | lo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int reseed_incompressible_prng = TRUE;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FillBuffer(void *buffer,
|
FillBuffer(void *buffer,
|
||||||
IOR_param_t * test, unsigned long long offset, int fillrank)
|
IOR_param_t * test, unsigned long long offset, int fillrank)
|
||||||
|
@ -860,17 +880,17 @@ FillBuffer(void *buffer,
|
||||||
unsigned long long hi, lo;
|
unsigned long long hi, lo;
|
||||||
unsigned long long *buf = (unsigned long long *)buffer;
|
unsigned long long *buf = (unsigned long long *)buffer;
|
||||||
|
|
||||||
/*
|
if(test->dataPacketType == incompressible ) { /* Make for some non compressable buffers with randomish data */
|
||||||
* Consider adding a parameter to use incompressible data or what is here now.
|
|
||||||
* The way to get incompressible data would be to use some random transfer
|
/* In order for write checks to work, we have to restart the psuedo random sequence */
|
||||||
* buffer content. In Linux we can read from /dev/urandom. In C we can use
|
if(reseed_incompressible_prng == TRUE) {
|
||||||
* the rand() function in stdlib.h.
|
test->incompressibleSeed = test->setTimeStampSignature ; /* We copied seed into timestampSignature at initialization */
|
||||||
*
|
reseed_incompressible_prng = FALSE;
|
||||||
* # include <stdlib.h>
|
}
|
||||||
*
|
FillIncompressibleBuffer(buffer, test);
|
||||||
* hi = (( unsigned long long )rand() ) << 32;
|
}
|
||||||
* lo = (( unsigned long long )rand() );
|
|
||||||
*/
|
else {
|
||||||
hi = ((unsigned long long)fillrank) << 32;
|
hi = ((unsigned long long)fillrank) << 32;
|
||||||
lo = (unsigned long long)test->timeStampSignatureValue;
|
lo = (unsigned long long)test->timeStampSignatureValue;
|
||||||
for (i = 0; i < test->transferSize / sizeof(unsigned long long); i++) {
|
for (i = 0; i < test->transferSize / sizeof(unsigned long long); i++) {
|
||||||
|
@ -883,6 +903,7 @@ FillBuffer(void *buffer,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return string describing machine name and type.
|
* Return string describing machine name and type.
|
||||||
|
@ -1622,6 +1643,8 @@ static void ShowSetup(IOR_param_t *params)
|
||||||
*/
|
*/
|
||||||
static void ShowTest(IOR_param_t * test)
|
static void ShowTest(IOR_param_t * test)
|
||||||
{
|
{
|
||||||
|
const char* data_packets[] = {"g", "t","o","i"};
|
||||||
|
|
||||||
fprintf(stdout, "TEST:\t%s=%d\n", "id", test->id);
|
fprintf(stdout, "TEST:\t%s=%d\n", "id", test->id);
|
||||||
fprintf(stdout, "\t%s=%d\n", "refnum", test->referenceNumber);
|
fprintf(stdout, "\t%s=%d\n", "refnum", test->referenceNumber);
|
||||||
fprintf(stdout, "\t%s=%s\n", "api", test->api);
|
fprintf(stdout, "\t%s=%s\n", "api", test->api);
|
||||||
|
@ -1677,8 +1700,9 @@ static void ShowTest(IOR_param_t * test)
|
||||||
test->keepFileWithError);
|
test->keepFileWithError);
|
||||||
fprintf(stdout, "\t%s=%d\n", "quitOnError", test->quitOnError);
|
fprintf(stdout, "\t%s=%d\n", "quitOnError", test->quitOnError);
|
||||||
fprintf(stdout, "\t%s=%d\n", "verbose", verbose);
|
fprintf(stdout, "\t%s=%d\n", "verbose", verbose);
|
||||||
fprintf(stdout, "\t%s=%d\n", "setTimeStampSignature",
|
fprintf(stdout, "\t%s=%s\n", "data packet type", data_packets[test->dataPacketType]);
|
||||||
test->setTimeStampSignature);
|
fprintf(stdout, "\t%s=%d\n", "setTimeStampSignature/incompressibleSeed",
|
||||||
|
test->setTimeStampSignature); /* Seed value was copied into setTimeStampSignature as well */
|
||||||
fprintf(stdout, "\t%s=%d\n", "collective", test->collective);
|
fprintf(stdout, "\t%s=%d\n", "collective", test->collective);
|
||||||
fprintf(stdout, "\t%s=%lld", "segmentCount", test->segmentCount);
|
fprintf(stdout, "\t%s=%lld", "segmentCount", test->segmentCount);
|
||||||
#ifdef HAVE_GPFS_FCNTL_H
|
#ifdef HAVE_GPFS_FCNTL_H
|
||||||
|
@ -2059,7 +2083,7 @@ static void TestIoSys(IOR_test_t *test)
|
||||||
/* Get iteration start time in seconds in task 0 and broadcast to
|
/* Get iteration start time in seconds in task 0 and broadcast to
|
||||||
all tasks */
|
all tasks */
|
||||||
if (rank == 0) {
|
if (rank == 0) {
|
||||||
if (params->setTimeStampSignature) {
|
if (params->dataPacketType == timestamp && params->setTimeStampSignature) {
|
||||||
params->timeStampSignatureValue =
|
params->timeStampSignatureValue =
|
||||||
(unsigned int)params->setTimeStampSignature;
|
(unsigned int)params->setTimeStampSignature;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2165,6 +2189,9 @@ static void TestIoSys(IOR_test_t *test)
|
||||||
rankOffset =
|
rankOffset =
|
||||||
(2 * params->tasksPerNode) % params->numTasks;
|
(2 * params->tasksPerNode) % params->numTasks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reseed_incompressible_prng = TRUE; /* Re-Seed the PRNG to get same sequence back, if random */
|
||||||
|
|
||||||
GetTestFileName(testFileName, params);
|
GetTestFileName(testFileName, params);
|
||||||
params->open = WRITECHECK;
|
params->open = WRITECHECK;
|
||||||
fd = backend->open(testFileName, params);
|
fd = backend->open(testFileName, params);
|
||||||
|
|
16
src/ior.h
16
src/ior.h
|
@ -48,6 +48,19 @@ extern int tasksPerNode;
|
||||||
extern int verbose;
|
extern int verbose;
|
||||||
extern MPI_Comm testComm;
|
extern MPI_Comm testComm;
|
||||||
|
|
||||||
|
|
||||||
|
/******************** DATA Packet Type ***************************************/
|
||||||
|
/* Holds the types of data packets: generic, offset, timestamp, incompressible */
|
||||||
|
|
||||||
|
enum PACKET_TYPE
|
||||||
|
{
|
||||||
|
generic = 0, /* No packet type specified */
|
||||||
|
timestamp=1, /* Timestamp packet set with -l */
|
||||||
|
offset=2, /* Offset packet set with -l */
|
||||||
|
incompressible=3 /* Incompressible packet set with -l */
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* The parameter struct holds all of the "global" data to be passed,
|
* The parameter struct holds all of the "global" data to be passed,
|
||||||
|
@ -121,9 +134,12 @@ typedef struct
|
||||||
unsigned int timeStampSignatureValue; /* value for time stamp signature */
|
unsigned int timeStampSignatureValue; /* value for time stamp signature */
|
||||||
void * fd_fppReadCheck; /* additional fd for fpp read check */
|
void * fd_fppReadCheck; /* additional fd for fpp read check */
|
||||||
int randomSeed; /* random seed for write/read check */
|
int randomSeed; /* random seed for write/read check */
|
||||||
|
int incompressibleSeed; /* random seed for incompressible file creation */
|
||||||
int randomOffset; /* access is to random offsets */
|
int randomOffset; /* access is to random offsets */
|
||||||
size_t memoryPerTask; /* additional memory used per task */
|
size_t memoryPerTask; /* additional memory used per task */
|
||||||
size_t memoryPerNode; /* additional memory used per node */
|
size_t memoryPerNode; /* additional memory used per node */
|
||||||
|
enum PACKET_TYPE dataPacketType; /* The type of data packet. */
|
||||||
|
|
||||||
|
|
||||||
/* POSIX variables */
|
/* POSIX variables */
|
||||||
int singleXferAttempt; /* do not retry transfer if incomplete */
|
int singleXferAttempt; /* do not retry transfer if incomplete */
|
||||||
|
|
|
@ -428,7 +428,7 @@ IOR_test_t *ReadConfigScript(char *scriptName)
|
||||||
IOR_test_t *ParseCommandLine(int argc, char **argv)
|
IOR_test_t *ParseCommandLine(int argc, char **argv)
|
||||||
{
|
{
|
||||||
static const char *opts =
|
static const char *opts =
|
||||||
"a:A:b:BcCd:D:eEf:FgG:hHi:Ij:J:kKlmM:nN:o:O:pPqQ:rRs:St:T:uU:vVwWxX:YzZ";
|
"a:A:b:BcCd:D:eEf:FgG:hHi:Ij:J:kKl:mM:nN:o:O:pPqQ:rRs:St:T:uU:vVwWxX:YzZ";
|
||||||
int c, i;
|
int c, i;
|
||||||
static IOR_test_t *tests = NULL;
|
static IOR_test_t *tests = NULL;
|
||||||
|
|
||||||
|
@ -484,7 +484,12 @@ IOR_test_t *ParseCommandLine(int argc, char **argv)
|
||||||
initialTestParams.intraTestBarriers = TRUE;
|
initialTestParams.intraTestBarriers = TRUE;
|
||||||
break;
|
break;
|
||||||
case 'G':
|
case 'G':
|
||||||
|
/* This option toggles between Incompressible Seed and Time stamp sig based on -l,
|
||||||
|
* so we'll toss the value in both for now, and sort it out in initialization
|
||||||
|
* after all the arguments are in and we know which it keep.
|
||||||
|
*/
|
||||||
initialTestParams.setTimeStampSignature = atoi(optarg);
|
initialTestParams.setTimeStampSignature = atoi(optarg);
|
||||||
|
initialTestParams.incompressibleSeed = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
initialTestParams.showHelp = TRUE;
|
initialTestParams.showHelp = TRUE;
|
||||||
|
@ -511,7 +516,22 @@ IOR_test_t *ParseCommandLine(int argc, char **argv)
|
||||||
initialTestParams.keepFileWithError = TRUE;
|
initialTestParams.keepFileWithError = TRUE;
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
|
switch(*optarg) {
|
||||||
|
case 'i': /* Incompressible */
|
||||||
|
initialTestParams.dataPacketType = incompressible;
|
||||||
|
break;
|
||||||
|
case 't': /* timestamp */
|
||||||
|
initialTestParams.dataPacketType = timestamp;
|
||||||
|
break;
|
||||||
|
case 'o': /* offset packet */
|
||||||
initialTestParams.storeFileOffset = TRUE;
|
initialTestParams.storeFileOffset = TRUE;
|
||||||
|
initialTestParams.dataPacketType = offset;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fprintf(stdout,
|
||||||
|
"Unknown arguement for -l %s generic assumed\n", optarg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
initialTestParams.multiFile = TRUE;
|
initialTestParams.multiFile = TRUE;
|
||||||
|
|
Loading…
Reference in New Issue