diff --git a/test/mpi/main.cc b/test/mpi/main.cc index 764439f617..074c2fcad7 100644 --- a/test/mpi/main.cc +++ b/test/mpi/main.cc @@ -663,6 +663,10 @@ int main(int argc, char *argv[]) "a problem\n"; failed = 1; } + + if (total_done_skipped_failed[3] != 0) { + failed = 1; + } } test_exit: diff --git a/test/mpi/test_allgather.cc b/test/mpi/test_allgather.cc index 9690976874..ebca8c4c95 100644 --- a/test/mpi/test_allgather.cc +++ b/test/mpi/test_allgather.cc @@ -79,9 +79,11 @@ ucc_status_t TestAllgather::check() dt_size = ucc_dt_size(dt); for (i = 0; i < size; i++) { init_buffer(PTR_OFFSET(check_buf, i * single_rank_count * dt_size), - single_rank_count, dt, mem_type, i * (iter_persistent + 1)); + single_rank_count, dt, UCC_MEMORY_TYPE_HOST, + i * (iter_persistent + 1)); } + return compare_buffers(rbuf, check_buf, single_rank_count * size, dt, mem_type); } diff --git a/test/mpi/test_allgatherv.cc b/test/mpi/test_allgatherv.cc index 9554f1c616..a3bfa55d93 100644 --- a/test/mpi/test_allgatherv.cc +++ b/test/mpi/test_allgatherv.cc @@ -82,18 +82,17 @@ ucc_status_t TestAllgatherv::set_input(int iter_persistent) { size_t dt_size = ucc_dt_size(dt); int rank; - void *buf, *check; + void *buf; + this->iter_persistent = iter_persistent; MPI_Comm_rank(team.comm, &rank); if (inplace) { buf = PTR_OFFSET(rbuf, displacements[rank] * dt_size); } else { buf = sbuf; } - check = PTR_OFFSET(check_buf, displacements[rank] * dt_size); init_buffer(buf, counts[rank], dt, mem_type, rank * (iter_persistent + 1)); - UCC_CHECK(ucc_mc_memcpy(check, buf, counts[rank] * dt_size, - UCC_MEMORY_TYPE_HOST, mem_type)); + return UCC_OK; } @@ -108,23 +107,19 @@ TestAllgatherv::~TestAllgatherv() { ucc_status_t TestAllgatherv::check() { - MPI_Datatype mpi_dt = ucc_dt_to_mpi(dt); - int total_count = 0; - int size, rank, completed, i; - MPI_Request req; + int total_count = 0; + int size, i; MPI_Comm_size(team.comm, &size); - MPI_Comm_rank(team.comm, &rank); for (i = 0 ; i < size; i++) { total_count += counts[i]; } - MPI_Iallgatherv(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, check_buf, - (int *)counts, (int *)displacements, mpi_dt, team.comm, - &req); - do { - MPI_Test(&req, &completed, MPI_STATUS_IGNORE); - ucc_context_progress(team.ctx); - } while(!completed); + + for (i = 0; i < size; i++) { + init_buffer(PTR_OFFSET(check_buf, displacements[i] * ucc_dt_size(dt)), + counts[i], dt, UCC_MEMORY_TYPE_HOST, + i * (iter_persistent + 1)); + } return compare_buffers(rbuf, check_buf, total_count, dt, mem_type); } diff --git a/test/mpi/test_alltoall.cc b/test/mpi/test_alltoall.cc index c66a5099fa..a92900265e 100644 --- a/test/mpi/test_alltoall.cc +++ b/test/mpi/test_alltoall.cc @@ -107,10 +107,10 @@ ucc_status_t TestAlltoall::check() MPI_Comm_size(team.comm, &size); single_rank_count = args.src.info.count / size; - for ( i = 0; i < size; i++) { + for (i = 0; i < size; i++) { init_buffer(PTR_OFFSET(check_buf, i * single_rank_count * ucc_dt_size(dt)), - single_rank_count, dt, mem_type, i * (iter_persistent + 1), - single_rank_count * rank); + single_rank_count, dt, UCC_MEMORY_TYPE_HOST, + i * (iter_persistent + 1), single_rank_count * rank); } return compare_buffers(rbuf, check_buf, single_rank_count * size, dt, diff --git a/test/mpi/test_alltoallv.cc b/test/mpi/test_alltoallv.cc index 522add0a3f..aaa65b7e10 100644 --- a/test/mpi/test_alltoallv.cc +++ b/test/mpi/test_alltoallv.cc @@ -100,7 +100,7 @@ TestAlltoallv::TestAlltoallv(ucc_test_team_t &_team, TestCaseParams ¶ms) : if (TEST_SKIP_NONE != skip_reduce(test_skip, team.comm)) { return; } - check_buf = ucc_malloc((sncounts + rncounts) * dt_size, "check buf"); + check_buf = ucc_malloc(rncounts * dt_size, "check buf"); UCC_MALLOC_CHECK(check_buf); if (!is_onesided) { @@ -184,13 +184,11 @@ TestAlltoallv::TestAlltoallv(ucc_test_team_t &_team, TestCaseParams ¶ms) : ucc_status_t TestAlltoallv::set_input(int iter_persistent) { - size_t dt_size = ucc_dt_size(dt); - int rank; + int rank; + this->iter_persistent = iter_persistent; MPI_Comm_rank(team.comm, &rank); init_buffer(sbuf, sncounts, dt, mem_type, rank * (iter_persistent + 1)); - UCC_CHECK(ucc_mc_memcpy(check_buf, sbuf, sncounts * dt_size, - UCC_MEMORY_TYPE_HOST, mem_type)); return UCC_OK; } @@ -209,20 +207,25 @@ TestAlltoallv::~TestAlltoallv() ucc_status_t TestAlltoallv::check() { - size_t dt_size = ucc_dt_size(dt); MPI_Request req; - int completed; - void *check; + int i, size, rank, completed; - check = PTR_OFFSET(check_buf, sncounts * dt_size); - MPI_Ialltoallv(check_buf, scounts, sdispls, ucc_dt_to_mpi(dt), check, - rcounts, rdispls, ucc_dt_to_mpi(dt), team.comm, &req); + MPI_Comm_size(team.comm, &size); + MPI_Comm_rank(team.comm, &rank); + + MPI_Ialltoall(sdispls, 1, MPI_INT, scounts, 1, MPI_INT, team.comm, &req); do { MPI_Test(&req, &completed, MPI_STATUS_IGNORE); ucc_context_progress(team.ctx); } while(!completed); - return compare_buffers(rbuf, check, rncounts, dt, mem_type); + for (i = 0; i < size; i++) { + init_buffer(PTR_OFFSET(check_buf, rdispls[i] * ucc_dt_size(dt)), + rcounts[i], dt, UCC_MEMORY_TYPE_HOST, + i * (iter_persistent + 1), scounts[i]); + } + + return compare_buffers(rbuf, check_buf, rncounts, dt, mem_type); } std::string TestAlltoallv::str()