diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-19 13:06:57 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-19 13:06:57 (GMT) |
commit | 6d7cbd13dce1ae24446ed84a88c64c68598dc6bf (patch) | |
tree | 9debd9624be08fb8ff72f91e2416ae853939e2fc /perform | |
parent | a00188dde45dfd59728e1e68ddbf6cad5e1d014c (diff) | |
download | hdf5-6d7cbd13dce1ae24446ed84a88c64c68598dc6bf.zip hdf5-6d7cbd13dce1ae24446ed84a88c64c68598dc6bf.tar.gz hdf5-6d7cbd13dce1ae24446ed84a88c64c68598dc6bf.tar.bz2 |
[svn-r5668] Purpose:
Code cleanup
Description:
Turn on more warnings in the IRIX builds and clean them up.
Platforms tested:
IRIX64 6.5 (modi4) w/parallel, both -n32 and the default (-64?) mode
Diffstat (limited to 'perform')
-rw-r--r-- | perform/chunk.c | 10 | ||||
-rw-r--r-- | perform/pio_engine.c | 26 | ||||
-rw-r--r-- | perform/pio_perf.c | 8 | ||||
-rw-r--r-- | perform/pio_perf.h | 4 |
4 files changed, 19 insertions, 29 deletions
diff --git a/perform/chunk.c b/perform/chunk.c index f74397b..8f3e1a4 100644 --- a/perform/chunk.c +++ b/perform/chunk.c @@ -179,12 +179,7 @@ test_rowmaj (int op, size_t cache_size, size_t io_size) signed char *buf = calloc (1, (size_t)(SQUARE(io_size))); hsize_t i, j, hs_size[2]; hssize_t hs_offset[2]; -#ifdef H5_WANT_H5_V1_4_COMPAT int mdc_nelmts, rdcc_nelmts; -#else /* H5_WANT_H5_V1_4_COMPAT */ - int mdc_nelmts; - size_t rdcc_nelmts; -#endif /* H5_WANT_H5_V1_4_COMPAT */ double w0; H5Pget_cache (fapl_g, &mdc_nelmts, &rdcc_nelmts, NULL, &w0); @@ -260,12 +255,7 @@ test_diag (int op, size_t cache_size, size_t io_size, size_t offset) hsize_t nio = 0; hssize_t hs_offset[2]; signed char *buf = calloc (1, (size_t)(SQUARE (io_size))); -#ifdef H5_WANT_H5_V1_4_COMPAT int mdc_nelmts, rdcc_nelmts; -#else /* H5_WANT_H5_V1_4_COMPAT */ - int mdc_nelmts; - size_t rdcc_nelmts; -#endif /* H5_WANT_H5_V1_4_COMPAT */ double w0; H5Pget_cache (fapl_g, &mdc_nelmts, &rdcc_nelmts, NULL, &w0); diff --git a/perform/pio_engine.c b/perform/pio_engine.c index 1163b74..689bd7d 100644 --- a/perform/pio_engine.c +++ b/perform/pio_engine.c @@ -157,7 +157,7 @@ do_pio(parameters param) char fname[FILENAME_MAX]; int maxprocs; - int nfiles, nf; + long nfiles, nf; long ndsets; off_t nelmts; char *buffer = NULL; /*data buffer pointer */ @@ -200,7 +200,7 @@ do_pio(parameters param) if (nfiles < 0 ) { fprintf(stderr, - "number of files must be >= 0 (%d)\n", + "number of files must be >= 0 (%ld)\n", nfiles); GOTOERROR(FAIL); } @@ -263,7 +263,7 @@ do_pio(parameters param) MPI_Barrier(pio_comm_g); - sprintf(base_name, "#pio_tmp_%u", nf); + sprintf(base_name, "#pio_tmp_%lu", nf); pio_create_filename(iot, base_name, fname, sizeof(fname)); set_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS, START); @@ -498,7 +498,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, #endif /* calculate dataset parameters. data type is always native C int */ - dset_size = nelmts * ELMT_SIZE; + dset_size = nelmts * (off_t)ELMT_SIZE; nelmts_in_buf = buf_size/ELMT_SIZE; /* hdf5 data space setup */ @@ -702,7 +702,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* Contiguous pattern */ /* need to (off_t) the elmnts_begin expression because they */ /* may be of smaller sized integer types */ - file_offset = dset_offset + (off_t)(elmts_begin + nelmts_xfer)*ELMT_SIZE; + file_offset = dset_offset + (off_t)(elmts_begin + nelmts_xfer)*(off_t)ELMT_SIZE; /* only care if seek returns error */ rc = POSIXSEEK(fd->posixfd, file_offset) < 0 ? -1 : 0; @@ -717,7 +717,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, size_t xferred=0; size_t toxfer=0; - file_offset = dset_offset + (off_t)(elmts_begin + nelmts_xfer)*ELMT_SIZE; + file_offset = dset_offset + (off_t)(elmts_begin + nelmts_xfer)*(off_t)ELMT_SIZE; if (pio_debug_level >= 4) { HDprint_rank(output); HDfprintf(output, @@ -733,7 +733,7 @@ HDfprintf(output, toxfer = nelmts_toxfer - xferred; /* Skip offset over blocks of other processes */ file_offset = dset_offset + - (off_t)(elmts_begin + (nelmts_xfer+xferred)*pio_mpi_nprocs_g)*ELMT_SIZE; + (off_t)(elmts_begin + (nelmts_xfer+xferred)*pio_mpi_nprocs_g)*(off_t)ELMT_SIZE; if (pio_debug_level >= 4) { HDprint_rank(output); HDfprintf(output, @@ -759,7 +759,7 @@ HDfprintf(output, break; case MPIO: - mpi_offset = dset_offset + (elmts_begin + nelmts_xfer)*ELMT_SIZE; + mpi_offset = dset_offset + (elmts_begin + nelmts_xfer)*(off_t)ELMT_SIZE; mrc = MPI_File_write_at(fd->mpifd, mpi_offset, buffer, (int)(nelmts_toxfer), ELMT_MPI_TYPE, &mpi_status); @@ -882,7 +882,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, #endif /* calculate dataset parameters. data type is always native C int */ - dset_size = nelmts * ELMT_SIZE; + dset_size = nelmts * (off_t)ELMT_SIZE; nelmts_in_buf = buf_size/ELMT_SIZE; /* hdf5 data space setup */ @@ -1039,7 +1039,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* Contiguous pattern */ /* need to (off_t) the elmnts_begin expression because they */ /* may be of smaller sized integer types */ - file_offset = dset_offset + (off_t)(elmts_begin + nelmts_xfer)*ELMT_SIZE; + file_offset = dset_offset + (off_t)(elmts_begin + nelmts_xfer)*(off_t)ELMT_SIZE; /* only care if seek returns error */ rc = POSIXSEEK(fd->posixfd, file_offset) < 0 ? -1 : 0; @@ -1054,7 +1054,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, size_t xferred=0; size_t toxfer=0; - file_offset = dset_offset + (off_t)(elmts_begin + nelmts_xfer)*ELMT_SIZE; + file_offset = dset_offset + (off_t)(elmts_begin + nelmts_xfer)*(off_t)ELMT_SIZE; if (pio_debug_level >= 4) { HDprint_rank(output); HDfprintf(output, @@ -1070,7 +1070,7 @@ HDfprintf(output, toxfer = nelmts_toxfer - xferred; /* Skip offset over blocks of other processes */ file_offset = dset_offset + - (off_t)(elmts_begin + (nelmts_xfer+xferred)*pio_mpi_nprocs_g)*ELMT_SIZE; + (off_t)(elmts_begin + (nelmts_xfer+xferred)*pio_mpi_nprocs_g)*(off_t)ELMT_SIZE; if (pio_debug_level >= 4) { HDprint_rank(output); HDfprintf(output, @@ -1096,7 +1096,7 @@ HDfprintf(output, break; case MPIO: - mpi_offset = dset_offset + (elmts_begin + nelmts_xfer)*ELMT_SIZE; + mpi_offset = dset_offset + (elmts_begin + nelmts_xfer)*(off_t)ELMT_SIZE; mrc = MPI_File_read_at(fd->mpifd, mpi_offset, buffer, (int)(nelmts_toxfer), ELMT_MPI_TYPE, diff --git a/perform/pio_perf.c b/perform/pio_perf.c index 8289f26..6b63c7b 100644 --- a/perform/pio_perf.c +++ b/perform/pio_perf.c @@ -253,7 +253,7 @@ struct options { off_t file_size; /* size of file */ long num_dsets; /* number of datasets */ long num_files; /* number of files */ - long num_iters; /* number of iterations */ + int num_iters; /* number of iterations */ int max_num_procs; /* maximum number of processes to use */ int min_num_procs; /* minimum number of processes to use */ size_t max_xfer_size; /* maximum transfer buffer size */ @@ -705,7 +705,7 @@ run_test(iotype iot, parameters parms, struct options *opts) static void output_all_info(minmax *mm, int count, int indent_level) { - register int i; + int i; for (i = 0; i < count; ++i) { print_indent(indent_level); @@ -750,7 +750,7 @@ get_minmax(minmax *mm, double val) static minmax accumulate_minmax_stuff(minmax *mm, int count) { - register int i; + int i; minmax total_mm; total_mm.sum = 0.0; @@ -871,7 +871,7 @@ output_results(const struct options *opts, const char *name, minmax *table, total_mm = accumulate_minmax_stuff(table, table_size); print_indent(3); - output_report("%s (%d iteration(s)):\n", name,(int)table_size); + output_report("%s (%d iteration(s)):\n", name,table_size); /* Note: The maximum throughput uses the minimum amount of time & vice versa */ diff --git a/perform/pio_perf.h b/perform/pio_perf.h index 4ed0240..6c2999d 100644 --- a/perform/pio_perf.h +++ b/perform/pio_perf.h @@ -34,10 +34,10 @@ typedef enum iotype_ { typedef struct parameters_ { 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_files; /* Number of files to create */ long num_dsets; /* Number of datasets to create */ off_t num_elmts; /* Number of native ints in each dset */ - int num_iters; /* Number of times to loop doing the IO */ + int num_iters; /* Number of times to loop doing the IO */ size_t buf_size; /* Buffer size */ size_t block_size; /* interleaved block size */ hsize_t h5_align; /* HDF5 object alignment */ |