[ET Trac] [Einstein Toolkit] #1308: MPI: use library list provided by mpic++ instead of guessing (wrong)

Einstein Toolkit trac-noreply at einsteintoolkit.org
Sat Apr 6 23:01:12 CDT 2013

#1308: MPI: use library list provided by mpic++ instead of guessing (wrong)
 Reporter:  knarf                  |       Owner:                     
     Type:  defect                 |      Status:  new                
 Priority:  major                  |   Milestone:  ET_2013_05         
Component:  EinsteinToolkit thorn  |     Version:  development version
 Keywords:                         |  
 At the moment, ExternalLibraries/MPI guesses that the library list for
 openmpi is just 'mpi mpi_cxx'. This is wrong in my case (even for the
 built library; I need additional libraries. The OpenMPI FAQ mentions this:
 "NOTE: It is absolutely not sufficient to simply add "-lmpi" to your link
 line and assume that you will obtain a valid Open MPI executable."

 They do recommend to use the compiler wrappers. I didn't try that, leaving
 a patch to a minimum. I would also not be sure how to replace to actual
 compilers using a thorn while it is supposedly being compiled - after the
 Cactus configure state (cannot do it before since the wrappers might not
 be build yet). Thus, I go the second way - also shown in the FAQ: I use
 mpic++ to get hold of the flags that are needed when linking against the
 library. This is very similar to what happens for some of the other
 ExternalLibraries as well (but a bit simpler since they also provide
 options to just get a list of the libraries, not including the flags
 themselves - which is what Cactus expects).

 In my case, this uses the libraries 'mpi_cxx mpi nsl util m m nsl util m
 dl openmp'. Especially the missing 'util' in the current list prevented me
 from linking. Adding it hard to the list however might be wrong on systems
 where this is not needed or that library might not even exist. (and this
 isn't the only missing library)

 I would like this to be included in the next release, as this would
 otherwise prevent people from building on at least some of the major Linux
 distros out of the box (Debian wheezy here) - or we would have to specify
 the library list by hand for these systems. Given the central part MPI
 plays I set this to 'major'. If we see problems with this approach we can
 still guess the missing libraries and try that, until after the release.

 OpenMPI FAQ: http://www.open-mpi.org/faq/?category=mpi-apps

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

More information about the Trac mailing list