PlayaMPISession.hpp
00001
00002
00003
00004
00005 #ifndef PLAYA_MPISESSION_H
00006 #define PLAYA_MPISESSION_H
00007
00012 #include "PlayaDefs.hpp"
00013 #include "Teuchos_GlobalMPISession.hpp"
00014
00015 #ifdef HAVE_MPI
00016 #include "mpi.h"
00017 #endif
00018
00019 namespace Playa
00020 {
00025 class MPISession
00026 {
00027 public:
00029 static void init(int* argc, void*** argv);
00030
00032 static void init(int* argc, char*** argv);
00033
00035 static int getRank() {return rank_;}
00036
00038 static int getNProc() {return nProc_;}
00039
00041 static void finalize();
00042
00045 static bool& showStartupMessage() {static bool rtn=false; return rtn;}
00046
00047 private:
00048 static int rank_;
00049 static int nProc_;
00050
00052 MPISession(int* argc, char*** argv);
00053
00054 public:
00056 ~MPISession();
00057 };
00058 }
00059
00060 #endif