55 MPI_Comm comm,
MpiLock* mpi_lock,
71 void broadcast(
void* buf,
Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
72 void allGather(
const void* send_buf,
void* recv_buf,
73 Int64 nb_elem,MPI_Datatype datatype);
74 void gather(
const void* send_buf,
void* recv_buf,
75 Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
76 void allGatherVariable(
const void* send_buf,
void* recv_buf,
const int* recv_counts,
77 const int* recv_indexes,
Int64 nb_elem,MPI_Datatype datatype);
78 void gatherVariable(
const void* send_buf,
void* recv_buf,
const int* recv_counts,
79 const int* recv_indexes,
Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
80 void scatterVariable(
const void* send_buf,
const int* send_count,
const int* send_indexes,
81 void* recv_buf,
Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
82 void allToAll(
const void* send_buf,
void* recv_buf,
Int32 count,MPI_Datatype datatype);
83 void allToAllVariable(
const void* send_buf,
const int* send_counts,
84 const int* send_indexes,
void* recv_buf,
const int* recv_counts,
85 const int* recv_indexes,MPI_Datatype datatype);
86 void reduce(
const void* send_buf,
void* recv_buf,
Int64 count,MPI_Datatype datatype,MPI_Op op,
Int32 root);
87 void allReduce(
const void* send_buf,
void* recv_buf,
Int64 count,MPI_Datatype datatype,MPI_Op op);
88 void scan(
const void* send_buf,
void* recv_buf,
Int64 count,MPI_Datatype datatype,MPI_Op op);
89 void directSendRecv(
const void* send_buffer,
Int64 send_buffer_size,
90 void* recv_buffer,
Int64 recv_buffer_size,
91 Int32 proc,
Int64 elem_size,MPI_Datatype data_type);
93 Request directSend(
const void* send_buffer,
Int64 send_buffer_size,
94 Int32 proc,
Int64 elem_size,MPI_Datatype data_type,
95 int mpi_tag,
bool is_blocked);
99 Int32 proc,MPI_Datatype data_type,
int mpi_tag);
101 Request directRecv(
void* recv_buffer,
Int64 recv_buffer_size,
102 Int32 source_rank,
Int64 elem_size,MPI_Datatype data_type,
103 int mpi_tag,
bool is_blocked);
107 Int32 source_rank,MPI_Datatype data_type,
int mpi_tag);
109 Request directSendPack(
const void* send_buffer,
Int64 send_buffer_size,
110 Int32 proc,
int mpi_tag,
bool is_blocked);
118 Request directRecv(
void* recv_buffer,
Int64 recv_buffer_size,
122 Request directRecvPack(
void* recv_buffer,
Int64 recv_buffer_size,
123 Int32 proc,
int mpi_tag,
bool is_blocking);
134 bool is_non_blocking);
148 void freeRequest(
Request& request);
149 bool testRequest(
Request& request);
151 void enableDebugRequest(
bool enable_debug_request);
153 MpiLock* mpiLock()
const {
return m_mpi_lock; }
155 Request nonBlockingBroadcast(
void* buf,
Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
156 Request nonBlockingAllGather(
const void* send_buf,
void* recv_buf,
Int64 nb_elem,MPI_Datatype datatype);
157 Request nonBlockingGather(
const void* send_buf,
void* recv_buf,
Int64 nb_elem,
Int32 root,MPI_Datatype datatype);
159 Request nonBlockingAllToAll(
const void* send_buf,
void* recv_buf,
Int32 count,MPI_Datatype datatype);
160 Request nonBlockingAllReduce(
const void* send_buf,
void* recv_buf,
Int64 count,MPI_Datatype datatype,MPI_Op op);
161 Request nonBlockingAllToAllVariable(
const void* send_buf,
const int* send_counts,
162 const int* send_indexes,
void* recv_buf,
const int* recv_counts,
163 const int* recv_indexes,MPI_Datatype datatype);
168 int toMPISize(
Int64 count);
171 Request buildRequest(
int ret,MPI_Request request);
176 void setRequestErrorAreFatal(
bool v);
177 bool isRequestErrorAreFatal()
const;
180 void setPrintRequestError(
bool v);
181 bool isPrintRequestError()
const;
185 bool isTraceMPIMessage()
const {
return m_is_trace; }
192 void setCheckRequest(
bool v);
193 bool isCheckRequest()
const;
207 bool isAllowNullRankForAnySource()
const {
return m_is_allow_null_rank_for_any_source; }
218 MpiMachineMemoryWindowBaseInternalCreator* windowCreator();
222 IStat* m_stat =
nullptr;
223 MpiLock* m_mpi_lock =
nullptr;
224 IMpiProfiling* m_mpi_prof =
nullptr;
225 ITimeMetricCollector* m_metric_collector =
nullptr;
227 int m_comm_rank = A_PROC_NULL_RANK;
230 int m_machine_comm_rank = A_PROC_NULL_RANK;
231 int m_machine_comm_size = 0;
232 Int64 m_nb_all_reduce = 0;
233 Int64 m_nb_reduce = 0;
234 bool m_is_trace =
false;
238 MPI_Request m_empty_request2;
239 int m_recv_buffer_for_empty_request[1];
240 int m_send_buffer_for_empty_request2[1];
241 int m_recv_buffer_for_empty_request2[1];
248 bool m_is_allow_null_rank_for_any_source =
true;
254 void _trace(
const char* function);
257 void _checkFatalInRequest();
262 void _checkHasNoRequests();