2002-06-27 21:11:31 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
* Copyright by the Board of Trustees of the University of Illinois. *
|
|
|
|
* All rights reserved. *
|
|
|
|
* *
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
|
|
|
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
|
|
|
* of the source code distribution tree; Copyright.html can be found at the *
|
|
|
|
* root level of an installed copy of the electronic HDF5 document set and *
|
|
|
|
* is linked from the top-level documents page. It can also be found at *
|
|
|
|
* http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
|
|
|
|
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
2001-11-07 23:28:33 +08:00
|
|
|
#ifndef PIO_PERF_H__
|
|
|
|
#define PIO_PERF_H__
|
|
|
|
|
2001-12-11 06:06:22 +08:00
|
|
|
#include "pio_timer.h"
|
2002-04-19 15:20:41 +08:00
|
|
|
#include "H5private.h"
|
2002-05-30 00:18:33 +08:00
|
|
|
#include "h5test.h"
|
2001-12-11 06:06:22 +08:00
|
|
|
|
2002-05-28 12:04:18 +08:00
|
|
|
/* setup the dataset no fill option if this is v1.5 or more */
|
|
|
|
#if H5_VERS_MAJOR > 1 || H5_VERS_MINOR > 4
|
|
|
|
#define H5_HAVE_NOFILL 1
|
|
|
|
#endif
|
|
|
|
|
2001-11-07 23:28:33 +08:00
|
|
|
typedef enum iotype_ {
|
2002-05-23 07:22:46 +08:00
|
|
|
POSIXIO,
|
2001-11-07 23:28:33 +08:00
|
|
|
MPIO,
|
|
|
|
PHDF5
|
|
|
|
/*NUM_TYPES*/
|
|
|
|
} iotype;
|
|
|
|
|
|
|
|
typedef struct parameters_ {
|
[svn-r4733]
Purpose:
Feature Changes
Description:
Okay, I needed to add in more parameters so that the user can modify
how things are supposed to work with the PIO programs. Also needed
to change the algorithm a bit to make these work. And needed to add
in timing for the READ option.
Solution:
Added the above things. The parameters took a major rewrite of the
command-line parsing stuff. Here's the usage statement:
usage: pio_perf [OPTIONS]
OPTIONS
-h, --help Print a usage message and exit
-d N, --num-dsets=N Number of datasets per file [default:1]
-f S, --file-size=S Size of a single file [default: 64M]
-F N, --num-files=N Number of files [default: 1]
-H, --hdf5 Run HDF5 performance test
-i, --num-iterations Number of iterations to perform [default: 1]
-m, --mpiio Run MPI/IO performance test
-o F, --output=F Output raw data into file F [default: none]
-P N, --max-num-processes=N Maximum number of processes to use [default: 1]
-p N, --min-num-processes=N Minimum number of processes to use [default: 1]
-r, --raw Run raw (UNIX) performance test
-X S, --max-xfer-size=S Maximum transfer buffer size [default: 1M]
-x S, --min-xfer-size=S Minimum transfer buffer size [default: 1K]
F - is a filename.
N - is an integer >=0.
S - is a size specifier, an integer >=0 followed by a size indicator:
K - Kilobyte
M - Megabyte
G - Gigabyte
Example: 37M = 37 Megabytes
Platforms tested:
Linux, but not fully finished...
2001-12-19 04:12:21 +08:00
|
|
|
iotype io_type; /* The type of IO test to perform */
|
|
|
|
int num_procs; /* Maximum number of processes to use */
|
2002-06-19 20:54:53 +08:00
|
|
|
long num_files; /* Number of files to create */
|
[svn-r4733]
Purpose:
Feature Changes
Description:
Okay, I needed to add in more parameters so that the user can modify
how things are supposed to work with the PIO programs. Also needed
to change the algorithm a bit to make these work. And needed to add
in timing for the READ option.
Solution:
Added the above things. The parameters took a major rewrite of the
command-line parsing stuff. Here's the usage statement:
usage: pio_perf [OPTIONS]
OPTIONS
-h, --help Print a usage message and exit
-d N, --num-dsets=N Number of datasets per file [default:1]
-f S, --file-size=S Size of a single file [default: 64M]
-F N, --num-files=N Number of files [default: 1]
-H, --hdf5 Run HDF5 performance test
-i, --num-iterations Number of iterations to perform [default: 1]
-m, --mpiio Run MPI/IO performance test
-o F, --output=F Output raw data into file F [default: none]
-P N, --max-num-processes=N Maximum number of processes to use [default: 1]
-p N, --min-num-processes=N Minimum number of processes to use [default: 1]
-r, --raw Run raw (UNIX) performance test
-X S, --max-xfer-size=S Maximum transfer buffer size [default: 1M]
-x S, --min-xfer-size=S Minimum transfer buffer size [default: 1K]
F - is a filename.
N - is an integer >=0.
S - is a size specifier, an integer >=0 followed by a size indicator:
K - Kilobyte
M - Megabyte
G - Gigabyte
Example: 37M = 37 Megabytes
Platforms tested:
Linux, but not fully finished...
2001-12-19 04:12:21 +08:00
|
|
|
long num_dsets; /* Number of datasets to create */
|
2002-07-03 04:06:22 +08:00
|
|
|
off_t num_bytes; /* Number of bytes in each dset */
|
2002-06-19 20:54:53 +08:00
|
|
|
int num_iters; /* Number of times to loop doing the IO */
|
2002-05-14 03:55:33 +08:00
|
|
|
size_t buf_size; /* Buffer size */
|
2002-07-03 04:06:22 +08:00
|
|
|
size_t blk_size; /* Block size */
|
2002-06-27 21:11:31 +08:00
|
|
|
unsigned interleaved; /* Interleaved vs. contiguous blocks */
|
2002-06-27 23:09:12 +08:00
|
|
|
unsigned collective; /* Collective vs. independent I/O */
|
2002-05-23 07:22:46 +08:00
|
|
|
hsize_t h5_align; /* HDF5 object alignment */
|
|
|
|
hsize_t h5_thresh; /* HDF5 object alignment threshold */
|
2002-06-06 12:58:29 +08:00
|
|
|
int h5_use_chunks; /* Make HDF5 dataset chunked */
|
|
|
|
int h5_no_fill; /* Disable HDF5 writing fill values */
|
|
|
|
int h5_write_only; /* Perform the write tests only */
|
2002-07-15 23:21:05 +08:00
|
|
|
unsigned h5_use_mpi_posix; /* Use MPI-posix VFD for HDF5 I/O (instead of MPI-I/O VFD) */
|
2002-06-06 12:58:29 +08:00
|
|
|
int verify; /* Verify data correctness */
|
2001-11-07 23:28:33 +08:00
|
|
|
} parameters;
|
|
|
|
|
2001-12-11 06:06:22 +08:00
|
|
|
typedef struct results_ {
|
|
|
|
herr_t ret_code;
|
|
|
|
pio_time *timers;
|
|
|
|
} results;
|
|
|
|
|
2001-11-16 06:46:32 +08:00
|
|
|
#ifndef SUCCESS
|
|
|
|
#define SUCCESS 0
|
|
|
|
#endif /* !SUCCESS */
|
|
|
|
|
|
|
|
#ifndef FAIL
|
|
|
|
#define FAIL -1
|
|
|
|
#endif /* !FAIL */
|
|
|
|
|
2002-05-07 07:58:57 +08:00
|
|
|
extern FILE *output; /* output file */
|
2002-05-07 23:22:31 +08:00
|
|
|
extern pio_time *timer_g; /* timer: global for stub functions */
|
2002-05-07 07:58:57 +08:00
|
|
|
extern int comm_world_rank_g; /* my rank in MPI_COMM_RANK */
|
|
|
|
extern int comm_world_nprocs_g;/* num. of processes of MPI_COMM_WORLD */
|
2001-12-20 06:10:15 +08:00
|
|
|
extern MPI_Comm pio_comm_g; /* Communicator to run the PIO */
|
|
|
|
extern int pio_mpi_rank_g; /* MPI rank of pio_comm_g */
|
2002-01-30 12:16:15 +08:00
|
|
|
extern int pio_mpi_nprocs_g; /* number of processes of pio_comm_g */
|
|
|
|
extern int pio_debug_level; /* The debug level:
|
|
|
|
* 0 - Off
|
|
|
|
* 1 - Minimal
|
|
|
|
* 2 - Some more
|
|
|
|
* 3 - Maximal
|
2002-05-07 07:58:57 +08:00
|
|
|
* 4 - Even More Debugging (timer stuff)
|
2002-01-30 12:16:15 +08:00
|
|
|
*/
|
2001-12-20 06:10:15 +08:00
|
|
|
|
2002-06-02 07:01:48 +08:00
|
|
|
#define HDprint_rank(f) /* print rank in MPI_COMM_WORLD */ \
|
|
|
|
HDfprintf(f, "%d: ", comm_world_rank_g);
|
|
|
|
#define HDprint_size(f) /* print size of MPI_COMM_WORLD */ \
|
|
|
|
HDfprintf(f, "%d", comm_world_nprocs_g);
|
|
|
|
#define HDprint_rank_size(f) /* print rank/size of MPI_COMM_WORLD */ \
|
|
|
|
HDfprintf(f, "%d/%d: ", comm_world_rank_g, comm_world_nprocs_g);
|
|
|
|
|
2001-12-11 06:06:22 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
2002-05-03 05:19:19 +08:00
|
|
|
|
2002-05-07 07:58:57 +08:00
|
|
|
extern results do_pio(parameters param);
|
2002-05-03 05:19:19 +08:00
|
|
|
|
2001-12-11 06:06:22 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
2001-12-11 02:05:39 +08:00
|
|
|
|
2001-11-07 23:28:33 +08:00
|
|
|
#endif /* PIO_PERF_H__ */
|