summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2006-06-01 22:56:50 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2006-06-01 22:56:50 (GMT)
commitcca4e8351bd0901b6f65291e3f6ba8ba8304dd42 (patch)
tree60fb8e887eac12ac50c57d0b84e18613517d70e2 /test/h5test.c
parentb599f6bee0d34d897b9db0c9e2e933a40a6c2730 (diff)
downloadhdf5-cca4e8351bd0901b6f65291e3f6ba8ba8304dd42.zip
hdf5-cca4e8351bd0901b6f65291e3f6ba8ba8304dd42.tar.gz
hdf5-cca4e8351bd0901b6f65291e3f6ba8ba8304dd42.tar.bz2
[svn-r12395] Purpose:
Feature Description: Sometimes the parallel prefix is given in the form of nfs:/mnt/pfs which if given to a non-MPIO VFD like the default H5Fcreate, it would fail. Added a new routine h5_rmprefix which would return the non-prefix component part of the file name which would be okay for the default H5Fcreate and such. Platforms tested: Tested in heping parallel.
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/h5test.c b/test/h5test.c
index ce50a1d..3784001 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -450,6 +450,37 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
/*-------------------------------------------------------------------------
+ * Function: h5_rmprefix
+ *
+ * Purpose: This "removes" the MPIO driver prefix part of the file name
+ * by returning a pointer that points at the non-prefix component
+ * part of the file name. E.g.,
+ * Input Return
+ * pfs:/scratch1/dataX /scratch1/dataX
+ * /scratch2/dataY /scratch2/dataY
+ * Note that there is no change to the original file name.
+ *
+ * Return: Success: a pointer at the non-prefix part.
+ *
+ * Programmer: Albert Cheng; Jun 1, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+h5_rmprefix(const char *filename)
+{
+ char *ret_ptr;
+
+ if ((ret_ptr = HDstrstr(filename, ":")) == NULL)
+ ret_ptr = filename;
+ else
+ ret_ptr++;
+
+ return(ret_ptr);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: h5_fileaccess
*
* Purpose: Returns a file access template which is the default template