From 3efa9c8b05acd0383362d0162014ef05dd3279c2 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 23 May 2007 10:47:44 -0500 Subject: [svn-r13801] Output improvement. Added a header message showing the purpose and explanation that the test is for inoformation and always exits 0. Also added a summary at the end. Some other cosmetic changes (moved couple function code up, added some more printf, fflush statements.) Tested platform: kagiso. --- testpar/t_posix_compliant.c | 114 +++++++++++++++++++++++++++----------------- 1 file changed, 69 insertions(+), 45 deletions(-) diff --git a/testpar/t_posix_compliant.c b/testpar/t_posix_compliant.c index c9b32d4..a4b8a86 100644 --- a/testpar/t_posix_compliant.c +++ b/testpar/t_posix_compliant.c @@ -57,6 +57,7 @@ static char* testfile = NULL; static int err_flag = 0; static int max_err_print = 5; +int nmismatches = 0; /* warnings encountered */ /* globals needed for getopt * Although they *should* be defined in unistd.h */ @@ -435,6 +436,7 @@ static int allwrite_allread_interlaced(int numprocs, int rank, int write_size) } } + nmismatches += counter; mpio_result = MPI_File_close(&fh); CHECK_SUCCESS(mpio_result); @@ -556,6 +558,7 @@ static int allwrite_allread_overlap(int numprocs, int rank, int write_size) } } + nmismatches += counter; mpio_result = MPI_File_close(&fh); CHECK_SUCCESS(mpio_result); HDfree(writebuf); @@ -677,6 +680,62 @@ static int onewrite_allread_interlaced(int numprocs, int rank, int write_size) } +static int find_writesize(int rank, int numprocs, int size) +{ + /* Largest number in the file */ + int tmp = (size-1)*numprocs; + int x = 0; + int write_size = 0; + + /* Find largest multiple not greater than tmp */ + while(x <= tmp) + { + if( (rank == 0) || (rank == 1) ) + x+=2; + else + x += (rank+1); + + write_size++; + } + + return write_size; +} + +static void vrfy_elements(int* a, int* b, int size, int rank) +{ + int i, counter = 0; + + for(i=0; i