Loading...
Searching...
No Matches
MpiThreading.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) gpridge developers
3#pragma once
4
5#if defined(GPR_HAVE_MPI) || defined(GPR_LINALG_SCALAPACK)
6#include <mpi.h>
7
8namespace gpr::linalg {
9
11inline constexpr int requiredMpiThreadSupport() noexcept
12{
13#ifdef GPR_LINALG_SLATE
14 return MPI_THREAD_MULTIPLE;
15#else
16 return MPI_THREAD_FUNNELED;
17#endif
18}
19
20inline constexpr const char* mpiThreadSupportError() noexcept
21{
22#ifdef GPR_LINALG_SLATE
23 return "SLATE requires MPI_THREAD_MULTIPLE thread support";
24#else
25 return "distributed execution requires MPI_THREAD_FUNNELED thread support";
26#endif
27}
28
29} // namespace gpr::linalg
30#endif
Dense and structured linear algebra behind the GP: Cholesky and eigen solvers, linear operators,...