artdaq_mpich_plugin  v1_00_08a
MPIProg.hh
1 #ifndef proto_MPIProg_hh
2 #define proto_MPIProg_hh
3 
5 #include "artdaq/DAQdata/Globals.hh"
6 
10 struct MPIProg {
16  MPIProg(int argc, char** argv) {
17  MPI_Init(&argc, &argv);
18  MPI_Comm_size(MPI_COMM_WORLD, &procs_);
19  MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
20  };
24  ~MPIProg() { MPI_Finalize(); };
25 
26  int procs_;
27 };
28 
29 #endif /* proto_MPIProg_hh */
A wrapper for a MPI program. Similar to MPISentry.
Definition: MPIProg.hh:10
int procs_
Number of processes in MPI cluster.
Definition: MPIProg.hh:24
MPIProg(int argc, char **argv)
MPIProg Constructor.
Definition: MPIProg.hh:16
~MPIProg()
MPIProg destructor.
Definition: MPIProg.hh:24