Description: This example simulates MOAB's enhanced error handling in parallel.
All of the errors are contrived, used for simulation purpose only.
Note: We do not need a moab instance for this example
To run: mpiexec -np 4 ./ErrorHandlingSimulation <test_case_num(1 to 4)>
#ifdef MOAB_HAVE_MPI
#endif
#include <iostream>
#include <cstdlib>
using namespace std;
{
switch( test_case_num )
{
case 1:
break;
case 2:
break;
case 3:
if( 0 != rank )
break;
case 4:
if( 1 == rank )
break;
default:
break;
}
}
{
}
{
}
int main(
int argc,
char** argv )
{
if( argc < 2 )
{
cout << "Usage: " << argv[0] << " <test_case_num(1 to 4)>" << endl;
return 0;
}
#ifdef MOAB_HAVE_MPI
MPI_Init( &argc, &argv );
#endif
int test_case_num = atoi( argv[1] );
int rank = 0;
#ifdef MOAB_HAVE_MPI
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
#endif
#ifdef MOAB_HAVE_MPI
MPI_Finalize();
#endif
return 0;
}