Steps to reproduce problem: """ $ cat > test.cc<<EOF #include <thread> #include <mpi.h> void thread_mpi() { int mpi_threads_provided; MPI_Init_thread(nullptr, nullptr, MPI_THREAD_SINGLE, &mpi_threads_provided); MPI_Finalize(); } int main() { std::thread thread = std::thread(thread_mpi); thread.join(); return 0; } EOF $ module load mpi/openmpi-x86_64 g++ $(pkg-config ompi-cxx --cflags) $(pkg-config ompi-cxx --libs) test.cc -o test """ User has a python environment, and above is a reduced reproducer. There are some workarounds, but still the problem should be fixed in mpi. The crash happens in /lib64/libpmix.so.2 User is not using environemt-modules, but if using, one workaround is to explicitly link with pmix, for example: """ # dnf install -y pmix-devel $ g++ $(pkg-config ompi-cxx --cflags) $(pkg-config ompi-cxx --libs) $(pkg-config --libs pmix) test.cc -o test """ Because user is using python scripts, the workaround was a suggestion to load some pmix python module, what appears to have worked, but again, this appears to be just hidding a problem. A non tested workaround is that it might work with this pseudo-patch: """ -int pmix_tsd_keys_destruct() +__attribute__((destructor)) int pmix_tsd_keys_destruct() """ in pmix_source/src/threads/thread.c but not guaranteed, as the dependency chain leading to loading the pmix library is complex.
Is it rhel8 specific issue? Can we reproduce it with upstream code?
The issue does not happen in recent Fedora. It is rhel8 specific, using rhel8 supported packages, as far as we could test.
Hello Team, Is there any update regarding the bug. Thanks in advance