COMP: guards around #define OMPI_SKIP_MPICXX (avoids compiler warnings)

This commit is contained in:
Mark Olesen
2023-06-23 14:02:21 +02:00
parent 2afd2320ce
commit 642d8a9dfa
12 changed files with 95 additions and 7 deletions

View File

@ -27,6 +27,14 @@ License
#include "dummyLib.H"
#include <iostream>
// Include MPI without any C++ bindings
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#include <mpi.h>
// * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * * //

View File

@ -40,6 +40,14 @@ Description
#include "IOstreams.H"
#include "PstreamReduceOps.H"
#include "SHA1.H"
// Include MPI without any C++ bindings
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#include <mpi.h>
using namespace Foam;

View File

@ -40,10 +40,19 @@ Description
#include "IOstreams.H"
#include "StringStream.H"
#include "Random.H"
// Include MPI without any C++ bindings
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#include <mpi.h>
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void printRequests(const UList<MPI_Request>& requests)
{

View File

@ -38,10 +38,17 @@ Description
#include "vector.H"
#include "IOstreams.H"
#include "Pstream.H"
#include <mpi.h>
#include <iostream>
// Include MPI without any C++ bindings
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#include <mpi.h>
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -33,6 +33,14 @@ Description
#include "polyMesh.H"
#include "globalMeshData.H"
#include "OFstream.H"
// Include MPI without any C++ bindings
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#include <mpi.h>
using namespace Foam;

View File

@ -41,6 +41,14 @@ SourceFiles
#include "DynamicList.H"
#include "UPstream.H" // for UPstream::Request
// Include MPI without any C++ bindings
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#include <mpi.h>
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -39,6 +39,14 @@ SourceFiles
#define Foam_UPstreamWrapping_H
#include "UPstream.H"
// Include MPI without any C++ bindings
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#include <mpi.h>
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -29,13 +29,20 @@ License
#include "addToRunTimeSelectionTable.H"
#include "Time.H"
#include "PrecisionAdaptor.H"
#include <map>
#include <string>
#include <vector>
// Probably not needed, but in case we pickup parhip_interface.h
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#include "kaHIP_interface.h"
#include <string>
#include <map>
#include <vector>
// Provide a clear error message if we have a severe size mismatch
// Allow widening, but not narrowing

View File

@ -32,8 +32,12 @@ License
#include "PrecisionAdaptor.H"
// Probably not needed...
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#include "metis.h"

View File

@ -32,12 +32,20 @@ License
#include "Time.H"
#include "PrecisionAdaptor.H"
#include "OFstream.H"
#include <cstdio>
#include <limits>
// Include MPI without any C++ bindings
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
// Avoid too many warnings from mpi.h
#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <cstdio>
#include <mpi.h>
#include "ptscotch.h"

View File

@ -32,11 +32,16 @@ License
#include "Time.H"
#include "PrecisionAdaptor.H"
#include "OFstream.H"
#include <cstdio>
#include <limits>
// Probably not needed, but in case we pickup a ptscotch.h ...
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#include "scotch.h"

View File

@ -59,6 +59,14 @@ SourceFiles
#include "globalIndex.H"
#include "uint.H"
// Include MPI without any C++ bindings
#ifndef MPICH_SKIP_MPICXX
#define MPICH_SKIP_MPICXX
#endif
#ifndef OMPI_SKIP_MPICXX
#define OMPI_SKIP_MPICXX
#endif
#pragma GCC diagnostic ignored "-Wold-style-cast"
#include "zoltan.h"
#include <mpi.h>