Go to the documentation of this file.
4 #ifndef tools_mpi_wait_buffer
5 #define tools_mpi_wait_buffer
7 #ifdef TOOLS_USE_NATIVE_MPI
19 int& a_buffer_size,
char*& a_buffer,
int& a_probe_src,
bool a_verbose =
false) {
26 a_out <<
"tools::mpi::wait_buffer : rank " << a_rank <<
" : MPI_Probe : failed." << std::endl;
31 a_out <<
"tools::mpi::wait_buffer : rank " << a_rank <<
" : MPI_Get_count : failed." << std::endl;
39 a_out <<
"exlb::mpi::wait_buffer : MPI_Get_count returns zero data." << std::endl;
44 if(a_verbose) a_out <<
"tools::mpi::wait_buffer : rank " << a_rank <<
" : get_count " << a_buffer_size << std::endl;
46 a_buffer =
new char[a_buffer_size];
48 a_out <<
"tools::mpi::wait_buffer : rank " << a_rank <<
" : can't alloc buffer of size " << a_buffer_size << std::endl;
55 a_out <<
"tools::mpi::wait_buffer : rank " << a_rank <<
" : MPI_Recv : failed." << std::endl;
63 if(a_verbose) a_out <<
"tools::mpi::wait_buffer : rank " << a_rank <<
" : unpack data ..." << std::endl;
int MPI_Recv(void *, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status *)
to pass h2mpi, hs2mpi /////////////////////////////////////
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 *)