Minor fixes for stonewalling options.
parent
5d4ac1a0a0
commit
c0657866fd
|
@ -392,7 +392,7 @@ void ShowTestStart(IOR_param_t *test)
|
|||
|
||||
void ShowTestEnd(IOR_test_t *tptr){
|
||||
if(rank == 0 && tptr->params.stoneWallingWearOut){
|
||||
if (tptr->params.stoneWallingStatusFile[0]){
|
||||
if (tptr->params.stoneWallingStatusFile){
|
||||
StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed);
|
||||
}else{
|
||||
fprintf(out_logfile, "Pairs deadlineForStonewallingaccessed: %lld\n", (long long) tptr->results->pairs_accessed);
|
||||
|
@ -411,7 +411,8 @@ void ShowSetup(IOR_param_t *params)
|
|||
fprintf(out_logfile, "*** %s ***\n\n", params->debug);
|
||||
}
|
||||
PrintNamedSectionStart("Options");
|
||||
PrintKeyVal("api", params->apiVersion);
|
||||
PrintKeyVal("api", params->api);
|
||||
PrintKeyVal("apiVersion", params->apiVersion);
|
||||
PrintKeyVal("test filename", params->testFileName);
|
||||
PrintKeyVal("access", params->filePerProc ? "file-per-process" : "single-shared-file");
|
||||
PrintKeyVal("type", params->collective == FALSE ? "independent" : "collective");
|
||||
|
|
11
src/ior.c
11
src/ior.c
|
@ -1869,10 +1869,11 @@ static IOR_offset_t WriteOrRead(IOR_param_t * test, IOR_results_t * results, voi
|
|||
&& ((GetTimeStamp() - startForStonewall)
|
||||
> test->deadlineForStonewalling));
|
||||
|
||||
if(access == READ && test->stoneWallingStatusFile){
|
||||
if(test->stoneWallingStatusFile && (access == READ || access == READCHECK)){
|
||||
test->stoneWallingWearOutIterations = ReadStoneWallingIterations(test->stoneWallingStatusFile);
|
||||
if(test->stoneWallingWearOutIterations == -1){
|
||||
ERR("Could not read back the stonewalling status from the file!");
|
||||
if(test->stoneWallingWearOutIterations == -1 && rank == 0){
|
||||
fprintf(out_logfile, "WARNING: Could not read back the stonewalling status from the file!");
|
||||
test->stoneWallingWearOutIterations = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1881,8 +1882,8 @@ static IOR_offset_t WriteOrRead(IOR_param_t * test, IOR_results_t * results, voi
|
|||
dataMoved += WriteOrReadSingle(pairCnt, offsetArray, pretendRank, & transferCount, & errors, test, fd, ioBuffers, access);
|
||||
pairCnt++;
|
||||
|
||||
hitStonewall = ((test->deadlineForStonewalling != 0)
|
||||
&& ((GetTimeStamp() - startForStonewall)
|
||||
hitStonewall = ((test->deadlineForStonewalling != 0
|
||||
&& (GetTimeStamp() - startForStonewall)
|
||||
> test->deadlineForStonewalling)) || (test->stoneWallingWearOutIterations != 0 && pairCnt == test->stoneWallingWearOutIterations) ;
|
||||
}
|
||||
if (test->stoneWallingWearOut){
|
||||
|
|
14
src/mdtest.c
14
src/mdtest.c
|
@ -1107,10 +1107,18 @@ void file_test(const int iteration, const int ntasks, const char *path, rank_pro
|
|||
}
|
||||
}else{
|
||||
if (stoneWallingStatusFile){
|
||||
int64_t expected_items;
|
||||
/* The number of items depends on the stonewalling file */
|
||||
items = ReadStoneWallingIterations(stoneWallingStatusFile);
|
||||
if (verbose >= 1 && rank == 0) {
|
||||
printf("read stonewall file items: "LLU"\n", items);
|
||||
expected_items = ReadStoneWallingIterations(stoneWallingStatusFile);
|
||||
if(expected_items >= 0){
|
||||
items = expected_items;
|
||||
}
|
||||
if (rank == 0) {
|
||||
if(expected_items == -1){
|
||||
fprintf(out_logfile, "WARNING: could not read stonewall status file\n");
|
||||
}else if(verbose >= 1){
|
||||
fprintf(out_logfile, "Read stonewall status; items: "LLU"\n", items);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -581,7 +581,9 @@ int64_t ReadStoneWallingIterations(char * const filename){
|
|||
}else{
|
||||
FILE * out = fopen(filename, "r");
|
||||
if (out == NULL){
|
||||
return -1;
|
||||
data = -1;
|
||||
MPI_Bcast( & data, 1, MPI_LONG_LONG_INT, 0, mpi_comm_world);
|
||||
return data;
|
||||
}
|
||||
int ret = fscanf(out, "%lld", & data);
|
||||
if (ret != 1){
|
||||
|
|
Loading…
Reference in New Issue