IOR raise warning for existing file once if not filePerProc.

master
Julian M. Kunkel 2020-12-02 10:14:28 +00:00
parent da03ae5c9f
commit f71a144b19
1 changed files with 7 additions and 5 deletions

View File

@ -1295,11 +1295,13 @@ static void TestIoSys(IOR_test_t *test)
uint64_t params_saved_wearout = params->stoneWallingWearOutIterations; uint64_t params_saved_wearout = params->stoneWallingWearOutIterations;
/* Check if the file exists and warn users */ /* Check if the file exists and warn users */
struct stat sb; if( params->hints.filePerProc || rank == 0){
GetTestFileName(testFileName, params); struct stat sb;
int ret = backend->stat(testFileName, & sb, params->backend_options); GetTestFileName(testFileName, params);
if(ret == 0) { int ret = backend->stat(testFileName, & sb, params->backend_options);
EWARNF("The file \"%s\" exists already and will be overwritten", testFileName); if(ret == 0) {
EWARNF("The file \"%s\" exists already and will be overwritten", testFileName);
}
} }
for (rep = 0; rep < params->repetitions; rep++) { for (rep = 0; rep < params->repetitions; rep++) {