class MPISPMD
{
public:
int nprocs, myid;
MPISPMD() {nprocs=1, myid=0;}
MPISPMD(int& argc, char**& argv) {init(argc,argv);};
~MPISPMD() {finalize();}
void init(int& argc, char**& argv);
void finalize() {MPI_Finalize();}
};
MPISPMD is a simple class that arranges for MPI_Init to
be called when initialised, and MPI_Finalise when destroyed. It
use is primarily to construct SPMD style programs. See the heat.cc example program to see how it might be used.