IO500 / io500

IO500 Storage Benchmark source code
MIT License
95 stars 30 forks source link

do not unlink ior-rnd file if the phase was not run #30

Closed mchaarawi closed 3 years ago

mchaarawi commented 3 years ago

we can probably just add a check here:

diff --git a/src/phase_ior_rnd_write.c b/src/phase_ior_rnd_write.c
index 0ca1e63..5772a60 100644
--- a/src/phase_ior_rnd_write.c
+++ b/src/phase_ior_rnd_write.c
@@ -30,7 +30,8 @@ static void cleanup(void){
     unlink(filename);
   }
   if(opt.rank == 0){
-    u_purge_file("ior-rnd/file");
+    if (opt.mode != IO500_MODE_STANDARD)
+      u_purge_file("ior-rnd/file");
     u_purge_datadir("ior-rnd");
   }
 }
JulianKunkel commented 3 years ago

The PR in #31 should fix this issue.

mchaarawi commented 3 years ago

I actually tried that, but that doesn't work because we still create the ior-rnd dir, but we don't delete it since we don't cleanup. And then when we try to rm the datadir that fails because that is not empty.

JulianKunkel commented 3 years ago

Modified the PR to also run creation (and validate) only if needed.

mchaarawi commented 3 years ago

Modified the PR to also run creation (and validate) only if needed.

thanks! i tried your modified PR and it seems to resolve this.

adilger commented 3 years ago

Patch included in io500-isc21_v2 tag.