00001
00002
00003
00004
00005 #ifndef PLAYA_MPISESSION_H
00006 #define PLAYA_MPISESSION_H
00007
00008
00009
00010
00011
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 {
00021
00022
00023
00024
00025 class MPISession
00026 {
00027 public:
00028
00029 static void init(int* argc, void*** argv);
00030
00031
00032 static void init(int* argc, char*** argv);
00033
00034
00035 static int getRank() {return rank_;}
00036
00037
00038 static int getNProc() {return nProc_;}
00039
00040
00041 static void finalize();
00042
00043
00044
00045 static bool& showStartupMessage() {static bool rtn=false; return rtn;}
00046
00047 private:
00048 static int rank_;
00049 static int nProc_;
00050
00051
00052 MPISession(int* argc, char*** argv);
00053
00054 public:
00055
00056 ~MPISession();
00057 };
00058 }
00059
00060 #endif