diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2001-12-21 05:58:41 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2001-12-21 05:58:41 (GMT) |
commit | 7defffc7e4415e24c18cbb9dea1bd99c9798784e (patch) | |
tree | 58fd2096f6c2f6c1f70410643999fee07499f0a2 /perform | |
parent | 5560c64e256d3fc064072afbc0e3f14add0bc5a5 (diff) | |
download | hdf5-7defffc7e4415e24c18cbb9dea1bd99c9798784e.zip hdf5-7defffc7e4415e24c18cbb9dea1bd99c9798784e.tar.gz hdf5-7defffc7e4415e24c18cbb9dea1bd99c9798784e.tar.bz2 |
[svn-r4748] Purpose:
Bug fix
Description:
All processes, including those that are not part of the PIO test
sub-communicator, all attempted to run the PIO test. It resulted
in failures for those processes that are not supposed to get involved.
Solution:
The function that creates the sub-communicator also returns a
parameter indicating if the process is included in the PIO test
sub-communicator. Then only those processes will really do the
PIO test.
Platforms tested:
eirene (pp) and Modi4 (pp)
Diffstat (limited to 'perform')
-rw-r--r-- | perform/pio_perf.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/perform/pio_perf.c b/perform/pio_perf.c index 731df9b..104cf5f 100644 --- a/perform/pio_perf.c +++ b/perform/pio_perf.c @@ -217,7 +217,7 @@ static void run_test_loop(FILE *output, struct options *options); static int run_test(FILE *output, iotype iot, parameters parms); static void get_minmax(minmax *mm); static minmax accumulate_minmax_stuff(minmax *mm, int count); -static int create_comm_world(int num_procs); +static int create_comm_world(int num_procs, int *doing_pio); static int destroy_comm_world(void); static void output_report(FILE *output, const char *fmt, ...); static void print_indent(register FILE *output, register int indent); @@ -305,6 +305,7 @@ run_test_loop(FILE *output, struct options *opts) { parameters parms; long num_procs; + int doing_pio; /* if this process is doing PIO */ int io_runs = PIO_HDF5 | PIO_MPI | PIO_RAW; /* default to run all tests */ if (opts->io_types & ~0x7) { @@ -332,10 +333,12 @@ run_test_loop(FILE *output, struct options *opts) parms.num_procs = num_procs; - if (create_comm_world(parms.num_procs) != SUCCESS) { + if (create_comm_world(parms.num_procs, &doing_pio) != SUCCESS) { /* do something harsh */ } + /* only processes doing PIO will run the tests */ + if (doing_pio){ output_report(output, "Number of processors = %ld\n", parms.num_procs); /* multiply the xfer buffer size by 2 for each loop iteration */ @@ -364,6 +367,7 @@ run_test_loop(FILE *output, struct options *opts) if (destroy_comm_world() != SUCCESS) { /* do something harsh */ } + } } } @@ -525,7 +529,7 @@ accumulate_minmax_stuff(minmax *mm, int count) * Modifications: */ static int -create_comm_world(int num_procs) +create_comm_world(int num_procs, int *doing_pio) { /* MPI variables */ int mrc, ret_value; /* return values */ @@ -567,6 +571,7 @@ create_comm_world(int num_procs) MPI_Comm_rank(pio_comm_g, &pio_mpi_rank_g); done: + *doing_pio = color; return ret_value; error_done: |