43 ARCANE_DEPRECATED_REASON(
"Y2022: Use overload with Ref<MP::MessagePassingMng> and Ref<MP::Dispatchers> instead")
47 Ref<MP::MessagePassingMng> mpm);
52 Int32 commRank()
const {
return m_comm_rank; }
53 Int32 commSize()
const {
return m_comm_size; }
54 Ref<MP::Dispatchers> dispatchersRef()
const {
return m_dispatchers_ref; }
55 Ref<MP::MessagePassingMng> messagePassingMngRef()
const {
return m_message_passing_mng_ref; }
57 ARCANE_DEPRECATED_REASON(
"Y2022: Use messagePassingMngRef() instead")
59 ARCANE_DEPRECATED_REASON(
"Y2022: Use dispatchersRef() instead")
67 Ref<MP::Dispatchers> m_dispatchers_ref;
69 Ref<MP::MessagePassingMng> m_message_passing_mng_ref;
103 void barrier()
override;
104 Request nonBlockingBarrier()
override;
107 Ref<Parallel::IRequestList> createRequestListRef()
override;
139 void _setArccoreDispatchers();
144 void broadcastString(
String& str, Int32 rank)
override;
145 void broadcastMemoryBuffer(
ByteArray& bytes, Int32 rank)
override;
152#define ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(field, type) \
154 void allGather(ConstArrayView<type> send_buf, ArrayView<type> recv_buf) override; \
155 void gather(ConstArrayView<type> send_buf, ArrayView<type> recv_buf, Integer rank) override; \
156 void allGatherVariable(ConstArrayView<type> send_buf, Array<type>& recv_buf) override; \
157 void gatherVariable(ConstArrayView<type> send_buf, Array<type>& recv_buf, Integer rank) override; \
158 void scatterVariable(ConstArrayView<type> send_buf, ArrayView<type> recv_buf, Integer root) override; \
159 type reduce(eReduceType rt, type v) override; \
160 void reduce(eReduceType rt, ArrayView<type> v) override;\
161 void broadcast(ArrayView<type> send_buf, Integer id) override;\
162 void send(ConstArrayView<type> values, Integer id) override;\
163 void recv(ArrayView<type> values, Integer id) override;\
164 Request send(ConstArrayView<type> values, Int32 rank, bool is_blocked) override; \
165 Request send(Span<const type> values, const PointToPointMessageInfo& message) override; \
166 Request recv(ArrayView<type> values, Int32 rank, bool is_blocked) override;\
167 Request receive(Span<type> values, const PointToPointMessageInfo& message) override; \
168 void sendRecv(ConstArrayView<type> send_buf, ArrayView<type> recv_buf, Integer id) override;\
169 void allToAll(ConstArrayView<type> send_buf, ArrayView<type> recv_buf, Integer count) override;\
170 void allToAllVariable(ConstArrayView<type> send_buf, Int32ConstArrayView send_count,\
171 Int32ConstArrayView send_index, ArrayView<type> recv_buf,\
172 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) override;\
173 type scan(eReduceType rt, type v); \
174 void computeMinMaxSum(type val, type& min_val, type& max_val, type& sum_val, Int32& min_proc, Int32& max_proc) override;\
175 void computeMinMaxSum(ConstArrayView<type> values,\
176 ArrayView<type> min_values,\
177 ArrayView<type> max_values,\
178 ArrayView<type> sum_values,\
179 ArrayView<Int32> min_ranks,\
180 ArrayView<Int32> max_ranks) override;\
181 void scan(eReduceType rt, ArrayView<type> v) override;\
183 IParallelDispatchT<type>* field;
185 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_char,
char)
186 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_unsigned_char,
unsigned char)
187 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_signed_char,
signed char)
188 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_short,
short)
189 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_unsigned_short,
unsigned short)
190 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_int,
int)
191 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_unsigned_int,
unsigned int)
192 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_long,
long)
193 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_unsigned_long,
unsigned long)
194 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_long_long,
long long)
195 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_unsigned_long_long,
unsigned long long)
196 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_float,
float)
197 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_double,
double)
198 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_long_double,
long double)
199 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_apreal,
APReal)
200 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_real2,
Real2)
201 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_real3,
Real3)
202 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_real2x2,
Real2x2)
203 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_real3x3,
Real3x3)
204 ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE(m_hpreal,
HPReal)
206#undef ARCANE_PARALLEL_MANAGER_DISPATCH_PROTOTYPE
233 template <
class CreatorType>
void
234 createDispatchers(CreatorType& ct)
236 m_char = ct.template create<char>();
237 m_signed_char = ct.template create<signed char>();
238 m_unsigned_char = ct.template create<unsigned char>();
239 m_short = ct.template create<short>();
240 m_unsigned_short = ct.template create<unsigned short>();
241 m_int = ct.template create<int>();
242 m_unsigned_int = ct.template create<unsigned int>();
243 m_long = ct.template create<long>();
244 m_unsigned_long = ct.template create<unsigned long>();
245 m_long_long = ct.template create<long long>();
246 m_unsigned_long_long = ct.template create<unsigned long long>();
248 m_float = ct.template create<float>();
249 m_double = ct.template create<double>();
250 m_long_double = ct.template create<long double>();
252 m_apreal = ct.template create<APReal>();
253 m_real2 = ct.template create<Real2>();
254 m_real3 = ct.template create<Real3>();
255 m_real2x2 = ct.template create<Real2x2>();
256 m_real3x3 = ct.template create<Real3x3>();
257 m_hpreal = ct.template create<HPReal>();
259 _setArccoreDispatchers();
278 IParallelMngInternal* _internalApi()
override {
return m_parallel_mng_internal; }
283 UniqueArray<Integer> _doWaitRequests(ArrayView<Request> requests,Parallel::eWaitType wait_type);
284 virtual ISerializeMessageList* _createSerializeMessageList() =0;
285 virtual IParallelMng* _createSubParallelMng(Int32ConstArrayView kept_ranks) =0;
286 virtual bool _isAcceleratorAware()
const {
return false; }
287 virtual Ref<IParallelMng> _createSubParallelMngRef(Int32 color, Int32 key);
291 TimeMetricAction _communicationTimeMetricAction()
const;
297 ITimeStats* m_time_stats =
nullptr;
298 Ref<MP::Dispatchers> m_mp_dispatchers_ref;
299 Ref<MP::MessagePassingMng> m_message_passing_mng_ref;
302 IParallelMngInternal* m_parallel_mng_internal =
nullptr;