Skip to content

Commit

Permalink
Merge pull request #631 from tjhei/mpi-no-cxx-mpich
Browse files Browse the repository at this point in the history
MPI: exclude mpich cxx wrappers
  • Loading branch information
gassmoeller authored Feb 16, 2024
2 parents a733f7d + 5582bc9 commit f212234
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/gwb-dat/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include "world_builder/world.h"

#ifdef WB_WITH_MPI
// we don't need the c++ MPI wrappers
#define OMPI_SKIP_MPICXX 1
#define MPICH_SKIP_MPICXX
#include <mpi.h>
#endif

Expand Down
3 changes: 3 additions & 0 deletions source/gwb-grid/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
#undef min

#ifdef WB_WITH_MPI
// we don't need the c++ MPI wrappers
#define OMPI_SKIP_MPICXX 1
#define MPICH_SKIP_MPICXX
#include <mpi.h>
#endif

Expand Down
2 changes: 2 additions & 0 deletions source/world_builder/utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
#include <sstream>

#ifdef WB_WITH_MPI
// we don't need the c++ MPI wrappers
#define OMPI_SKIP_MPICXX 1
#define MPICH_SKIP_MPICXX
#include <mpi.h>
#endif

Expand Down
2 changes: 2 additions & 0 deletions source/world_builder/world.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
#include <world_builder/objects/distance_from_surface.h>

#ifdef WB_WITH_MPI
// we don't need the c++ MPI wrappers
#define OMPI_SKIP_MPICXX 1
#define MPICH_SKIP_MPICXX
#include <mpi.h>
#endif

Expand Down
4 changes: 4 additions & 0 deletions tests/CPP_MPI/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#include "world_builder/world.h"

#include <stdio.h>

// we don't need the c++ MPI wrappers
#define OMPI_SKIP_MPICXX 1
#define MPICH_SKIP_MPICXX
#include <mpi.h>

int main(int argc, char *argv[]) {
Expand Down
4 changes: 4 additions & 0 deletions tests/CPP_MPI/test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#include <stdio.h>

// we don't need the c++ MPI wrappers
#define OMPI_SKIP_MPICXX 1
#define MPICH_SKIP_MPICXX
#include <mpi.h>

int main(int argc, char *argv[]) {
Expand Down

0 comments on commit f212234

Please sign in to comment.