[mpich] MPICH primary repository branch, master, updated. v3.1.2-92-gf8bd87e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via f8bd87eb68621ecca31f07042f7e3548766d75a8 (commit) from 04a1907aaed46486857f995e4b8332cfdcd865e7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/f8bd87eb68621ecca31f07042f7e354876... commit f8bd87eb68621ecca31f07042f7e3548766d75a8 Author: Min Si <[email protected]> Date: Sat Aug 9 18:58:58 2014 -0500 Add process number check for SHM communicator. Some platforms do not support shared memory, they will create a SHM communicator which essentially equals to comm_self. This test should not be executed on such platforms. Thus we check the number of processes in SHM communicator and exit if only one process exists. Signed-off-by: Xin Zhao <[email protected]> Signed-off-by: Antonio J. Pena <[email protected]> diff --git a/test/mpi/rma/win_shared_zerobyte.c b/test/mpi/rma/win_shared_zerobyte.c index 1f602a7..4bec8e5 100644 --- a/test/mpi/rma/win_shared_zerobyte.c +++ b/test/mpi/rma/win_shared_zerobyte.c @@ -35,6 +35,11 @@ int main(int argc, char **argv) MPI_Comm_rank(shm_comm, &shm_rank); MPI_Comm_size(shm_comm, &shm_nproc); + /* Platform does not support shared memory, just return. */ + if (shm_nproc < 2) { + goto exit; + } + bases = calloc(shm_nproc, sizeof(int *)); if (shm_rank == 0 || shm_rank == shm_nproc - 1) { @@ -95,12 +100,15 @@ int main(int argc, char **argv) MPI_Reduce(&errors, &all_errors, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD); + exit: + if (rank == 0 && all_errors == 0) printf(" No Errors\n"); MPI_Finalize(); - free(bases); + if (bases) + free(bases); return 0; } ----------------------------------------------------------------------- Summary of changes: test/mpi/rma/win_shared_zerobyte.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) hooks/post-receive -- MPICH primary repository
participants (1)
-
noreply@mpich.org