[svn-r4608]

Purpose:
    bug Fix
Description:
    Changed the code so that if parallel stuff isn't enabled, then we
    don't compile the parallel code.
Solution:
    Cleaned up the code and put #ifdef's around it checking for parallel
    flags.
Platforms tested:
    Linux
This commit is contained in:
Bill Wendling 2001-11-15 17:46:32 -05:00
parent 5077ac0c90
commit af35ac0ec1
6 changed files with 441 additions and 700 deletions

View File

@ -19,8 +19,7 @@ LIBH5TOOLS=../tools/lib/libh5tools.la
## These are the programs that `make all' or `make tests' will build and which
## `make check' will run. List them in the order they should be run.
##Temporary disable the compiling of pio_perf codes while I fix it.
##TEST_PROGS_PARA=mpi-perf perf pio_perf
TEST_PROGS_PARA=mpi-perf perf
TEST_PROGS_PARA=mpi-perf perf pio_perf
TEST_PROGS=iopipe chunk overhead
## These are the files that `make clean' (and derivatives) will remove from
@ -31,9 +30,11 @@ CLEAN=*.h5 *.raw *.dat x-gnuplot
## created by replacing the `.c' with a `.o'. This list is necessary
## for building automatic dependencies.
PIO_PERF_SRC=pio_perf.c pio_engine.c pio_timer.c
TEST_SRC_PARA=mpi-perf.c perf.c $(PIO_PERF_SRC)
TEST_SRC=iopipe.c chunk.c overhead.c $(TEST_SRC_PARA)
PIO_PERF_OBJ=$(PIO_PERF_SRC:.c=.lo)
TEST_SRC_PARA=mpi-perf.c perf.c $(PIO_PERF_SRC)
TEST_SRC=iopipe.c chunk.c overhead.c $(TEST_SRC_PARA)
TEST_OBJ=$(TEST_SRC:.c=.lo)
## How to build the programs... they all depend on the hdf5 library

File diff suppressed because it is too large Load Diff

View File

@ -53,6 +53,10 @@
#include <stdio.h>
#include <stdlib.h>
#include "hdf5.h"
#ifdef H5_HAVE_PARALLEL
/* library header files */
#include <mpi.h>
@ -235,7 +239,7 @@ run_test_loop(FILE *output, int max_num_procs, long max_size)
parms.num_files, parms.num_dsets, parms.num_elmts);
/* call Albert's testing here */
dopio(parms);
do_pio(parms);
/* get back ``result'' object and report */
}
}
@ -284,7 +288,7 @@ usage(const char *prog)
* Function: parse_command_line
* Purpose: Parse the command line options and return a STRUCT OPTIONS
* structure which will need to be freed by the calling function.
* Return: Nothing
* Return: Pointer to an OPTIONS structure
* Programmer: Bill Wendling, 31. October 2001
* Modifications:
*/
@ -322,3 +326,22 @@ parse_command_line(int argc, char *argv[])
return cl_opts;
}
#else /* H5_HAVE_PARALLEL */
/*
* Function: main
* Purpose: Dummy main() function for if HDF5 was configured without
* parallel stuff.
* Return: EXIT_SUCCESS
* Programmer: Bill Wendling, 14. November 2001
* Modifications:
*/
int
main(void)
{
printf("No parallel IO performance because parallel is not configured\n");
return EXIT_SUCCESS;
}
#endif /* !H5_HAVE_PARALLEL */

View File

@ -23,4 +23,12 @@ typedef struct parameters_ {
unsigned int num_iters; /* Number of times to loop doing the IO */
} parameters;
#ifndef SUCCESS
#define SUCCESS 0
#endif /* !SUCCESS */
#ifndef FAIL
#define FAIL -1
#endif /* !FAIL */
#endif /* PIO_PERF_H__ */

View File

@ -12,16 +12,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#if 0
#include "hdf5.h"
#endif /* 0 */
#include "pio_timer.h"
#ifdef H5_HAVE_PARALLEL
#include <mpi.h>
/*
* The number to divide the tv_usec field with to get a nice decimal to add to
* the number of seconds.
@ -135,3 +132,5 @@ get_time(perf_time *pt, timer_type t)
{
return pt->total_time[t];
}
#endif /* H5_HAVE_PARALLEL */

View File

@ -4,10 +4,10 @@
* All rights reserved.
*
*/
#ifndef PERF_TIMER__
#define PERF_TIMER__
#ifndef PIO_TIMER__
#define PIO_TIMER__
#if 0
#include "hdf5.h"
#if defined(H5_TIME_WITH_SYS_TIME)
# include <sys/time.h>
@ -18,13 +18,6 @@
# include <time.h>
#endif
#else
#include <sys/time.h>
#include <time.h>
#endif /* 0 */
/* The different types of timers we can have */
typedef enum timer_type_ {
HDF5_MPI_OVERHEAD,
@ -67,4 +60,4 @@ extern double get_time(perf_time *pt, timer_type t);
}
#endif /* __cplusplus */
#endif /* PERF_TIMER__ */
#endif /* PIO_TIMER__ */