48 int main(
int argc,
char* argv[])
52 GlobalMPISession mpiSession(&argc,&argv);
55 int terminate_on_procid = 0;
56 clp.
setOption(
"terminate-on-procid", &terminate_on_procid);
57 (void)clp.
parse(argc, argv);
60 GlobalMPISession::getRank() == terminate_on_procid,
61 "Bingo, we are terminating on procid == "
62 "terminate_on_procid = "<<GlobalMPISession::getRank()<<
"!"
Initialize, finalize, and query the global MPI session.
void setOption(const char option_true[], const char option_false[], bool *option_val, const char documentation[]=NULL)
Set a boolean option.
EParseCommandLineReturn parse(int argc, char *argv[], std::ostream *errout=&std::cerr) const
Parse a command line.
int main(int argc, char *argv[])
A MPI utilities class, providing methods for initializing, finalizing, and querying the global MPI se...
Basic command line parser for input from (argc,argv[])
#define TEUCHOS_TEST_FOR_TERMINATION(terminate_test, msg)
This macro is to be used instead of TEUCHOS_TEST_FOR_EXCEPTION() to report an error in situations whe...
Standard test and throw macros.
Class that helps parse command line input arguments from (argc,argv[]) and set options.