10 #ifndef BELOS_GLOBAL_COMM_HPP
11 #define BELOS_GLOBAL_COMM_HPP
20 static std::mutex mpi_mutex;
21 static MPI_Comm Global_MPI_Comm = MPI_COMM_WORLD;
23 inline void initialize_global_comm(MPI_Comm comm) {
24 std::lock_guard<std::mutex> guard(mpi_mutex);
25 Global_MPI_Comm = comm;
28 inline MPI_Comm get_global_comm() {
29 std::lock_guard<std::mutex> guard(mpi_mutex);
30 return Global_MPI_Comm;
36 #endif // BELOS_GLOBAL_COMM_HPP