Bugfix for #14, storeFileOffset=1
parent
b67c5ce62c
commit
2c224e0ee8
16
src/ior.c
16
src/ior.c
|
@ -496,7 +496,7 @@ static int CountErrors(IOR_param_t * test, int access, int errors)
|
||||||
*/
|
*/
|
||||||
static int CountTasksPerNode(int numTasks, MPI_Comm comm)
|
static int CountTasksPerNode(int numTasks, MPI_Comm comm)
|
||||||
{
|
{
|
||||||
// for debugging and testing:
|
/* for debugging and testing */
|
||||||
if (getenv("IOR_FAKE_TASK_PER_NODES")){
|
if (getenv("IOR_FAKE_TASK_PER_NODES")){
|
||||||
int tasksPerNode = atoi(getenv("IOR_FAKE_TASK_PER_NODES"));
|
int tasksPerNode = atoi(getenv("IOR_FAKE_TASK_PER_NODES"));
|
||||||
int rank;
|
int rank;
|
||||||
|
@ -2544,10 +2544,8 @@ static IOR_offset_t WriteOrReadSingle(IOR_offset_t pairCnt, IOR_offset_t *offset
|
||||||
|
|
||||||
transfer = test->transferSize;
|
transfer = test->transferSize;
|
||||||
if (access == WRITE) {
|
if (access == WRITE) {
|
||||||
/*
|
/* fills each transfer with a unique pattern
|
||||||
* fills each transfer with a unique pattern
|
* containing the offset into the file */
|
||||||
* containing the offset into the file
|
|
||||||
*/
|
|
||||||
if (test->storeFileOffset == TRUE) {
|
if (test->storeFileOffset == TRUE) {
|
||||||
FillBuffer(buffer, test, test->offset, pretendRank);
|
FillBuffer(buffer, test, test->offset, pretendRank);
|
||||||
}
|
}
|
||||||
|
@ -2563,9 +2561,11 @@ static IOR_offset_t WriteOrReadSingle(IOR_offset_t pairCnt, IOR_offset_t *offset
|
||||||
} else if (access == WRITECHECK) {
|
} else if (access == WRITECHECK) {
|
||||||
memset(checkBuffer, 'a', transfer);
|
memset(checkBuffer, 'a', transfer);
|
||||||
|
|
||||||
amtXferred =
|
if (test->storeFileOffset == TRUE) {
|
||||||
backend->xfer(access, fd, checkBuffer, transfer,
|
FillBuffer(readCheckBuffer, test, test->offset, pretendRank);
|
||||||
test);
|
}
|
||||||
|
|
||||||
|
amtXferred = backend->xfer(access, fd, checkBuffer, transfer, test);
|
||||||
if (amtXferred != transfer)
|
if (amtXferred != transfer)
|
||||||
ERR("cannot read from file write check");
|
ERR("cannot read from file write check");
|
||||||
(*transferCount)++;
|
(*transferCount)++;
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
|
# This tests the checks of read and write for correctness
|
||||||
|
# Run with multiple processes, at least 3
|
||||||
|
# You may set the environment variable IOR_FAKE_TASK_PER_NODES=3 and run it on one node
|
||||||
|
# Example: IOR_FAKE_TASK_PER_NODES=3 mpiexec -n 3 ./src/ior -f testing/timestamp.cfg
|
||||||
|
|
||||||
IOR START
|
IOR START
|
||||||
reorderTasksConstant=1
|
reorderTasksConstant=1
|
||||||
repetitions=1
|
repetitions=1
|
||||||
|
storeFileOffset=0
|
||||||
segmentCount=1
|
segmentCount=1
|
||||||
verbose=0
|
verbose=0
|
||||||
fsync=0
|
fsync=0
|
||||||
checkWrite=1
|
checkWrite=1
|
||||||
blockSize=16
|
blockSize=16
|
||||||
setTimeStampSignature=1511817315
|
setTimeStampSignature=1511817315
|
||||||
checkRead=0
|
checkRead=1
|
||||||
readFile=1
|
readFile=1
|
||||||
filePerProc=0
|
filePerProc=0
|
||||||
writeFile=1
|
writeFile=1
|
||||||
|
@ -15,6 +21,8 @@ api=POSIX
|
||||||
transferSize=16
|
transferSize=16
|
||||||
intraTestBarriers=0
|
intraTestBarriers=0
|
||||||
testFile=/tmp/test
|
testFile=/tmp/test
|
||||||
|
RUN
|
||||||
|
|
||||||
|
storeFileOffset=1
|
||||||
RUN
|
RUN
|
||||||
IOR STOP
|
IOR STOP
|
||||||
|
|
Loading…
Reference in New Issue