On Jun 22, 2018, at 4:09 PM, lille stor <lille.s...@gmx.com> wrote: > > I tried compile the C++ program using "mpic++" like you suggested but > unfortunately g++ still throws the same errror > ("/home/dummy/openmpi/build/lib/libopen-pal.so.20: undefined reference to > pthread_atfork"). > > I suspect that the problem maybe to the fact that the C++ program does not > use directly Open MPI library but through another library (hence the > parameter "-Wl,-rpath-link,/home/dummy/openmpi/build/lib" when compiling it), > therefore one cannot pass the usual parameters > "-L/home/dummy/openmpi/build/lib -lmpi" to g++. To summarize the dependency > flow: program -> library -> Open MPI library.
If your program uses mpic++ instead of g++, then mpic++ should add all the relevant parameters to compile an Open MPI program (including, if necessary, -pthread or -lpthread). What does "mpic++ --showme" show? Can you compile a simple C or C++ MPI program manually? (using mpicc / mpic++, without going through the secondary program) -- Jeff Squyres jsquy...@cisco.com _______________________________________________ devel mailing list email@example.com https://lists.open-mpi.org/mailman/listinfo/devel