diff options
author | Leon Arber <larber@ncsa.uiuc.edu> | 2005-09-29 20:49:51 (GMT) |
---|---|---|
committer | Leon Arber <larber@ncsa.uiuc.edu> | 2005-09-29 20:49:51 (GMT) |
commit | 3888942e3a5e88529d3586851feb94b8b6007ff3 (patch) | |
tree | 9a4595f80ed7e9b27a3a892859c971b0311ffaa3 | |
parent | 202b9ec55ccd7077c4201497f762cf1e341f30a1 (diff) | |
download | hdf5-3888942e3a5e88529d3586851feb94b8b6007ff3.zip hdf5-3888942e3a5e88529d3586851feb94b8b6007ff3.tar.gz hdf5-3888942e3a5e88529d3586851feb94b8b6007ff3.tar.bz2 |
[svn-r11483] Purpose:
bug fix.
Description:
The complex derived datatype test assumed that the fill value would be 0. This is not
the case on all systems.
Solution:
Modified the test to check against a known value in the outbuf array, instead of the fill value.
Platforms tested:
heping and MCR.
Misc. update:
-rw-r--r-- | testpar/t_mpi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index c2be2ff..f2889d5 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -620,7 +620,7 @@ and this platform. 3) Setting MPI file view with advtype 4) Writing 2 bytes 1 to 2 using MPI_File_write to a file 5) File content: -Supposed the fill value of the file is 0(most machines indeed do so) +Suppose the fill value of the file is 0(most machines indeed do so) and Fill value is embraced with "() in the following output: Expected output should be: 1,0,2 @@ -666,12 +666,12 @@ static int test_mpio_derived_dtype(char *filename) { int mpi_rank,mpi_size; - char buf[2],outbuf[2]; + char buf[3],outbuf[3] = {0}; MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); retcode = 0; - for(i=0;i<2;i++) + for(i=0;i<3;i++) buf[i] = i+1; @@ -747,7 +747,7 @@ static int test_mpio_derived_dtype(char *filename) { return 1; } - if((mpi_err = MPI_File_write(fh,buf,2,MPI_BYTE,&Status))!= MPI_SUCCESS){ + if((mpi_err = MPI_File_write(fh,buf,3,MPI_BYTE,&Status))!= MPI_SUCCESS){ MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); printf("MPI_File_write failed (%s)\n", mpi_err_str); return 1; @@ -773,16 +773,16 @@ static int test_mpio_derived_dtype(char *filename) { printf("MPI_File_set_view failed (%s)\n", mpi_err_str); return 1; } - if((mpi_err = MPI_File_read(fh,outbuf,2,MPI_BYTE,&Status))!=MPI_SUCCESS){ + if((mpi_err = MPI_File_read(fh,outbuf,3,MPI_BYTE,&Status))!=MPI_SUCCESS){ MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); printf("MPI_File_read failed (%s)\n", mpi_err_str); return 1; } - if(outbuf[1]==0) { + if(outbuf[2]==2) { retcode = 0; } - if(outbuf[1]==2) { + else { /* if(mpi_rank == 0) { printf("complicated derived datatype is NOT working at this platform\n"); printf("go back to hdf5/config and find the corresponding\n"); |