diff --git a/src/ior.c b/src/ior.c index 55733d5..0daddff 100755 --- a/src/ior.c +++ b/src/ior.c @@ -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 */