Go to the documentation of this file.
28 static const std::string s_v(
"tools::mpi::hmpi");
62 virtual bool send(
int a_dest) {
64 m_out <<
"tools::mpi::hmpi::send : rank " <<
m_rank <<
" : MPI_Send failed." << std::endl;
71 virtual bool wait_histos(
int a_src,std::vector< std::pair<std::string,void*> >& a_hists) {
74 typedef std::pair<std::string,void*> class_pointer;
78 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank <<
" : MPI_Probe : failed." << std::endl;
84 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank <<
" : MPI_Get_count : failed." << std::endl;
89 m_out <<
"exlb::mpi::wait_histos : MPI_Get_count returns zero data." << std::endl;
95 char* buffer =
new char[buffer_size];
97 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank <<
" : can't alloc buffer of size " << buffer_size << std::endl;
102 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank <<
" : MPI_Recv : failed." << std::endl;
107 if(
m_verbose)
m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank <<
" : unpack data ..." << std::endl;
112 if(!_mpi.
unpack(nhist))
return false;
115 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank <<
" : number of histos to unpack " << nhist << std::endl;
117 {
for(
num_t ihist=0;ihist<nhist;ihist++) {
120 if(!_mpi.
sunpack(scls))
return false;
128 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank
129 <<
" : got a " << scls
130 <<
", title " << h->
title()
131 <<
", mean_x " << h->
mean() <<
", rms " << h->
rms()
134 a_hists.push_back(class_pointer(h->
s_cls(),h));
142 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank
143 <<
" : got a " << scls
144 <<
", title " << h->
title()
145 <<
", mean_x " << h->
mean_x() <<
", rms_x " << h->
rms_x()
146 <<
", mean_y " << h->
mean_y() <<
", rms_y " << h->
rms_y()
149 a_hists.push_back(class_pointer(h->
s_cls(),h));
157 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank
158 <<
" : got a " << scls
159 <<
", title " << h->
title()
160 <<
", mean_x " << h->
mean_x() <<
", rms_x " << h->
rms_x()
161 <<
", mean_y " << h->
mean_y() <<
", rms_y " << h->
rms_y()
162 <<
", mean_z " << h->
mean_z() <<
", rms_z " << h->
rms_z()
165 a_hists.push_back(class_pointer(h->
s_cls(),h));
173 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank
174 <<
" : got a " << scls
175 <<
", title " << h->
title()
176 <<
", mean_x " << h->
mean() <<
", rms " << h->
rms()
179 a_hists.push_back(class_pointer(h->
s_cls(),h));
187 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank
188 <<
" : got a " << scls
189 <<
", title " << h->
title()
190 <<
", mean_x " << h->
mean_x() <<
", rms_x " << h->
rms_x()
191 <<
", mean_y " << h->
mean_y() <<
", rms_y " << h->
rms_y()
194 a_hists.push_back(class_pointer(h->
s_cls(),h));
197 m_out <<
"tools::mpi::hmpi::wait_histos : rank " <<
m_rank
198 <<
" : got not treated class " << scls
218 hmpi(std::ostream& a_out,
int a_rank,
int a_tag,
const MPI_Comm& a_comm,
bool a_verbose =
false)
227 tools::mem::increment(
s_class().c_str());
232 tools::mem::decrement(
s_class().c_str());
246 tools::mem::increment(
s_class().c_str());
int MPI_Send(const void *, int, MPI_Datatype, int, int, MPI_Comm)
int MPI_Comm_size(MPI_Comm, int *)
int MPI_Recv(void *, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status *)
to pass h2mpi, hs2mpi /////////////////////////////////////
int MPI_Comm_rank(MPI_Comm, int *)
void * MPI_Comm
to pass hd2mpi ////////////////////////////////////////////
int MPI_Get_count(const MPI_Status *, MPI_Datatype, int *)
int MPI_Probe(int, int, MPI_Comm, MPI_Status *)