69 static Time&
localTimer() {
static RCP<Time> t = TimeMonitor::getNewTimer(
"a function that is not called on all procs");
return *t;}
88 int main(
int argc,
char* argv[])
96 MPI_Init(&argc, &argv);
97 MPI_Comm_rank( MPI_COMM_WORLD, &procRank );
101 if (argc>1)
if (argv[1][0]==
'-' && argv[1][1]==
'v') verbose =
true;
103 if (verbose && procRank==0)
108 for (
int i=0; i<100; i++)
116 for (
int i = 0; i < 100; ++i) {
121 for (
int i = 0; i < 100; ++i) {
131 for (
int i = 0; i < 100; ++i) {
139 for (
int i = 0; i < 100; ++i) {
145 catch (std::exception& e) {
148 if (verbose && procRank==0) {
149 std::cerr <<
"Caught std::exception [expected]: " << e.what() << std::endl;
156 TimeMonitor::format ().setRowsBetweenLines (3);
158 TimeMonitor::summarize ();
166 if (FailedTests != 0) {
167 std::cout <<
"End Result: TEST FAILED" << std::endl;
171 std::cout <<
"End Result: TEST PASSED" << std::endl;
184 for (
int i=0; i<10000; i++)
187 "throw an std::exception");
203 return std::log(as<double>(x)) +
factFunc(x-1);
214 for (
int i=0; i<10000; i++)
218 "throw an std::exception");
233 for (
int i=0; i<10000; i++)
250 for (
int i=0; i<10000; i++)
267 for (
int i=0; i<10000; i++)
284 for (
int i=0; i<10000; i++)