#include <Teuchos_GlobalMPISession.hpp>
Public Member Functions | |
Public constructor and destructor | |
| GlobalMPISession (int *argc, char ***argv, std::ostream *out=&std::cout) | |
Calls MPI_Init() if MPI is enabled. | |
| ~GlobalMPISession () | |
Calls MPI_Finalize() if MPI is enabled. | |
Static Public Member Functions | |
Static functions | |
| bool | mpiIsInitialized () |
| bool | mpiIsFinalized () |
| int | getRank () |
Returns the process rank relative to MPI_COMM_WORLD. | |
| int | getNProc () |
Returns the number of processors relative to MPI_COMM_WORLD. | |
This class is primarilly designed to insulate basic main() program type of code from having to know if MPI is enabled or not.
ToDo: Give examples!
CommandLineProcessor/cxx_main.cpp, FancyOutputting_test.cpp, and test/RefCountPtr/cxx_main.cpp.
Definition at line 52 of file Teuchos_GlobalMPISession.hpp.
|
||||||||||||||||
|
Calls
--teuchos-suppress-startup-banner is found, the this option will be removed from argv[] before being passed to MPI_Init(...) and the startup output message to *out will be suppressed.
Warning! This constructor can only be called once per executable or an error is printed to Definition at line 39 of file Teuchos_GlobalMPISession.cpp. |
|
|
Calls
Definition at line 100 of file Teuchos_GlobalMPISession.cpp. |
|
|
Return if MPI is initialized or not. Definition at line 114 of file Teuchos_GlobalMPISession.cpp. |
|
|
Return if MPI has already been finalized. Definition at line 120 of file Teuchos_GlobalMPISession.cpp. |
|
|
Returns the process rank relative to
Returns
Note, this function can be called even if the above constructor was never called so it is safe to use no matter how
Definition at line 125 of file Teuchos_GlobalMPISession.cpp. |
|
|
Returns the number of processors relative to
Returns
Note, this function can be called even if the above constructor was never called so it is safe to use no matter how
Definition at line 132 of file Teuchos_GlobalMPISession.cpp. |
1.3.9.1