8#include <Epetra_config.h>
30 if (comm.
MyPID () == 0) {
58 const int myRank = comm.
MyPID ();
59 const int numProcs = comm.
NumProc ();
63 std::ostringstream err;
64 err <<
"This is a serial (non-MPI) example, but the number of processes "
65 <<
"in the Epetra_Comm is " << numProcs <<
" != 1. Please report "
67 throw std::logic_error (err.str ());
70 std::ostringstream err;
71 err <<
"This is a serial (non-MPI) example, but the rank of the calling "
72 "process in the Epetra_Comm is " << myRank <<
" != 0. Please report "
74 throw std::logic_error (err.str ());
82 cout <<
"End Result: TEST PASSED" << endl;
std::string Epetra_Version()
Epetra_Comm: The Epetra Communication Abstract Base Class.
virtual int MyPID() const =0
Return my process ID.
Epetra_SerialComm: The Epetra Serial Communication Class.
int MyPID() const
Return my process ID.
int NumProc() const
Returns total number of processes (always returns 1 for SerialComm).
void exampleRoutine(const Epetra_Comm &comm, std::ostream &out)