[Dune] Issue with HAVE_MPI

Benedikt Oswald benedikt.oswald at lspr.swiss
Wed May 17 14:42:49 CEST 2017


Dear Andreas & Dominic, that solved it!

Thanks a lot for your quick help and sorry

for the relatively stupid question!

Greetings and enjoy the summer day,

Benedikt



Am 17.05.17 um 13:03 schrieb Dominic Kempf:
> Yes, *every* Dune executable must do so in order to have the
> preprocessor defines gathered by the buildsystem.
>
> Dominic
>
> On Wed, May 17, 2017 at 12:31 PM, Benedikt Oswald
> <benedikt.oswald at lspr.swiss <mailto:benedikt.oswald at lspr.swiss>> wrote:
>
>     hello, thanks, I use
>
>     ################################
>     # Add MPI and ParMETIS         #
>     ################################
>     if(HAVE_MPI)
>         add_dune_mpi_flags(<executable-target>)
>         add_dune_parmetis_flags(<executable-target>)
>     endif(HAVE_MPI)
>
>
>     I assume I also must include config.h ?
>
>
>     greetings, Benedikt
>
>
>
>     Am 17.05.17 um 12:14 schrieb Benedikt Oswald:
>     > Dear Dune,
>     >
>     > I understand that HAVE_MPI needs to be defined so that the MPI
>     helper
>     > can deliver a real MPI communicator object.
>     >
>     > While using the usual DUNE macros for configuring a project, I
>     get confg.h:
>     >
>     >
>     > /* Define if you have the MPI library.  */
>     > #define HAVE_MPI ENABLE_MPI
>     >
>     >
>     > However, when compiling my code with mpicxx (dunecontrol reports
>     finding
>     > them)
>     > I obviously get an error that says that there is no MPI communicator
>     > defined.
>     >
>     > The code only compiles if I manually add -DHAVE_MPI
>     >
>     > In another Dune based project, this is not the case...I obvious
>     make a
>     > stupid
>     > mistake somewhere, but am at a loss at the cause of the problem.
>     >
>     > Would you have a suggestion ?
>     >
>     > thanks & greetings, Benedikt
>     >
>     >
>     >
>
>
>
>     _______________________________________________
>     Dune mailing list
>     Dune at dune-project.org <mailto:Dune at dune-project.org>
>     http://lists.dune-project.org/mailman/listinfo/dune
>     <http://lists.dune-project.org/mailman/listinfo/dune>
>
>

-- 
----------------------------------------------------------------------------------------------------------------------
Dr. sc. techn. Benedikt Oswald - first engineer - LSPR AG - phone +41 43 366 90 74
Grubenstrasse 9, CH-8045 Zürich, benedikt.oswald at lspr.swiss
----------------------------------------------------------------------------------------------------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 882 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20170517/65475581/attachment.sig>


More information about the Dune mailing list