8 #include <Epetra_config.h> 30 if (comm.
MyPID () == 0) {
37 main (
int argc,
char *argv[])
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;
int main(int argc, char *argv[])
void exampleRoutine(const Epetra_Comm &comm, std::ostream &out)
std::string Epetra_Version()
virtual int MyPID() const =0
Return my process ID.
int NumProc() const
Returns total number of processes (always returns 1 for SerialComm).
Epetra_Comm: The Epetra Communication Abstract Base Class.
Epetra_SerialComm: The Epetra Serial Communication Class.
int MyPID() const
Return my process ID.