summaryrefslogtreecommitdiffstats
path: root/perform/pio_perf.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2002-05-29 20:48:12 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2002-05-29 20:48:12 (GMT)
commit02350ea835871949c4bee0c534b77b8a3655e794 (patch)
treeb166118014a8e522f74bff27a5e08272a3450031 /perform/pio_perf.c
parent770c707da1bb5acc443a24db4d59784914a3481b (diff)
downloadhdf5-02350ea835871949c4bee0c534b77b8a3655e794.zip
hdf5-02350ea835871949c4bee0c534b77b8a3655e794.tar.gz
hdf5-02350ea835871949c4bee0c534b77b8a3655e794.tar.bz2
[svn-r5483] Description:
Show IO API types selected. (Changed the default setting algorithm slightly.) Platforms tested: eirene(pp)
Diffstat (limited to 'perform/pio_perf.c')
-rw-r--r--perform/pio_perf.c36
1 files changed, 29 insertions, 7 deletions
diff --git a/perform/pio_perf.c b/perform/pio_perf.c
index 2f8e7bb..e43e32d 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -257,7 +257,6 @@ static void output_results(const struct options *options, const char *name,
static void output_report(const char *fmt, ...);
static void print_indent(register int indent);
static void usage(const char *prog);
-static int parse_environment(void);
static void report_parameters(struct options *opts);
/*
@@ -927,12 +926,29 @@ recover_size_and_print(long_long val, const char *end)
}
static void
+print_io_api(long io_types)
+{
+ if (io_types & PIO_POSIX)
+ HDfprintf(output, "posix ");
+ if (io_types & PIO_MPI)
+ HDfprintf(output, "mpiio ");
+ if (io_types & PIO_HDF5)
+ HDfprintf(output, "phdf5 ");
+ HDfprintf(output, "\n");
+}
+
+static void
report_parameters(struct options *opts)
{
int rank;
MPI_Comm_rank(pio_comm_g, &rank);
+ HDfprintf(output, "rank %d: ==== Parameters ====\n", rank);
+
+ HDfprintf(output, "rank %d: IO API=", rank);
+ print_io_api(opts->io_types);
+
HDfprintf(output, "rank %d: File size=", rank);
recover_size_and_print((long_long)opts->file_size, "\n");
@@ -942,23 +958,24 @@ report_parameters(struct options *opts)
(long_long)opts->num_dsets);
HDfprintf(output, "rank %d: Number of iterations=%Hd\n", rank,
(long_long)opts->num_iters);
- HDfprintf(output, "rank %d: Number of processes=%Hd:%Hd\n", rank,
- (long_long)opts->min_num_procs,
- (long_long)opts->max_num_procs);
+ HDfprintf(output, "rank %d: Number of processes=%d:%d\n", rank,
+ opts->min_num_procs, opts->max_num_procs);
HDfprintf(output, "rank %d: Transfer buffer size=", rank);
recover_size_and_print((long_long)opts->min_xfer_size, ":");
recover_size_and_print((long_long)opts->max_xfer_size, "\n");
{
- char *prefix = getenv("H5_PARAPREFIX");
+ char *prefix = getenv("HDF5_PARAPREFIX");
- HDfprintf(output, "rank %d: H5_PARAPREFIX Environment Var=%s\n", rank,
+ HDfprintf(output, "rank %d: Env HDF5_PARAPREFIX=%s\n", rank,
(prefix ? prefix : "not set"));
}
HDfprintf(output, "rank %d: ", rank);
h5_dump_info_object(h5_io_info_g);
+
+ HDfprintf(output, "rank %d: ==== End of Parameters ====\n", rank);
HDfprintf(output, "\n");
}
@@ -980,7 +997,7 @@ parse_command_line(int argc, char *argv[])
cl_opts->output_file = NULL;
cl_opts->file_size = 64 * ONE_MB;
- cl_opts->io_types = 0x7; /* bottom bits indicate default type to run */
+ cl_opts->io_types = 0; /* will set default after parsing options */
cl_opts->num_dsets = 1;
cl_opts->num_files = 1;
cl_opts->num_iters = 1;
@@ -1146,6 +1163,11 @@ parse_command_line(int argc, char *argv[])
}
}
+ /* set default if none specified yet */
+ if (!cl_opts->io_types){
+ cl_opts->io_types = PIO_HDF5 | PIO_MPI | PIO_POSIX; /* run all API */
+ }
+
return cl_opts;
}