[Dune] Strange problem with MPI_Comm ?

Benedikt Oswald benedikt.oswald at lspr.ch
Fri Mar 27 13:42:58 CET 2015


Hello Christian, thanks for the help!

a) in fact it was guarded by #ifdef HAVE_MPI, but better still #if ... ?

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 ?

Greetings, Benedikt


Am 27/03/15 um 12:01 schrieb Christian Engwer:
> Hi Benedikt,
>
> a) this seems to be a bit of an error in the code, at least I'd expect
>    it to work with and without MPI
>
>> /scratch/daint/boswald/gitwork/hades/communicationinterface/globaluniqueindex.hh:101:58:
>> error: 'MPI_Comm' was not declared in this scope
>>   typedef typename Dune::template CollectiveCommunication<MPI_Comm>
>> Collective;
>    you should guard this by an '#if HAVE_MPI'
>
> b) why doesn't it find MPI?...
>    - what does your cmake tell you? does it say MPI found?
>    - your MPI_DUNE_* flags are empty!?
>    - your compile command does nto include -DENABLE_MPI=1
>>> /opt/cray/craype/2.2.1/bin/CC   -DENABLE_BOOST -DHAVE_CONFIG_H -Wall
>>> -O2
>>> -I/users/boswald/extlib/superludist/3.3/cray-mpich/7.1.1/gcc/4.9.2/SRC
>>> -std=c++11  -I/scratch/daint/boswald/gitwork/hades/build-cmake
>>> -I/scratch/daint/boswald/gitwork/hades
>>> -I/scratch/daint/boswald/gitwork/dune-common
>>> -I/scratch/daint/boswald/gitwork/dune-geometry
>>> -I/scratch/daint/boswald/gitwork/dune-grid
>>> -I/scratch/daint/boswald/gitwork/dune-alugrid
>>> -I/scratch/daint/boswald/gitwork/dune-localfunctions
>>> -I/scratch/daint/boswald/gitwork/dune-istl
>>> -I/users/boswald/extlib/boost/1.57.0/gcc/4.9.2/include   
>>> -DHAVE_SUPERLU_DIST -DCMAKE_SYSTEM_NAME=Linux -o
> 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
>
>

-- 
------------------------------------------------------------------------------------------------
Dr. sc. techn. Benedikt Oswald - first engineer - LSPR AG - phone - +41 43 366 90 74
Technoparkstrasse 1, CH-8005 Zürich, benedikt.oswald at lspr.ch - labor vincit omnia improbus
------------------------------------------------------------------------------------------------






More information about the Dune mailing list