QNANO
MPI_Communicator.h
1 #ifndef QNANO_NEW_MPI_COMMUNICATOR_DEFINED_H
2 #define QNANO_NEW_MPI_COMMUNICATOR_DEFINED_H
3 
4 #include <mpi.h>
5 #include "tools/Communicator.h"
6 
9 public:
10  int MPI_rank, MPI_size;
11 
12  virtual void Reduce_Sum_Complex(std::complex<double> &c)const;
13  virtual void Reduce_Max_Double(double &d)const;
14  virtual void Barrier()const;
15 
16 
17 
18 
20  MPI_Comm_size(MPI_COMM_WORLD, &MPI_size);
21  MPI_Comm_rank(MPI_COMM_WORLD, &MPI_rank);
22  }
23 
24 };
25 #endif
Definition: Communicator.h:19
Definition: MPI_Communicator.h:8
virtual void Reduce_Max_Double(double &d) const
Maximal value from all thread is communicated to the root.
Definition: MPI_Communicator.cc:17
virtual void Barrier() const
Emulates MPI_Barrier.
Definition: MPI_Communicator.cc:3
virtual void Reduce_Sum_Complex(std::complex< double > &c) const
Definition: MPI_Communicator.cc:8