Merge pull request #289 from hpc/fix-ior-no-warn

IOR add warning if file exists #273. To stop on warnings, use existing flag --warningAsErrors
master
Julian Kunkel 2020-12-02 10:41:44 +00:00 committed by GitHub
commit 09d2c3511b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -1293,6 +1293,17 @@ static void TestIoSys(IOR_test_t *test)
/* loop over test iterations */
uint64_t params_saved_wearout = params->stoneWallingWearOutIterations;
/* Check if the file exists and warn users */
if( params->hints.filePerProc || rank == 0){
struct stat sb;
GetTestFileName(testFileName, params);
int ret = backend->stat(testFileName, & sb, params->backend_options);
if(ret == 0) {
EWARNF("The file \"%s\" exists already and will be overwritten", testFileName);
}
}
for (rep = 0; rep < params->repetitions; rep++) {
/* Get iteration start time in seconds in task 0 and broadcast to
all tasks */