Dear all, I want to share with you the follow issue with the OpenMPI shipped with the latest Ubuntu Artful. It is OpenMPI 2.1.1 compiled with option --enable-heterogeneous.
Looking at this issue https://github.com/open-mpi/ompi/issues/171, it appears that this option is broken and should not be used. This option is being used in Debian/Ubuntu since 2010 ( http://changelogs.ubuntu.com/changelogs/pool/universe/o/ope nmpi/openmpi_2.1.1-6/changelog) and is still used so far. Apparently, nobody complained so far. However, now I complain :-) I've found a simple example for which this option causes invalid results in OpenMPI. int A = 666, B = 42; MPI_Irecv(&A, 1, MPI_INT, MPI_ANY_SOURCE, tag, comm, &req); MPI_Send(&B, 1, MPI_INT, my_rank, tag, comm); MPI_Wait(&req, &status); # After that, when compiled with --enable-heterogeneous, we have A != B This happens with just a single process. The full example is in attachment (to be run with "mpirun -n 1 ./bug_openmpi_artful"). I extracted and simplified the code from the Zoltan library with which I initially noticed the issue. I find it annoying that Ubuntu distributes a broken OpenMPI. I've also tested OpenMPI 2.1.1, 2.1.2 and 3.0.0 and using --enable-heterogeneous causes the bug systematically. Finally, my points/questions are: - To share with you this small example in case you want to debug it - What is the status of issue https://github.com/open-mpi/ompi/issues/171 ? Is this option still considered broken? If yes, I encourage you to remove it or mark as deprecated to avoid this kind of mistake in the future. - To get the feedback of OpenMPI developers on the use of this option, which might convince the Debian/Ubuntu maintainer to remove this flag. I have opened a bug on Ubuntu for it https://bugs.launchpad.net/ ubuntu/+source/openmpi/+bug/1731938 Thanks! Xavier -- Dr Xavier BESSERON Research associate FSTC, University of Luxembourg Campus Belval, Office MNO E04 0415-040 Phone: +352 46 66 44 5418 http://luxdem.uni.lu/
#include <mpi.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char* argv[]) { int rc; rc = MPI_Init(&argc, &argv); if (rc != MPI_SUCCESS) abort(); int my_rank; rc = MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); if (rc != MPI_SUCCESS) abort(); int A = 666; int B = 42; printf("[BEFORE] A = %d - B = %d\n", A, B); int tag = 2999; MPI_Comm comm = MPI_COMM_WORLD; MPI_Status status; MPI_Request req; rc = MPI_Irecv(&A, 1, MPI_INT, MPI_ANY_SOURCE, tag, comm, &req); if (rc != MPI_SUCCESS) abort(); rc = MPI_Send(&B, 1, MPI_INT, my_rank, tag, comm); if (rc != MPI_SUCCESS) abort(); rc = MPI_Wait(&req, &status); if (rc != MPI_SUCCESS) abort(); printf("[AFTER] A = %d - B = %d\n", A, B); if ( A != B ) { printf("Error!!!\n"); } rc = MPI_Finalize(); if (rc != MPI_SUCCESS) abort(); return 0; }
_______________________________________________ users mailing list users@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/users