From 45a7ae09d2c9651cabb09b3786cb067d8016194a Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 26 Sep 2001 09:16:37 -0500 Subject: [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). --- src/H5FDmulti.c | 27 +++++++++++++++++++++++++-- 1 file 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 */ -- cgit v0.12