From e42782fa3ad54b5b4cf10915c2121202732d128c Mon Sep 17 00:00:00 2001 From: MuQun Yang Date: Thu, 22 Sep 2005 09:39:32 -0500 Subject: [svn-r11459] Purpose: A bug fix Description: MPI_Status_IGNORE is treated as a NULL pointer for mpich 1.2.4 or similar MPI packages. It caused segmentation fault for MPI derived datatype test. Solution: Define MPI_STATUS status, and pass &status into MPI_File_read and MPI_File_write. Platforms tested: too trivial to test. Misc. update: --- testpar/t_mpi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index 99e5c8c..8abe9e7 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -657,6 +657,7 @@ static int test_mpio_derived_dtype(char *filename) { MPI_Datatype adv_filetype,bas_filetype[2]; MPI_Datatype etypenew, filetypenew; MPI_Offset disp,dispnew; + MPI_Status Status; MPI_Aint adv_disp[2]; MPI_Aint offsets[1],adv_offsets[2]; int blocklens[1],adv_blocklens[2]; @@ -746,7 +747,7 @@ static int test_mpio_derived_dtype(char *filename) { return 1; } - if((mpi_err = MPI_File_write(fh,buf,2,MPI_BYTE,MPI_STATUS_IGNORE))!= MPI_SUCCESS){ + if((mpi_err = MPI_File_write(fh,buf,2,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; @@ -772,7 +773,7 @@ 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,MPI_STATUS_IGNORE))!=MPI_SUCCESS){ + if((mpi_err = MPI_File_read(fh,outbuf,2,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; -- cgit v0.12