[ET Trac] [Einstein Toolkit] #1653: ExternalLibraries/MPI missing C++ library names

Einstein Toolkit trac-noreply at einsteintoolkit.org
Mon Sep 15 10:26:54 CDT 2014


#1653: ExternalLibraries/MPI missing C++ library names
-----------------------------------+----------------------------------------
 Reporter:  barry.wardell          |       Owner:                     
     Type:  defect                 |      Status:  new                
 Priority:  major                  |   Milestone:                     
Component:  EinsteinToolkit thorn  |     Version:  development version
 Keywords:                         |  
-----------------------------------+----------------------------------------
 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.

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1653>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list