summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2001-04-18 15:58:03 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2001-04-18 15:58:03 (GMT)
commit178a09d44ef1eefd0dbbb69234b7d87ee03c56f0 (patch)
tree1f53ee6beaea047ab06e59cd02ba4ebf768f6775 /testpar
parent287db5fd55874d7a1135bbbd8595bfa393a83ac2 (diff)
downloadhdf5-178a09d44ef1eefd0dbbb69234b7d87ee03c56f0.zip
hdf5-178a09d44ef1eefd0dbbb69234b7d87ee03c56f0.tar.gz
hdf5-178a09d44ef1eefd0dbbb69234b7d87ee03c56f0.tar.bz2
[svn-r3819] 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')
-rw-r--r--testpar/t_mpi.c44
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");
}
}