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 );
215 static int sum(
int localVal);
234#ifdef HAVE_TEUCHOSCORE_KOKKOS
242 static std::vector<std::string> getArgv ();
248 static bool haveMPIState_;
249 static bool mpiIsFinalized_;
252#ifdef HAVE_TEUCHOSCORE_KOKKOS
260 static std::vector<std::string> argvCopy_;
263 static void initialize( std::ostream *out );
265 static void justInTimeInitialize();
static int sum(int localVal)
Sum a set of integers across processes.
static void abort()
abort the program
static void barrier()
Call MPI_Barrier() on MPI_COMM_WORLD.
static int getRank()
The rank of the calling process in MPI_COMM_WORLD.
GlobalMPISession(int *argc, char ***argv, std::ostream *out=&std::cout)
Calls MPI_Init() if MPI is enabled.
static int getNProc()
The number of processes in MPI_COMM_WORLD.
static bool mpiIsInitialized()
Return whether MPI was initialized.
static bool mpiIsFinalized()
Return whether MPI was already finalized.
static void allGather(int localVal, const ArrayView< int > &allVals)
Global all-to-all of a set of integers across processes.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...