diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2009-02-18 20:05:49 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2009-02-18 20:05:49 (GMT) |
commit | c880943ce9d588a58aecebeb7d2ecf978e02616b (patch) | |
tree | f3e499ba6b61c4fe4af43d4787d59b203b444da5 /perform | |
parent | 61346d50fab0dbaadd313e46cc968d4e4ad26c82 (diff) | |
download | hdf5-c880943ce9d588a58aecebeb7d2ecf978e02616b.zip hdf5-c880943ce9d588a58aecebeb7d2ecf978e02616b.tar.gz hdf5-c880943ce9d588a58aecebeb7d2ecf978e02616b.tar.bz2 |
[svn-r16490] Fixed bug #1459 by eliminating the macro long_long and replacing all instances with long long.
Tested:
h5comittest
fedora 10 x64
XP32, VNET
Diffstat (limited to 'perform')
-rw-r--r-- | perform/pio_engine.c | 34 | ||||
-rw-r--r-- | perform/pio_perf.c | 60 | ||||
-rw-r--r-- | perform/pio_standalone.h | 19 | ||||
-rw-r--r-- | perform/sio_engine.c | 6 | ||||
-rw-r--r-- | perform/sio_perf.c | 12 | ||||
-rw-r--r-- | perform/sio_standalone.h | 18 |
6 files changed, 56 insertions, 93 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c index 6124bce..c5214d3 100644 --- a/perform/pio_engine.c +++ b/perform/pio_engine.c @@ -248,26 +248,26 @@ do_pio(parameters param) /* Validate transfer buffer size & block size*/ if(blk_size<=0) { HDfprintf(stderr, - "Transfer block size (%Hd) must be > 0\n", (long_long)blk_size); + "Transfer block size (%Hd) must be > 0\n", (long long)blk_size); GOTOERROR(FAIL); } if(buf_size<=0) { HDfprintf(stderr, - "Transfer buffer size (%Hd) must be > 0\n", (long_long)buf_size); + "Transfer buffer size (%Hd) must be > 0\n", (long long)buf_size); GOTOERROR(FAIL); } if ((buf_size % blk_size) != 0){ HDfprintf(stderr, "Transfer buffer size (%Hd) must be a multiple of the " "interleaved I/O block size (%Hd)\n", - (long_long)buf_size, (long_long)blk_size); + (long long)buf_size, (long long)blk_size); GOTOERROR(FAIL); } if((snbytes%pio_mpi_nprocs_g)!=0) { HDfprintf(stderr, "Dataset size (%Hd) must be a multiple of the " "number of processes (%d)\n", - (long_long)snbytes, pio_mpi_nprocs_g); + (long long)snbytes, pio_mpi_nprocs_g); GOTOERROR(FAIL); } @@ -276,7 +276,7 @@ do_pio(parameters param) HDfprintf(stderr, "Dataset size/process (%Hd) must be a multiple of the " "trasfer buffer size (%Hd)\n", - (long_long)(snbytes/pio_mpi_nprocs_g), (long_long)buf_size); + (long long)(snbytes/pio_mpi_nprocs_g), (long long)buf_size); GOTOERROR(FAIL); } } @@ -285,7 +285,7 @@ do_pio(parameters param) HDfprintf(stderr, "Dataset side size (%Hd) must be a multiple of the " "trasfer buffer size (%Hd)\n", - (long_long)snbytes, (long_long)buf_size); + (long long)snbytes, (long long)buf_size); GOTOERROR(FAIL); } } @@ -293,7 +293,7 @@ do_pio(parameters param) /* Allocate transfer buffer */ if ((buffer = malloc(bsize)) == NULL){ HDfprintf(stderr, "malloc for transfer buffer size (%Hd) failed\n", - (long_long)(bsize)); + (long long)(bsize)); GOTOERROR(FAIL); } @@ -651,13 +651,13 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, if (!parms->dim2d) { HDfprintf(output, "Debug(do_write): " "buf_size=%Hd, bytes_begin=%Hd, bytes_count=%Hd\n", - (long_long)buf_size, (long_long)bytes_begin[0], - (long_long)bytes_count); + (long long)buf_size, (long long)bytes_begin[0], + (long long)bytes_count); } else { HDfprintf(output, "Debug(do_write): " "linear buf_size=%Hd, bytes_begin=(%Hd,%Hd), bytes_count=%Hd\n", - (long_long)buf_size*blk_size, (long_long)bytes_begin[0], - (long_long)bytes_begin[1], (long_long)bytes_count); + (long long)buf_size*blk_size, (long long)bytes_begin[0], + (long long)bytes_begin[1], (long long)bytes_count); } } @@ -1625,13 +1625,13 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, if (!parms->dim2d) { HDfprintf(output, "Debug(do_write): " "buf_size=%Hd, bytes_begin=%Hd, bytes_count=%Hd\n", - (long_long)buf_size, (long_long)bytes_begin[0], - (long_long)bytes_count); + (long long)buf_size, (long long)bytes_begin[0], + (long long)bytes_count); } else { HDfprintf(output, "Debug(do_write): " "linear buf_size=%Hd, bytes_begin=(%Hd,%Hd), bytes_count=%Hd\n", - (long_long)buf_size*blk_size, (long_long)bytes_begin[0], - (long_long)bytes_begin[1], (long_long)bytes_count); + (long long)buf_size*blk_size, (long long)bytes_begin[0], + (long long)bytes_begin[1], (long long)bytes_count); } } @@ -2337,8 +2337,8 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, HDprint_rank(output); HDfprintf(output, "read data error, expected (%Hd), " "got (%Hd)\n", - (long_long)pio_mpi_rank_g+1, - (long_long)*(ucharptr-1)); + (long long)pio_mpi_rank_g+1, + (long long)*(ucharptr-1)); } /* end if */ } /* end if */ } /* end for */ diff --git a/perform/pio_perf.c b/perform/pio_perf.c index b19c7fb..a6057b3 100644 --- a/perform/pio_perf.c +++ b/perform/pio_perf.c @@ -1107,7 +1107,7 @@ print_indent(register int indent) } static void -recover_size_and_print(long_long val, const char *end) +recover_size_and_print(long long val, const char *end) { if (val >= ONE_KB && (val % ONE_KB) == 0) { if (val >= ONE_MB && (val % ONE_MB) == 0) { @@ -1147,67 +1147,67 @@ report_parameters(struct options *opts) print_io_api(opts->io_types); HDfprintf(output, "rank %d: Number of files=%Hd\n", rank, - (long_long)opts->num_files); + (long long)opts->num_files); HDfprintf(output, "rank %d: Number of datasets=%Hd\n", rank, - (long_long)opts->num_dsets); + (long long)opts->num_dsets); HDfprintf(output, "rank %d: Number of iterations=%Hd\n", rank, - (long_long)opts->num_iters); + (long long)opts->num_iters); HDfprintf(output, "rank %d: Number of processes=%d:%d\n", rank, opts->min_num_procs, opts->max_num_procs); if (opts->dim2d){ HDfprintf(output, "rank %d: Number of bytes per process per dataset=", rank); - recover_size_and_print((long_long)(opts->num_bpp * opts->num_bpp * opts->min_num_procs), ":"); - recover_size_and_print((long_long)(opts->num_bpp * opts->num_bpp * opts->max_num_procs), "\n"); + recover_size_and_print((long long)(opts->num_bpp * opts->num_bpp * opts->min_num_procs), ":"); + recover_size_and_print((long long)(opts->num_bpp * opts->num_bpp * opts->max_num_procs), "\n"); HDfprintf(output, "rank %d: Size of dataset(s)=", rank); - recover_size_and_print((long_long)(opts->num_bpp * opts->min_num_procs), "x"); - recover_size_and_print((long_long)(opts->num_bpp * opts->min_num_procs), ":"); - recover_size_and_print((long_long)(opts->num_bpp * opts->max_num_procs), "x"); - recover_size_and_print((long_long)(opts->num_bpp * opts->max_num_procs), "\n"); + recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), "x"); + recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), ":"); + recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "x"); + recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n"); HDfprintf(output, "rank %d: File size=", rank); - recover_size_and_print((long_long)(pow(opts->num_bpp * opts->min_num_procs,2) + recover_size_and_print((long long)(pow(opts->num_bpp * opts->min_num_procs,2) * opts->num_dsets), ":"); - recover_size_and_print((long_long)(pow(opts->num_bpp * opts->max_num_procs,2) + recover_size_and_print((long long)(pow(opts->num_bpp * opts->max_num_procs,2) * opts->num_dsets), "\n"); HDfprintf(output, "rank %d: Transfer buffer size=", rank); if(opts->interleaved){ - recover_size_and_print((long_long)opts->min_xfer_size, "x"); - recover_size_and_print((long_long)opts->blk_size, ":"); - recover_size_and_print((long_long)opts->max_xfer_size, "x"); - recover_size_and_print((long_long)opts->blk_size, "\n"); + recover_size_and_print((long long)opts->min_xfer_size, "x"); + recover_size_and_print((long long)opts->blk_size, ":"); + recover_size_and_print((long long)opts->max_xfer_size, "x"); + recover_size_and_print((long long)opts->blk_size, "\n"); } else{ - recover_size_and_print((long_long)opts->blk_size, "x"); - recover_size_and_print((long_long)opts->min_xfer_size, ":"); - recover_size_and_print((long_long)opts->blk_size, "x"); - recover_size_and_print((long_long)opts->max_xfer_size, "\n"); + recover_size_and_print((long long)opts->blk_size, "x"); + recover_size_and_print((long long)opts->min_xfer_size, ":"); + recover_size_and_print((long long)opts->blk_size, "x"); + recover_size_and_print((long long)opts->max_xfer_size, "\n"); } HDfprintf(output, "rank %d: Block size=", rank); - recover_size_and_print((long_long)opts->blk_size, "x"); - recover_size_and_print((long_long)opts->blk_size, "\n"); + recover_size_and_print((long long)opts->blk_size, "x"); + recover_size_and_print((long long)opts->blk_size, "\n"); } else{ HDfprintf(output, "rank %d: Number of bytes per process per dataset=", rank); - recover_size_and_print((long_long)opts->num_bpp, "\n"); + recover_size_and_print((long long)opts->num_bpp, "\n"); HDfprintf(output, "rank %d: Size of dataset(s)=", rank); - recover_size_and_print((long_long)(opts->num_bpp * opts->min_num_procs), ":"); - recover_size_and_print((long_long)(opts->num_bpp * opts->max_num_procs), "\n"); + recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), ":"); + recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n"); HDfprintf(output, "rank %d: File size=", rank); - recover_size_and_print((long_long)(opts->num_bpp * opts->min_num_procs + recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs * opts->num_dsets), ":"); - recover_size_and_print((long_long)(opts->num_bpp * opts->max_num_procs + recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs * opts->num_dsets), "\n"); HDfprintf(output, "rank %d: Transfer buffer size=", rank); - recover_size_and_print((long_long)opts->min_xfer_size, ":"); - recover_size_and_print((long_long)opts->max_xfer_size, "\n"); + recover_size_and_print((long long)opts->min_xfer_size, ":"); + recover_size_and_print((long long)opts->max_xfer_size, "\n"); HDfprintf(output, "rank %d: Block size=", rank); - recover_size_and_print((long_long)opts->blk_size, "\n"); + recover_size_and_print((long long)opts->blk_size, "\n"); } HDfprintf(output, "rank %d: Block Pattern in Dataset=", rank); diff --git a/perform/pio_standalone.h b/perform/pio_standalone.h index af67a35..ab4ee94 100644 --- a/perform/pio_standalone.h +++ b/perform/pio_standalone.h @@ -132,25 +132,6 @@ typedef off_t h5_stat_size_t; # define TRUE 1 #endif -/* - * Although `long long' is part of the revised ANSI-C some compilers don't - * support it yet. We define `long_long' as the longest integral integer type - * supported by the compiler, usually 64 bits. It must be legal to qualify - * `long_long' with `unsigned'. - */ -#if H5_SIZEOF_LONG_LONG>0 -# define long_long long long -#elif H5_SIZEOF___INT64>0 -# define long_long __int64 /*Win32*/ -# undef H5_SIZEOF_LONG_LONG -# define H5_SIZEOF_LONG_LONG H5_SIZEOF___INT64 -#else -# define long_long long int -# undef H5_SIZEOF_LONG_LONG -# define H5_SIZEOF_LONG_LONG H5_SIZEOF_LONG -#endif - - /** From h5test.h **/ diff --git a/perform/sio_engine.c b/perform/sio_engine.c index a6a7fa1..0fdfac5 100644 --- a/perform/sio_engine.c +++ b/perform/sio_engine.c @@ -202,7 +202,7 @@ do_sio(parameters param) /* Validate transfer buffer size */ if (param.buf_size[i]<=0) { HDfprintf(stderr, - "Transfer buffer size[%d] (%Hd) must be > 0\n", i,(long_long)buf_size[i]); + "Transfer buffer size[%d] (%Hd) must be > 0\n", i,(long long)buf_size[i]); GOTOERROR(FAIL); } @@ -210,7 +210,7 @@ do_sio(parameters param) HDfprintf(stderr, "Dataset size[%d] (%Hd) must be a multiple of the " "trasfer buffer size[%d] (%Hd)\n",param.rank, - (long_long)param.dset_size[i], param.rank, (long_long)param.buf_size[i]); + (long long)param.dset_size[i], param.rank, (long long)param.buf_size[i]); GOTOERROR(FAIL); } @@ -220,7 +220,7 @@ do_sio(parameters param) buffer2 = malloc(linear_buf_size); if ((buffer = malloc(linear_buf_size)) == NULL){ HDfprintf(stderr, "malloc for transfer buffer size (%Hd) failed\n", - (long_long)(linear_buf_size)); + (long long)(linear_buf_size)); GOTOERROR(FAIL); } diff --git a/perform/sio_perf.c b/perform/sio_perf.c index b0f81f4..271bf20 100644 --- a/perform/sio_perf.c +++ b/perform/sio_perf.c @@ -820,7 +820,7 @@ print_indent(register int indent) } static void -recover_size_and_print(long_long val, const char *end) +recover_size_and_print(long long val, const char *end) { if (val >= ONE_KB && (val % ONE_KB) == 0) { if (val >= ONE_MB && (val % ONE_MB) == 0) { @@ -859,23 +859,23 @@ report_parameters(struct options *opts) print_io_api(opts->io_types); HDfprintf(output, "Number of iterations=%Hd\n", - (long_long)opts->num_iters); + (long long)opts->num_iters); HDfprintf(output, "Dataset size="); for (i=0; i<rank; i++) - recover_size_and_print((long_long)opts->dset_size[i], " "); + recover_size_and_print((long long)opts->dset_size[i], " "); HDfprintf(output, "\n"); HDfprintf(output, "Transfer buffer size="); for (i=0; i<rank; i++) - recover_size_and_print((long_long)opts->buf_size[i], " "); + recover_size_and_print((long long)opts->buf_size[i], " "); HDfprintf(output, "\n"); HDfprintf(output, "Dimension access order="); for (i=0; i<rank; i++) - recover_size_and_print((long_long)opts->order[i], " "); + recover_size_and_print((long long)opts->order[i], " "); HDfprintf(output, "\n"); if (opts->io_types & SIO_HDF5) { @@ -887,7 +887,7 @@ report_parameters(struct options *opts) HDfprintf(output, "Chunked\n"); HDfprintf(output, "HDF5 chunk size="); for (i=0; i<rank; i++) - recover_size_and_print((long_long)opts->chk_size[i], " "); + recover_size_and_print((long long)opts->chk_size[i], " "); HDfprintf(output, "\n"); HDfprintf(output, "HDF5 dataset dimensions="); diff --git a/perform/sio_standalone.h b/perform/sio_standalone.h index 7b32c66..9faaac1 100644 --- a/perform/sio_standalone.h +++ b/perform/sio_standalone.h @@ -486,24 +486,6 @@ extern char *strdup(const char *s); # define TRUE 1 #endif -/* - * Although `long long' is part of the revised ANSI-C some compilers don't - * support it yet. We define `long_long' as the longest integral integer type - * supported by the compiler, usually 64 bits. It must be legal to qualify - * `long_long' with `unsigned'. - */ -#if H5_SIZEOF_LONG_LONG>0 -# define long_long long long -#elif H5_SIZEOF___INT64>0 -# define long_long __int64 /*Win32*/ -# undef H5_SIZEOF_LONG_LONG -# define H5_SIZEOF_LONG_LONG H5_SIZEOF___INT64 -#else -# define long_long long int -# undef H5_SIZEOF_LONG_LONG -# define H5_SIZEOF_LONG_LONG H5_SIZEOF_LONG -#endif - /** From h5test.h **/ #ifdef H5_HAVE_PARALLEL |