PaCO++
0.05
|
00001 #include "paco_mpi.h" 00002 00003 #undef DEBUG 00004 00005 paco_mpi::paco_mpi(void * group) 00006 { 00007 my_group_id = *((MPI_Comm*) group); 00008 } 00009 00010 paco_mpi::~paco_mpi () {} 00011 00012 00013 int 00014 paco_mpi::paco_rank(int * rank) 00015 { 00016 return MPI_Comm_rank(my_group_id, rank); 00017 } 00018 00019 int 00020 paco_mpi::paco_barrier() 00021 { 00022 #ifdef DEBUG 00023 cerr << __FUNCTION__ << endl; 00024 #endif 00025 return MPI_Barrier(my_group_id); 00026 } 00027 00028 int 00029 paco_mpi::paco_bcast(void* buf, int count, int root) 00030 { 00031 #ifdef DEBUG 00032 cerr << __FUNCTION__ << endl; 00033 #endif 00034 return MPI_Bcast(buf, count, MPI_CHAR, root, my_group_id); 00035 } 00036