diff --git a/include/ADIOS.h b/include/ADIOS.h index 8bdca9c200ae057ef3af2c8e931dd92e0e7d7b82..5d5af9dc0e3541962cad962211f241015dd48512 100644 --- a/include/ADIOS.h +++ b/include/ADIOS.h @@ -21,11 +21,7 @@ #include <vector> /// \endcond -#ifdef ADIOS_NOMPI -#include "mpidummy.h" -#else -#include <mpi.h> -#endif +#include "ADIOS_MPI.h" #include "ADIOSTypes.h" #include "core/Method.h" diff --git a/include/ADIOS_C.h b/include/ADIOS_C.h index 11d019f6778f3d68f3b4b07d702a8fb48b661372..53f96070e23a352a20e8d923f819c72b1f5fffb2 100644 --- a/include/ADIOS_C.h +++ b/include/ADIOS_C.h @@ -11,11 +11,7 @@ #ifndef ADIOS_C_H_ #define ADIOS_C_H_ -#ifdef ADIOS_NOMPI -#define MPI_Comm int -#else -#include <mpi.h> -#endif +#include "ADIOS_MPI.h" typedef void ADIOS; typedef void Method; diff --git a/include/ADIOS_MPI.h b/include/ADIOS_MPI.h new file mode 100644 index 0000000000000000000000000000000000000000..9948a863609301b0b96ec38357fe0d6894d860fe --- /dev/null +++ b/include/ADIOS_MPI.h @@ -0,0 +1,17 @@ +/* + * Distributed under the OSI-approved Apache License, Version 2.0. See + * accompanying file Copyright.txt for details. + */ + +#ifndef ADIOS_MPI_H_ +#define ADIOS_MPI_H_ + +#ifdef ADIOS_NOMPI +#include "mpidummy.h" +#else +#define OMPI_SKIP_MPICXX 1 // workaround for OpenMPI forcing C++ bindings +#include <mpi.h> +#undef OMPI_SKIP_MPICXX +#endif + +#endif /* ADIOS_MPI_H_ */ diff --git a/include/core/Engine.h b/include/core/Engine.h index 662cc1cbff3734ceb80e197eae2fd603eaff4a06..26a5fa03414bae38191549e5d06fd11714e6c190 100644 --- a/include/core/Engine.h +++ b/include/core/Engine.h @@ -20,11 +20,7 @@ #include <vector> /// \endcond -#ifdef ADIOS_NOMPI -#include "mpidummy.h" -#else -#include <mpi.h> -#endif +#include "ADIOS_MPI.h" #include "ADIOS.h" #include "ADIOSTypes.h" diff --git a/include/core/Transport.h b/include/core/Transport.h index 127535e65f39354dfd8985e200e35b04f0682acf..8b768825a2a5a28688540a5ed581de4d58b21783 100644 --- a/include/core/Transport.h +++ b/include/core/Transport.h @@ -16,11 +16,7 @@ #include <vector> /// \endcond -#ifdef ADIOS_NOMPI -#include "mpidummy.h" -#else -#include <mpi.h> -#endif +#include "ADIOS_MPI.h" #include "core/Profiler.h" diff --git a/include/format/BP1.h b/include/format/BP1.h index 8631099a89acb6ffc308190885a96ed2064ff8e8..fd2e16a4a3bb872631d0053baea7cba40ca7c29f 100644 --- a/include/format/BP1.h +++ b/include/format/BP1.h @@ -19,11 +19,7 @@ //#include <queue> //std::priority_queue to be added later /// \endcond -#if ADIOS_NOMPI -#include "mpidummy.h" -#else -#include <mpi.h> -#endif +#include "ADIOS_MPI.h" #include "core/Profiler.h" #include "core/Transport.h" diff --git a/include/format/BP1Aggregator.h b/include/format/BP1Aggregator.h index be2d897a44397a1a6dda3d21f76df4a59745dbb8..a8cf13372fd7b105b0d59967498af1589fd55c18 100644 --- a/include/format/BP1Aggregator.h +++ b/include/format/BP1Aggregator.h @@ -11,11 +11,7 @@ #ifndef BP1AGGREGATOR_H_ #define BP1AGGREGATOR_H_ -#ifdef ADIOS_NOMPI -#include "mpidummy.h" -#else -#include <mpi.h> -#endif +#include "ADIOS_MPI.h" namespace adios { diff --git a/include/functions/adiosFunctions.h b/include/functions/adiosFunctions.h index c651b6a32c22867f32334a8635d0c674715b35a1..ab6edba1df018dfd6a17d5b740a6fabcdf8574b1 100644 --- a/include/functions/adiosFunctions.h +++ b/include/functions/adiosFunctions.h @@ -19,11 +19,7 @@ #include <vector> /// \endcond -#ifdef ADIOS_NOMPI -#include "mpidummy.h" -#else -#include <mpi.h> -#endif +#include "ADIOS_MPI.h" #include "core/Transform.h" diff --git a/include/mpidummy.h b/include/mpidummy.h index 5e9035ab453a2cc976037e390ba06e01a9ed43e6..65b380f5cd4a229e87ddffad8bb24c806bf452a6 100644 --- a/include/mpidummy.h +++ b/include/mpidummy.h @@ -1,11 +1,6 @@ /* * Distributed under the OSI-approved Apache License, Version 2.0. See * accompanying file Copyright.txt for details. - * - * ADIOS is freely available under the terms of the BSD license described - * in the COPYING file in the top level directory of this source distribution. - * - * Copyright (c) 2008 - 2009. UT-BATTELLE, LLC. All rights reserved. */ #ifndef __MPI_DUMMY_H__