- removed comment
ExternalLibraries/MPI missing C++ library names
The MPI thorn currently uses mpicc to automatically detect the list of libraries to link against. On my machine this causes '-lmpi' to be added to the list of libraries to link. This is wrong in cases where thorns use C++. In that case, '-lmpi_cxx' should also be included.
I have tested this using a simple hello world MPI program (code [http://mpitutorial.com/mpi-hello-world/ here]). When I compile this with gcc and '-lmpi' it works fine, but if I compile with g++ I also need to include '-lmpi_cxx'. This is on Mac OS X 10.9 with OpenMPI installed by Homebrew, but I would imagine it could also affect other systems.
A simple fix in my case is to replace mpicc with mpic++ in the configure.pl of the MPI thorn. In that case, both libraries are correctly included and I can compile Cactus without any problems.
Keyword:
Comments (6)
-
-
- removed comment
Fix attached.
-
- changed status to open
- removed comment
Looks good.
-
- changed status to open
- removed comment
-
- changed status to resolved
- removed comment
committed to revision 47 of https://svn.cactuscode.org/projects/ExternalLibraries/MPI/trunk
-
- edited description
- changed status to closed
- Log in to comment
I can confirm the problem, and that the proposed change fixes it. I think it should also be save to assume that C++ can be allowed to be required.