OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
MyPid.h
Go to the documentation of this file.
2 
3 #include "mpi.h"
4 
5 class MyPid : public TraceComponent {
6 
7 public:
8 
9 
10  MyPid(std::string name, MPI_Comm comm)
11  : TraceComponent(name)
12  {
13  mypid_ = 0;
14  MPI_Comm_rank(comm, &mypid_);
15  }
16 
17  void execute(std::ostringstream &dump) {
18  dump << mypid_;
19  }
20 
21 private:
22 
23  int mypid_;
24 
25 };
Definition: MyPid.h:5
int mypid_
Definition: MyPid.h:23
const std::string name
MyPid(std::string name, MPI_Comm comm)
Definition: MyPid.h:10
void execute(std::ostringstream &dump)
Definition: MyPid.h:17