1
1
openmpi/ompi/mpi
Jeff Squyres 67ba8da76f ompi_mpi_init: fix race condition
There was a race condition in 35438ae9b5: if multiple threads invoked
ompi_mpi_init() simultaneously (which could happen from both MPI and
OSHMEM), the code did not catch this condition -- Bad Things would
happen.

Now use an atomic cmp/set to ensure that only one thread is able to
advance ompi_mpi_init from NOT_INITIALIZED to INIT_STARTED.

Additionally, change the prototype of ompi_mpi_init() so that
oshmem_init() can safely invoke ompi_mpi_init() multiple times (as
long as MPI_FINALIZE has not started) without displaying an error.  If
multiple threads invoke oshmem_init() simultaneously, one of them will
actually do the initialization, and the rest will loop waiting for it
to complete.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
2018-06-05 18:09:13 -07:00
..
c ompi_mpi_init: fix race condition 2018-06-05 18:09:13 -07:00
cxx mpi: make C++ bindings compile when MPI-1 compat is disabled 2018-05-31 09:44:19 -06:00
fortran fortran/mpif-h: fix MPI1 compatibility Makefile 2018-06-01 09:52:22 +09:00
java java: do not use MPI1 deprecated subroutines 2018-06-04 10:49:52 +09:00
man Remove brackets for ndims for c++ doc of Cart_create 2018-05-01 12:00:55 +02:00
tool mpi/finalized: revamp INITIALIZED/FINALIZED 2018-06-01 13:36:29 -07:00
help-mpi-api.txt Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00
Makefile.am Revert "Update to sync with OMPI master and cleanup to build" 2016-11-22 15:03:20 -08:00