artdaq  v2_02_03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
MPIProg.hh
1 #ifndef proto_MPIProg_hh
2 #define proto_MPIProg_hh
3 
5 #include "artdaq/DAQdata/Globals.hh"
6 
10 struct MPIProg
11 {
17  MPIProg(int argc, char** argv)
18  {
19  MPI_Init(&argc, &argv);
20  MPI_Comm_size(MPI_COMM_WORLD, &procs_);
21  MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
22  };
26  ~MPIProg() { MPI_Finalize(); };
27 
28  int procs_;
29 };
30 
31 
32 #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:26
MPIProg(int argc, char **argv)
MPIProg Constructor.
Definition: MPIProg.hh:17
~MPIProg()
MPIProg destructor.
Definition: MPIProg.hh:26