PaCO++  0.05
paco_mpi.cc
Go to the documentation of this file.
1 #include "paco_mpi.h"
2 
3 #undef DEBUG
4 
5 paco_mpi::paco_mpi(void * group)
6 {
7  my_group_id = *((MPI_Comm*) group);
8 }
9 
11 
12 
13 int
15 {
16  return MPI_Comm_rank(my_group_id, rank);
17 }
18 
19 int
21 {
22 #ifdef DEBUG
23  cerr << __FUNCTION__ << endl;
24 #endif
25  return MPI_Barrier(my_group_id);
26 }
27 
28 int
29 paco_mpi::paco_bcast(void* buf, int count, int root)
30 {
31 #ifdef DEBUG
32  cerr << __FUNCTION__ << endl;
33 #endif
34  return MPI_Bcast(buf, count, MPI_CHAR, root, my_group_id);
35 }
36 
int paco_rank(int *rank)
Definition: paco_mpi.cc:14
virtual ~paco_mpi()
Definition: paco_mpi.cc:10
MPI_Comm my_group_id
Definition: paco_mpi.h:18
int paco_barrier()
Definition: paco_mpi.cc:20
paco_mpi(void *group)
Definition: paco_mpi.cc:5
int paco_bcast(void *buf, int count, int root)
Definition: paco_mpi.cc:29