mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-14 10:08:32 +05:00
Utility function to check if MPI was loaded
This commit is contained in:
parent
a80ae826c6
commit
a018931437
@ -24,6 +24,7 @@ namespace py = pybind11;
|
|||||||
|
|
||||||
namespace ngcore {
|
namespace ngcore {
|
||||||
|
|
||||||
|
NGCORE_API bool MPI_Loaded();
|
||||||
NGCORE_API void InitMPI(
|
NGCORE_API void InitMPI(
|
||||||
std::optional<std::filesystem::path> mpi_lib_path = std::nullopt);
|
std::optional<std::filesystem::path> mpi_lib_path = std::nullopt);
|
||||||
|
|
||||||
|
@ -28,6 +28,10 @@ struct MPIFinalizer {
|
|||||||
}
|
}
|
||||||
} mpi_finalizer;
|
} mpi_finalizer;
|
||||||
|
|
||||||
|
bool MPI_Loaded() {
|
||||||
|
return ng_mpi_lib != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
void InitMPI(std::optional<std::filesystem::path> mpi_lib_path) {
|
void InitMPI(std::optional<std::filesystem::path> mpi_lib_path) {
|
||||||
if (ng_mpi_lib) return;
|
if (ng_mpi_lib) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user