From cde323f897811dcf07b16ae6d2dfe178c36e8414 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 18 Apr 2001 10:12:43 -0500 Subject: [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. --- testpar/t_mpi.c | 44 ++++++++++++++++++-------------------------- 1 file 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"); } } -- cgit v0.12