diff options
author | MuQun Yang <ymuqun@hdfgroup.org> | 2005-09-22 14:39:32 (GMT) |
---|---|---|
committer | MuQun Yang <ymuqun@hdfgroup.org> | 2005-09-22 14:39:32 (GMT) |
commit | e42782fa3ad54b5b4cf10915c2121202732d128c (patch) | |
tree | 63fad0046d56da0c56a394ef617e29c74e9f790a | |
parent | d67e59d9b22d175de5385c4dfe39915692d63101 (diff) | |
download | hdf5-e42782fa3ad54b5b4cf10915c2121202732d128c.zip hdf5-e42782fa3ad54b5b4cf10915c2121202732d128c.tar.gz hdf5-e42782fa3ad54b5b4cf10915c2121202732d128c.tar.bz2 |
[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:
-rw-r--r-- | testpar/t_mpi.c | 5 |
1 files 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; |