56 MPI_Comm comm,
MpiLock* mpi_lock,
72 void broadcast(
void* buf,
Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
73 void allGather(
const void* send_buf,
void* recv_buf,
74 Int64 nb_elem,MPI_Datatype datatype);
75 void gather(
const void* send_buf,
void* recv_buf,
76 Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
77 void allGatherVariable(
const void* send_buf,
void* recv_buf,
const int* recv_counts,
78 const int* recv_indexes,
Int64 nb_elem,MPI_Datatype datatype);
79 void gatherVariable(
const void* send_buf,
void* recv_buf,
const int* recv_counts,
80 const int* recv_indexes,
Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
81 void scatterVariable(
const void* send_buf,
const int* send_count,
const int* send_indexes,
82 void* recv_buf,
Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
83 void allToAll(
const void* send_buf,
void* recv_buf,
Int32 count,MPI_Datatype datatype);
84 void allToAllVariable(
const void* send_buf,
const int* send_counts,
85 const int* send_indexes,
void* recv_buf,
const int* recv_counts,
86 const int* recv_indexes,MPI_Datatype datatype);
87 void reduce(
const void* send_buf,
void* recv_buf,
Int64 count,MPI_Datatype datatype,MPI_Op op,
Int32 root);
88 void allReduce(
const void* send_buf,
void* recv_buf,
Int64 count,MPI_Datatype datatype,MPI_Op op);
89 void scan(
const void* send_buf,
void* recv_buf,
Int64 count,MPI_Datatype datatype,MPI_Op op);
90 void directSendRecv(
const void* send_buffer,
Int64 send_buffer_size,
91 void* recv_buffer,
Int64 recv_buffer_size,
92 Int32 proc,
Int64 elem_size,MPI_Datatype data_type);
94 Request directSend(
const void* send_buffer,
Int64 send_buffer_size,
95 Int32 proc,
Int64 elem_size,MPI_Datatype data_type,
96 int mpi_tag,
bool is_blocked);
100 Int32 proc,MPI_Datatype data_type,
int mpi_tag);
102 Request directRecv(
void* recv_buffer,
Int64 recv_buffer_size,
103 Int32 source_rank,
Int64 elem_size,MPI_Datatype data_type,
104 int mpi_tag,
bool is_blocked);
108 Int32 source_rank,MPI_Datatype data_type,
int mpi_tag);
110 Request directSendPack(
const void* send_buffer,
Int64 send_buffer_size,
111 Int32 proc,
int mpi_tag,
bool is_blocked);
119 Request directRecv(
void* recv_buffer,
Int64 recv_buffer_size,
123 Request directRecvPack(
void* recv_buffer,
Int64 recv_buffer_size,
124 Int32 proc,
int mpi_tag,
bool is_blocking);
135 bool is_non_blocking);
149 void freeRequest(
Request& request);
150 bool testRequest(
Request& request);
152 void enableDebugRequest(
bool enable_debug_request);
154 MpiLock* mpiLock()
const {
return m_mpi_lock; }
156 Request nonBlockingBroadcast(
void* buf,
Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
157 Request nonBlockingAllGather(
const void* send_buf,
void* recv_buf,
Int64 nb_elem,MPI_Datatype datatype);
158 Request nonBlockingGather(
const void* send_buf,
void* recv_buf,
Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
160 Request nonBlockingAllToAll(
const void* send_buf,
void* recv_buf,
Int32 count,MPI_Datatype datatype);
161 Request nonBlockingAllReduce(
const void* send_buf,
void* recv_buf,
Int64 count,MPI_Datatype datatype,MPI_Op op);
162 Request nonBlockingAllToAllVariable(
const void* send_buf,
const int* send_counts,
163 const int* send_indexes,
void* recv_buf,
const int* recv_counts,
164 const int* recv_indexes,MPI_Datatype datatype);
169 int toMPISize(
Int64 count);
172 Request buildRequest(
int ret,MPI_Request request);
177 void setRequestErrorAreFatal(
bool v);
178 bool isRequestErrorAreFatal()
const;
181 void setPrintRequestError(
bool v);
182 bool isPrintRequestError()
const;
186 bool isTraceMPIMessage()
const {
return m_is_trace; }
193 void setCheckRequest(
bool v);
194 bool isCheckRequest()
const;
208 bool isAllowNullRankForAnySource()
const {
return m_is_allow_null_rank_for_any_source; }
212 IStat* m_stat =
nullptr;
213 MpiLock* m_mpi_lock =
nullptr;
214 IMpiProfiling* m_mpi_prof =
nullptr;
215 ITimeMetricCollector* m_metric_collector =
nullptr;
217 int m_comm_rank = A_PROC_NULL_RANK;
219 Int64 m_nb_all_reduce = 0;
220 Int64 m_nb_reduce = 0;
221 bool m_is_trace =
false;
225 MPI_Request m_empty_request2;
226 int m_recv_buffer_for_empty_request[1];
227 int m_send_buffer_for_empty_request2[1];
228 int m_recv_buffer_for_empty_request2[1];
235 bool m_is_allow_null_rank_for_any_source =
true;
239 void _trace(
const char* function);
242 void _checkFatalInRequest();
247 void _checkHasNoRequests();