diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2001-04-18 15:12:43 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2001-04-18 15:12:43 (GMT) |
commit | cde323f897811dcf07b16ae6d2dfe178c36e8414 (patch) | |
tree | 6987f62e8d20d6d909187b81c8b3f452c3137360 /testpar/t_mpi.c | |
parent | 45c3f3edfc364b33a64589b8565a48770a6de6cf (diff) | |
download | hdf5-cde323f897811dcf07b16ae6d2dfe178c36e8414.zip hdf5-cde323f897811dcf07b16ae6d2dfe178c36e8414.tar.gz hdf5-cde323f897811dcf07b16ae6d2dfe178c36e8414.tar.bz2 |
[svn-r3818] Purpose:
Bug fix and clean up.
Description:
The part that should test 4GB was actually testing 2GB due to
typo.
Solution:
Corrected the typo to use 4GB constant. Rearranged the code
to group 2GB and 4GB tests in their own. Removed some duplicated
testing code.
Platforms tested:
modi4.
Diffstat (limited to 'testpar/t_mpi.c')
-rw-r--r-- | testpar/t_mpi.c | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index 0c2c89e..0ebaca0 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -172,44 +172,36 @@ test_mpio_offset() if (verbose) printf("MPIO OFFSET test\n"); - /* verify correctness of increasing from below 2 GB to above 2GB */ - mpi_off = TWO_GB_LESS1; - for (i=0; i < 3; i++){ - mpi_off_old = mpi_off; - mpi_off = mpi_off + 1; - VRFY((mpi_off>0), "OFFSET increment no overflow"); /* no overflow */ - VRFY((mpi_off-1)==mpi_off_old, "OFFSET increment succeed"); /* correct inc. */ - } - - /* verify correctness of increasing from below 4 GB to above 4 GB */ - mpi_off = TWO_GB_LESS1; - for (i=0; i < 3; i++){ - mpi_off_old = mpi_off; - mpi_off = mpi_off + 1; - VRFY((mpi_off>0), "OFFSET increment no overflow"); /* no overflow */ - VRFY((mpi_off-1)==mpi_off_old, "OFFSET increment succeed"); /* correct inc. */ - } - /* verify correctness of assigning 2GB sizes */ mpi_off = 2 * 1024 * (MPI_Offset)MB; - VRFY((mpi_off>0), "OFFSET assignment no overflow"); - VRFY((mpi_off-1)==TWO_GB_LESS1, "OFFSET assignment succeed"); + VRFY((mpi_off>0), "2GB OFFSET assignment no overflow"); + VRFY((mpi_off-1)==TWO_GB_LESS1, "2GB OFFSET assignment succeed"); + + /* verify correctness of increasing from below 2 GB to above 2GB */ + mpi_off = TWO_GB_LESS1; for (i=0; i < 3; i++){ mpi_off_old = mpi_off; mpi_off = mpi_off + 1; - VRFY((mpi_off>0), "OFFSET increment no overflow"); /* no overflow */ - VRFY((mpi_off-1)==mpi_off_old, "OFFSET increment succeed"); /* correct inc. */ + /* no overflow */ + VRFY((mpi_off>0), "2GB OFFSET increment no overflow"); + /* correct inc. */ + VRFY((mpi_off-1)==mpi_off_old, "2GB OFFSET increment succeed"); } /* verify correctness of assigning 4GB sizes */ mpi_off = 4 * 1024 * (MPI_Offset)MB; - VRFY((mpi_off>0), "OFFSET assignment no overflow"); - VRFY((mpi_off-1)==FOUR_GB_LESS1, "OFFSET assignment succeed"); + VRFY((mpi_off>0), "4GB OFFSET assignment no overflow"); + VRFY((mpi_off-1)==FOUR_GB_LESS1, "4GB OFFSET assignment succeed"); + + /* verify correctness of increasing from below 4 GB to above 4 GB */ + mpi_off = FOUR_GB_LESS1; for (i=0; i < 3; i++){ mpi_off_old = mpi_off; mpi_off = mpi_off + 1; - VRFY((mpi_off>0), "OFFSET increment no overflow"); /* no overflow */ - VRFY((mpi_off-1)==mpi_off_old, "OFFSET increment succeed"); /* correct inc. */ + /* no overflow */ + VRFY((mpi_off>0), "4GB OFFSET increment no overflow"); + /* correct inc. */ + VRFY((mpi_off-1)==mpi_off_old, "4GB OFFSET increment succeed"); } } |