OGS
MPI.h
Go to the documentation of this file.
1
11
#pragma once
12
13
namespace
BaseLib::MPI
14
{
15
16
#ifdef USE_PETSC
17
// Reduce operations for interprocess communications while using Petsc
18
static
inline
int
reduceMin
(
int
val)
19
{
20
int
result;
21
MPI_Allreduce(&val, &result, 1, MPI_INTEGER, MPI_MIN, PETSC_COMM_WORLD);
22
return
result;
23
}
24
#else
25
// Reduce operations for interprocess communications without using Petsc
26
static
inline
int
reduceMin
(
int
val)
27
{
28
return
val;
29
}
30
#endif
31
32
}
// namespace BaseLib::MPI
BaseLib::MPI
Definition
MPI.h:14
BaseLib::MPI::reduceMin
static int reduceMin(int val)
Definition
MPI.h:18
BaseLib
MPI.h
Generated by
1.12.0