[Dune] Strange problem with MPI_Comm ?

Christian Engwer christian.engwer at uni-muenster.de
Fri Mar 27 13:52:38 CET 2015


On Fri, Mar 27, 2015 at 01:42:58PM +0100, Benedikt Oswald wrote:
> Hello Christian, thanks for the help!
> 
> a) in fact it was guarded by #ifdef HAVE_MPI, but better still #if ... ?

no, ifdef is plain wrong, because HAVE_MPI is defined but not
true. This is the semantics of all HAVE_* thingies. They are only true
if they are true, other weise they are either undefined or evaluate to
false.

> b) yes, it says that the MPI compilers were found
> 
> 
> -- Found Threads: TRUE 
> -- Performing Test HAVE_CXA_DEMANGLE
> -- Performing Test HAVE_CXA_DEMANGLE - Success
> -- Unable to determine MPI from MPI driver /opt/cray/craype/2.2.1/bin/cc
> -- Found MPI_C: /opt/cray/craype/2.2.1/bin/cc 
> -- Unable to determine MPI from MPI driver /opt/cray/craype/2.2.1/bin/CC
> -- Found MPI_CXX: /opt/cray/craype/2.2.1/bin/CC 
> -- Could NOT find MPI_Fortran (missing:  MPI_Fortran_LIBRARIES
> MPI_Fortran_INCLUDE_PATH)
> -- Looking for MPI_Finalized
> -- Looking for MPI_Finalized - found
> -- Performing Test MPI_VERSION_SUPPORTED
> -- Performing Test MPI_VERSION_SUPPORTED - Success
> 
> I will check if  -DENABLE_MPI=1 is included.
> 
> Shouldn't his be included automatically ?

only if you call "add_DUNE_MPI_flags(targetname)" (see below)

> > I guess the problem is that your are circumventing the dune MPI
> > infrastructure and directly using the MPI compiler. Somehow the DUNE
> > system doesn't know that you yre using MPI... Did you add the MPI
> > flags in your CMakeLists.txt using "add_DUNE_MPI_flags(targetname)"?


Christian




More information about the Dune mailing list