summaryrefslogtreecommitdiffstats
path: root/perform
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-10-07 20:40:06 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-10-07 20:40:06 (GMT)
commit5449df4880af0fb5f9a76eb010f79deb51e5521e (patch)
treeab8c52ee2c982d91a807ae0535f9ba737e0350c6 /perform
parent27a7a56496e10cb77322fa2eb2b4fe88e957baa6 (diff)
downloadhdf5-5449df4880af0fb5f9a76eb010f79deb51e5521e.zip
hdf5-5449df4880af0fb5f9a76eb010f79deb51e5521e.tar.gz
hdf5-5449df4880af0fb5f9a76eb010f79deb51e5521e.tar.bz2
[svn-r25682] bring 25651 and 25659 from trunk.
Fix for: HDFFV-8715 HDF5_PARAPREFIX is ignored in parallel dense attribute and performance tests.
Diffstat (limited to 'perform')
-rw-r--r--perform/perf.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/perform/perf.c b/perform/perf.c
index f006afb..7d329f0 100644
--- a/perform/perf.c
+++ b/perform/perf.c
@@ -46,7 +46,6 @@
# include <mpio.h>
#endif
-
/* Macro definitions */
/* Verify:
* if val is false (0), print mesg and if fatal is true (non-zero), die.
@@ -64,6 +63,8 @@
} \
} while(0)
#define RANK 1
+#define MAX_PATH 1024
+
hsize_t dims[RANK]; /* dataset dim sizes */
hsize_t block[RANK], stride[RANK], count[RANK];
hssize_t start[RANK];
@@ -90,6 +91,11 @@ char opt_file[256] = "perftest.out";
char opt_pvfstab[256] = "notset";
int opt_pvfstab_set = 0;
+const char *FILENAME[] = {
+ opt_file,
+ NULL
+};
+
/* function prototypes */
static int parse_args(int argc, char **argv);
@@ -114,6 +120,7 @@ int main(int argc, char **argv)
MPI_File fh;
MPI_Status status;
int nchars;
+ char filename[MAX_PATH];
herr_t ret; /* Generic return value */
/* startup MPI and determine the rank of this process */
@@ -126,7 +133,6 @@ int main(int argc, char **argv)
if (mynod == 0) printf("# Using hdf5-io calls.\n");
-
/* kindof a weird hack- if the location of the pvfstab file was
* specified on the command line, then spit out this location into
* the appropriate environment variable: */
@@ -198,8 +204,10 @@ int main(int argc, char **argv)
}
}
+ h5_fixname_no_suffix(FILENAME[0], acc_tpl, filename, sizeof filename);
+
/* create the parallel file */
- fid = H5Fcreate(opt_file, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
VRFY((fid >= 0), "H5Fcreate succeeded", H5FATAL);
/* define a contiquous dataset of opt_iter*nprocs*opt_block chars */
@@ -261,7 +269,7 @@ int main(int argc, char **argv)
MPI_Barrier(MPI_COMM_WORLD);
/* reopen the file for reading */
- fid=H5Fopen(opt_file,H5F_ACC_RDONLY,acc_tpl);
+ fid=H5Fopen(filename,H5F_ACC_RDONLY,acc_tpl);
VRFY((fid >= 0), "", H5FATAL);
/* open the dataset */
@@ -382,6 +390,7 @@ die_jar_jar_die:
free(tmp);
if (opt_correct) free(tmp2);
+
MPI_Finalize();
return(0);
@@ -405,6 +414,7 @@ parse_args(int argc, char **argv)
break;
case 'f': /* filename */
strncpy(opt_file, optarg, 255);
+ FILENAME[0] = opt_file;
break;
case 'p': /* pvfstab file */
strncpy(opt_pvfstab, optarg, 255);