2001-11-07 23:28:33 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2001
|
|
|
|
* National Center for Supercomputing Applications
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifndef PIO_PERF_H__
|
|
|
|
#define PIO_PERF_H__
|
|
|
|
|
2001-12-11 06:06:22 +08:00
|
|
|
#include "pio_timer.h"
|
|
|
|
|
2001-11-07 23:28:33 +08:00
|
|
|
typedef enum iotype_ {
|
|
|
|
RAW,
|
|
|
|
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 */
|
|
|
|
int num_files; /* Number of files to create */
|
|
|
|
long num_dsets; /* Number of datasets to create */
|
|
|
|
long num_elmts; /* Number of native ints in each dset */
|
|
|
|
int num_iters; /* Number of times to loop doing the IO */
|
2001-12-12 05:45:29 +08:00
|
|
|
long buf_size; /* Buffer size */
|
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-02-14 23:51:12 +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
|
|
|
|
*/
|
2001-12-20 06:10:15 +08:00
|
|
|
|
2001-12-11 06:06:22 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
extern results do_pio(parameters param);
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
2001-12-11 02:05:39 +08:00
|
|
|
|
2001-11-07 23:28:33 +08:00
|
|
|
#endif /* PIO_PERF_H__ */
|