10 #ifndef TEUCHOS_GLOBAL_MPI_SESSION_HPP
11 #define TEUCHOS_GLOBAL_MPI_SESSION_HPP
18 #include "TeuchosCore_ConfigDefs.hpp"
20 #include "Teuchos_ArrayView.hpp"
130 GlobalMPISession(
int* argc,
char*** argv, std::ostream *out = &std::cout );
156 static bool mpiIsInitialized();
163 static bool mpiIsFinalized();
175 static int getRank();
187 static int getNProc();
197 static void barrier();
215 static int sum(
int localVal);
232 static void allGather(
int localVal,
const ArrayView<int> &allVals);
234 #ifdef HAVE_TEUCHOSCORE_KOKKOS
235 static std::vector<std::string> getArgv ();
243 #endif // HAVE_TEUCHOSCORE_KOKKOS
248 static bool haveMPIState_;
249 static bool mpiIsFinalized_;
252 #ifdef HAVE_TEUCHOSCORE_KOKKOS
253 static std::vector<std::string> argvCopy_;
261 #endif // HAVE_TEUCHOSCORE_KOKKOS
263 static void initialize( std::ostream *out );
265 static void justInTimeInitialize();
271 #endif // TEUCHOS_GLOBAL_MPI_SESSION_HPP
Initialize, finalize, and query the global MPI session.