dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #25814
MPI wrapper problems
I've run into a problem with the configuration of the MPI wrappers,
which has been waiting to happen. We even have a comment in
CMakeLists.text
# FIXME: Should be set CMake to use the MPI compiler wrappers?
The problem is that FindMPI.cmake can't handle the intricacies of MPI
wrappers by just parsing the output of 'mpicc -show'. The immediate
issue is that the Intel MPI wrappers take flags that lead to different
library choices (e.g. serial or thread MPI). With the present build
system, we can't launch threads from MPI processes with Intel MPI.
The simple and robust fix is that a user specifies their compiler via
the environment variable CC, CXX, etc or uses
-D CMAKE_C_COMPILER=mpicc -D CMAKE_CXX_COMPILER=mpicxx
This is the Trilinos approach. For builds of non-MPI code, nothing
special would be needed.
Other approaches are not advocated by the developers of various
package. MPI devs advice against not using the wrappers (we don't use
them, hence our problem) and CMake advises against changing the
compiler inside CMakeLists.txt files (the above two approaches are
advovated).
Opinions?
Garth