summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2001-09-26 14:16:37 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2001-09-26 14:16:37 (GMT)
commit45a7ae09d2c9651cabb09b3786cb067d8016194a (patch)
treec41c54090e0b452502ef389d9f247300de1e20e6
parent530a55bbcdae9c20888dbed619444823f07b92ae (diff)
downloadhdf5-45a7ae09d2c9651cabb09b3786cb067d8016194a.zip
hdf5-45a7ae09d2c9651cabb09b3786cb067d8016194a.tar.gz
hdf5-45a7ae09d2c9651cabb09b3786cb067d8016194a.tar.bz2
[svn-r4477] Purpose:
Feature (same as v1.5) Description: The H5Pset_fapl_split() used to assume both meta and raw files have the same prefix name. This prohibited the option to specify the two files reside on different file systems. E.g., having meta-file as /user/home/data1.meta and raw-file as /pfs/data1.raw. Solution: Added feature that if the raw or meta extension string contains a "%s", it will be substituted by the filename given for H5Fopen or H5Fcreate. This is same as the multi-file syntax. If no %s is found, one is inserted at the beginning. This is the previous behavior. Platforms tested: Modi4 (parallel, serial) and eirene (parallel).
-rw-r--r--src/H5FDmulti.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 5deb33d..a98581c 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -231,6 +231,12 @@ H5FD_multi_init(void)
* Wednesday, August 11, 1999
*
* Modifications:
+ * Albert Cheng, Sep 17, 2001
+ * Added feature that if the raw or meta extension string contains
+ * a "%s", it will be substituted by the filename given for H5Fopen
+ * or H5Fcreate. This is same as the multi-file syntax. If no %s
+ * is found, one is inserted at the beginning. This is the previous
+ * behavior.
*
*-------------------------------------------------------------------------
*/
@@ -262,9 +268,26 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
memb_fapl[H5FD_MEM_DRAW] = raw_plist_id;
/* The names */
- sprintf(meta_name, "%%s%s", meta_ext?meta_ext:".meta");
+ /* process meta filename */
+ if (meta_ext){
+ if (strstr(meta_ext, "%s"))
+ strcpy(meta_name, meta_ext);
+ else
+ sprintf(meta_name, "%%s%s", meta_ext);
+ }
+ else
+ strcpy(meta_name, "%s.meta");
memb_name[H5FD_MEM_SUPER] = meta_name;
- sprintf(raw_name, "%%s%s", raw_ext?raw_ext:".raw");
+
+ /* process raw filename */
+ if (raw_ext){
+ if (strstr(raw_ext, "%s"))
+ strcpy(raw_name, raw_ext);
+ else
+ sprintf(raw_name, "%%s%s", raw_ext);
+ }
+ else
+ strcpy(raw_name, "%s.raw");
memb_name[H5FD_MEM_DRAW] = raw_name;
/* The sizes */