Skip to content

Commit b27e086

Browse files
noelchalmerspbauman
andcommitted
[Hotfix] Use inline static const to workaround OpenMPI when compiling with g++-12
Co-authored-by: Paul T. Bauman <ptbauman@gmail.com>
1 parent 62efa57 commit b27e086

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

include/comm.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ namespace Comm {
7272

7373
/*Predefined ops*/
7474
using op_t = MPI_Op;
75-
static constexpr op_t Max = MPI_MAX;
76-
static constexpr op_t Min = MPI_MIN;
77-
static constexpr op_t Sum = MPI_SUM;
78-
static constexpr op_t Prod = MPI_PROD;
79-
static constexpr op_t And = MPI_LAND;
80-
static constexpr op_t Or = MPI_LOR;
81-
static constexpr op_t Xor = MPI_LXOR;
75+
inline static const op_t Max = MPI_MAX;
76+
inline static const op_t Min = MPI_MIN;
77+
inline static const op_t Sum = MPI_SUM;
78+
inline static const op_t Prod = MPI_PROD;
79+
inline static const op_t And = MPI_LAND;
80+
inline static const op_t Or = MPI_LOR;
81+
inline static const op_t Xor = MPI_LXOR;
8282

8383
/*MPI_Init and MPI_Finalize*/
8484
void Init(int &argc, char** &argv);

0 commit comments

Comments
 (0)