[Dune] Should we use #ifdef HAVE_MPI in parallel GMSH Reader

Christian Engwer christian.engwer at uni-muenster.de
Fri Nov 28 09:31:34 CET 2014


Hi Markus, hi Aleksejs,

> Do not use #ifdef HAVE_MPI, but #if HAVE_MPI. We are using a trick to
> enable MPI only if the compilation flags include our MPI flags. To
> accomplish this HAVE_MPI will always be defined if your system
> provides even DUNE does not activate it.

while this is true as a generral advice, I suggest not to check
HAVE_MPI at all. Aleksejs said he uses only the the DUNE MPI
infrastructure. Thus it should be sufficient to use it always. In any
case you should try to avoid '#if' statements where possible.

Christian




More information about the Dune mailing list