GithubHelp home page GithubHelp logo

Comments (3)

roblatham00 avatar roblatham00 commented on July 20, 2024

Here's a patch:

From fc6f65e81098075832e53d643e0187946b9e639d Mon Sep 17 00:00:00 2001
From: Rob Latham <[email protected]>
Date: Wed, 19 Feb 2014 10:16:08 -0600
Subject: [PATCH] A more MPI-IO friendly remove file

MPI-IO allows prefxing file names with something-something: (e.g. pvfs2:
or bglockless:). These prefixed file names, however, do not make sense
to posix calls like access().  So, if we must use access(), strip the
prefix first.
---
 src/ior.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/ior.c b/src/ior.c
index 163a59c5..6026414e 100644
--- a/src/ior.c
+++ b/src/ior.c
@@ -1254,6 +1254,12 @@ static void PrintRemoveTiming(double start, double finish, int rep)
 static void RemoveFile(char *testFileName, int filePerProc, IOR_param_t * test)
 {
         int tmpRankOffset;
+        char *strippedFileName;
+
+        strippedFileName = strchr(testFileName, ':');
+        if (strippedFileName > testFileName + 1)
+                strippedFileName = strippedFileName + 1;
+
         if (filePerProc) {
                 /* in random tasks, delete own file */
                 if (test->reorderTasksRandom == TRUE) {
@@ -1261,7 +1267,7 @@ static void RemoveFile(char *testFileName, int filePerProc, IOR_param_t * test)
                         rankOffset = 0;
                         GetTestFileName(testFileName, test);
                 }
-                if (access(testFileName, F_OK) == 0) {
+                if (access(strippedFileName, F_OK) == 0) {
                         backend->delete(testFileName, test);
                 }
                 if (test->reorderTasksRandom == TRUE) {
@@ -1269,7 +1275,7 @@ static void RemoveFile(char *testFileName, int filePerProc, IOR_param_t * test)
                         GetTestFileName(testFileName, test);
                 }
         } else {
-                if ((rank == 0) && (access(testFileName, F_OK) == 0)) {
+                if ((rank == 0) && (access(strippedFileName, F_OK) == 0)) {
                         backend->delete(testFileName, test);
                 }
         }
-- 
1.8.3.2

from ior.

roblatham00 avatar roblatham00 commented on July 20, 2024

I should have added it was poor Florin Isaila [email protected] who encountered this and came up with the fix. I just updated the patch to apply onto master and to match IOR's coding conventions.

from ior.

roblatham00 avatar roblatham00 commented on July 20, 2024

I found a problem with the patch. See the pull request I'm just about to generate.

from ior.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.