[mpich] MPICH primary repository branch, master, updated. v3.2-349-ge64f798
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 e64f798aeb003aed58cb4deebda9a9ef7473fb0a (commit) via 9152093f090e4fb67888889a43076c5fd97e8ab9 (commit) from 8f196d6f1209a8a652adf495f3cd5a138b05f4e3 (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/e64f798aeb003aed58cb4deebda9a9ef74... commit e64f798aeb003aed58cb4deebda9a9ef7473fb0a Author: Hajime Fujita <[email protected]> Date: Thu Jun 2 17:28:13 2016 -0500 Add a test case for many large message transfers This patch adds a test case to check if MPICH can handle multiple outstanding large message transfers correctly. This is a test case for csr/mpich-opa#26. Signed-off-by: Ken Raffenetti <[email protected]> diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore index 015ea7d..3978431 100644 --- a/test/mpi/.gitignore +++ b/test/mpi/.gitignore @@ -1057,6 +1057,7 @@ /pt2pt/icsend /pt2pt/isendselfprobe /pt2pt/large_message +/pt2pt/manylmt /pt2pt/mprobe /pt2pt/pingping /pt2pt/probe-unexp diff --git a/test/mpi/pt2pt/Makefile.am b/test/mpi/pt2pt/Makefile.am index 3ff3c3b..9b047b4 100644 --- a/test/mpi/pt2pt/Makefile.am +++ b/test/mpi/pt2pt/Makefile.am @@ -54,5 +54,5 @@ noinst_PROGRAMS = \ large_message \ mprobe \ big_count_status \ - many_isend - + many_isend \ + manylmt diff --git a/test/mpi/pt2pt/manylmt.c b/test/mpi/pt2pt/manylmt.c new file mode 100644 index 0000000..711f2d6 --- /dev/null +++ b/test/mpi/pt2pt/manylmt.c @@ -0,0 +1,61 @@ +/* + * (C) 2016 by Argonne National Laboratory. + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. + * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + * + * + * This program checks if MPICH can correctly handle + * many outstanding large message transfers + * + */ + +#include <stdio.h> +#include <stdlib.h> +#include <memory.h> +#include <mpi.h> + +#define N_TRY 32 +#define BLKSIZE (10*1024*1024) + +int main(int argc, char *argv[]) +{ + int size, rank; + int dest; + int i; + char *buff; + MPI_Request reqs[N_TRY]; + + MPI_Init(&argc, &argv); + + buff = malloc(N_TRY * BLKSIZE); + memset(buff, -1, N_TRY * BLKSIZE); + + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Comm_size(MPI_COMM_WORLD, &size); + + dest = size - 1; + + if (rank == 0) { + for (i = 0; i < N_TRY; i++) + MPI_Isend(buff + BLKSIZE*i, BLKSIZE, MPI_BYTE, dest, 0, MPI_COMM_WORLD, &reqs[i]); + MPI_Waitall(N_TRY, reqs, MPI_STATUSES_IGNORE); + } + else if (rank == dest) { + for (i = 0; i < N_TRY; i++) + MPI_Irecv(buff + BLKSIZE*i, BLKSIZE, MPI_BYTE, 0, 0, MPI_COMM_WORLD, &reqs[i]); + MPI_Waitall(N_TRY, reqs, MPI_STATUSES_IGNORE); + } + + free(buff); + + if (rank == 0) + puts(" No Errors"); + + MPI_Finalize(); + + return 0; +} diff --git a/test/mpi/pt2pt/testlist b/test/mpi/pt2pt/testlist index 7810c64..5613224 100644 --- a/test/mpi/pt2pt/testlist +++ b/test/mpi/pt2pt/testlist @@ -43,3 +43,4 @@ large_message 3 mprobe 2 mpiversion=3.0 big_count_status 1 mpiversion=3.0 many_isend 128 xfail=ticket2312 +manylmt 2 http://git.mpich.org/mpich.git/commitdiff/9152093f090e4fb67888889a43076c5fd9... commit 9152093f090e4fb67888889a43076c5fd97e8ab9 Author: Hajime Fujita <[email protected]> Date: Thu Jun 2 17:14:09 2016 -0500 Add a test case for Rget+unlock synchronization This patch adds a test case to make sure the synchronization in unlock works correctly. Essentially this program does the following: lock_all req=rget(buf) unlock_all re-use buf wait(req) This program is valid but if unlock_all does not implement the synchronization semantics correctly reusing the buffer would race with outstanding rgets. This is a test case for csr/mpich-opa#294. Signed-off-by: Ken Raffenetti <[email protected]> diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore index ed14c0f..015ea7d 100644 --- a/test/mpi/.gitignore +++ b/test/mpi/.gitignore @@ -1128,6 +1128,7 @@ /rma/putfidx /rma/req_example /rma/reqops +/rma/rget-unlock /rma/rmanull /rma/rmazero /rma/selfrma diff --git a/test/mpi/rma/Makefile.am b/test/mpi/rma/Makefile.am index c48a59b..bf84531 100644 --- a/test/mpi/rma/Makefile.am +++ b/test/mpi/rma/Makefile.am @@ -168,7 +168,8 @@ noinst_PROGRAMS = \ win_shared_acc_flush_load \ win_shared_gacc_flush_load \ win_shared_fop_flush_load \ - win_shared_cas_flush_load + win_shared_cas_flush_load \ + rget-unlock if BUILD_MPIX_TESTS noinst_PROGRAMS += aint @@ -275,4 +276,4 @@ win_shared_put_flush_load_CPPFLAGS = -DTEST_PUT $(AM_CPPFLAGS) win_shared_acc_flush_load_CPPFLAGS = -DTEST_ACC $(AM_CPPFLAGS) win_shared_gacc_flush_load_CPPFLAGS = -DTEST_GACC $(AM_CPPFLAGS) win_shared_fop_flush_load_CPPFLAGS = -DTEST_FOP $(AM_CPPFLAGS) -win_shared_cas_flush_load_CPPFLAGS = -DTEST_CAS $(AM_CPPFLAGS) \ No newline at end of file +win_shared_cas_flush_load_CPPFLAGS = -DTEST_CAS $(AM_CPPFLAGS) diff --git a/test/mpi/rma/rget-unlock.c b/test/mpi/rma/rget-unlock.c new file mode 100644 index 0000000..4c854df --- /dev/null +++ b/test/mpi/rma/rget-unlock.c @@ -0,0 +1,87 @@ +/* + * (C) 2016 by Argonne National Laboratory. + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. + * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + * + * + * This is a test case to make sure synchronization in unlock works correctly. + * + * Essentially this program does the following: + * + * lock_all + * req=rget(buf) + * unlock_all + * re-use buf + * wait(req) + * + * This program is valid but if unlock_all does not implement the synchronization + * semantics correctly reusing the buffer would race with outstanding rgets. + * + */ + +#include <stdio.h> +#include <stdlib.h> +#include <memory.h> +#include <mpi.h> + +#define N_ELMS (128) +#define BLOCKSIZE (1) +#define N_BLOCKS (N_ELMS/BLOCKSIZE) + +int main(int argc, char *argv[]) +{ + MPI_Win win; + int i; + int *rbuf, *lbuf; + int rank, size, trg; + MPI_Request *reqs; + int n_errors = 0; + + MPI_Init(&argc, &argv); + + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Comm_size(MPI_COMM_WORLD, &size); + + trg = (rank + 1) % size; + + rbuf = malloc(sizeof(int) * N_ELMS); + for (i = 0; i < N_ELMS; i++) + rbuf[i] = rank; + + lbuf = malloc(sizeof(int) * N_ELMS); + memset(lbuf, -1, sizeof(int) * N_ELMS); + + reqs = malloc(sizeof(MPI_Request) * N_BLOCKS); + + MPI_Win_create(rbuf, sizeof(int) * N_ELMS, sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win); + MPI_Win_lock_all(MPI_MODE_NOCHECK, win); + for (i = 0; i < N_BLOCKS; i++) + MPI_Rget(lbuf+i*BLOCKSIZE, BLOCKSIZE, MPI_INT, trg, i*BLOCKSIZE, BLOCKSIZE, MPI_INT, win, &reqs[i]); + MPI_Win_unlock_all(win); + for (i = 0; i < N_ELMS; i++) + lbuf[i] = -2; + + MPI_Waitall(N_BLOCKS, reqs, MPI_STATUSES_IGNORE); + for (i = 0; i < N_ELMS; i++) { + int v = lbuf[i]; + if (v != -2) { + printf("lbuf[%d]=%d, expected -2\n", i, v); + n_errors++; + } + } + MPI_Win_free(&win); + + free(reqs); + free(lbuf); + free(rbuf); + + if (rank == 0 && n_errors == 0) + printf(" No Errors\n"); + + MPI_Finalize(); + return 0; +} diff --git a/test/mpi/rma/testlist.in b/test/mpi/rma/testlist.in index 3f1c6a5..b6ee786 100644 --- a/test/mpi/rma/testlist.in +++ b/test/mpi/rma/testlist.in @@ -157,6 +157,7 @@ acc_flush_get 3 mpiversion=3.0 gacc_flush_get 3 mpiversion=3.0 fop_flush_get 3 mpiversion=3.0 cas_flush_get 3 mpiversion=3.0 +rget-unlock 2 mpiversion=3.0 ## This test is not strictly correct. This was meant to test out the ## case when MPI_Test is not nonblocking. However, we ended up ----------------------------------------------------------------------- Summary of changes: test/mpi/.gitignore | 2 + test/mpi/pt2pt/Makefile.am | 4 +- test/mpi/pt2pt/manylmt.c | 61 +++++++++++++++++++++++++++++++ test/mpi/pt2pt/testlist | 1 + test/mpi/rma/Makefile.am | 5 ++- test/mpi/rma/rget-unlock.c | 87 ++++++++++++++++++++++++++++++++++++++++++++ test/mpi/rma/testlist.in | 1 + 7 files changed, 157 insertions(+), 4 deletions(-) create mode 100644 test/mpi/pt2pt/manylmt.c create mode 100644 test/mpi/rma/rget-unlock.c hooks/post-receive -- MPICH primary repository
participants (1)
-
noreply@mpich.org