42 #ifndef TEUCHOS_GLOBAL_MPI_SESSION_HPP
43 #define TEUCHOS_GLOBAL_MPI_SESSION_HPP
50 #include "TeuchosCore_ConfigDefs.hpp"
52 #include "Teuchos_ArrayView.hpp"
162 GlobalMPISession(
int* argc,
char*** argv, std::ostream *out = &std::cout );
188 static bool mpiIsInitialized();
195 static bool mpiIsFinalized();
207 static int getRank();
219 static int getNProc();
229 static void barrier();
247 static int sum(
int localVal);
264 static void allGather(
int localVal,
const ArrayView<int> &allVals);
266 #ifdef HAVE_TEUCHOSCORE_KOKKOSCORE
267 static std::vector<std::string> getArgv ();
275 #endif // HAVE_TEUCHOSCORE_KOKKOSCORE
280 static bool haveMPIState_;
281 static bool mpiIsFinalized_;
284 #ifdef HAVE_TEUCHOSCORE_KOKKOSCORE
285 static std::vector<std::string> argvCopy_;
293 #endif // HAVE_TEUCHOSCORE_KOKKOSCORE
295 static void initialize( std::ostream *out );
297 static void justInTimeInitialize();
303 #endif // TEUCHOS_GLOBAL_MPI_SESSION_HPP
Initialize, finalize, and query the global MPI session.