diff --git a/mpi/tests/large_set.c b/mpi/tests/large_set.c index a341a8e98..5fd6e0ba0 100644 --- a/mpi/tests/large_set.c +++ b/mpi/tests/large_set.c @@ -606,7 +606,15 @@ int main(int argc, char **argv) MPI_Finalize(); return rank_comm == 0 ? STARPU_TEST_SKIPPED : 0; } - MPI_Type_commit(&datatype); + ret = MPI_Type_commit(&datatype); + if (ret != MPI_SUCCESS) + { + FPRINTF(stderr, "Function MPI_Type_commit fails with large types.\n"); + starpu_mpi_shutdown(); + if (!mpi_init) + MPI_Finalize(); + return rank_comm == 0 ? STARPU_TEST_SKIPPED : 0; + } MPI_Type_free(&datatype); } #endif