38 explicit Impl(MPI_Comm mpi_comm,
bool clean_comm=
false)
39 : m_communicator(mpi_comm), m_clean_comm(clean_comm)
41 m_trace_mng = Arccore::arccoreCreateDefaultTraceMng();
42 ::MPI_Comm_rank(mpi_comm, &m_comm_rank);
43 ::MPI_Comm_size(mpi_comm, &m_comm_size);
47 m_adapter =
new MpiAdapter(m_trace_mng.get(), m_stat, mpi_comm, mpi_lock);
59 std::cerr <<
"ERROR: msg=" << ex <<
"\n";
66 MPI_Comm_free(&m_communicator);
78 IStat* m_stat =
nullptr;
81 int m_comm_rank = A_NULL_RANK;
82 int m_comm_size = A_NULL_RANK;
83 MPI_Comm m_communicator = MPI_COMM_NULL;
84 bool m_clean_comm =
false;
123 _createAndSetCustomDispatcher<DataType>(dispatchers, mpm, adapter, dt);
132create(MPI_Comm mpi_comm,
bool clean_comm)
134 Impl* p =
new Impl(mpi_comm, clean_comm);
136 auto adapter = p->m_adapter;
137 auto dsp = p->m_dispatchers;
139 _createAndSetDispatcher<char>(dsp, mpm, adapter);
140 _createAndSetDispatcher<signed char>(dsp, mpm, adapter);
141 _createAndSetDispatcher<unsigned char>(dsp, mpm, adapter);
142 _createAndSetDispatcher<short>(dsp, mpm, adapter);
143 _createAndSetDispatcher<unsigned short>(dsp, mpm, adapter);
144 _createAndSetDispatcher<int>(dsp, mpm, adapter);
145 _createAndSetDispatcher<unsigned int>(dsp, mpm, adapter);
146 _createAndSetDispatcher<long>(dsp, mpm, adapter);
147 _createAndSetDispatcher<unsigned long>(dsp, mpm, adapter);
148 _createAndSetDispatcher<long long>(dsp, mpm, adapter);
149 _createAndSetDispatcher<unsigned long long>(dsp, mpm, adapter);
150 _createAndSetDispatcher<float>(dsp, mpm, adapter);
151 _createAndSetDispatcher<double>(dsp, mpm, adapter);
152 _createAndSetDispatcher<long double>(dsp, mpm, adapter);
157 MPI_Datatype uint8_datatype = MpiBuiltIn::datatype(uint8_t{});
160 MPI_Datatype mpi_datatype;
161 MPI_Type_contiguous(2, uint8_datatype, &mpi_datatype);
162 MPI_Type_commit(&mpi_datatype);
164 _createAndSetCustomDispatcher<BFloat16>(dsp, mpm, adapter, x);
168 MPI_Datatype mpi_datatype;
169 MPI_Type_contiguous(2, uint8_datatype, &mpi_datatype);
170 MPI_Type_commit(&mpi_datatype);
172 _createAndSetCustomDispatcher<Float16>(dsp, mpm, adapter, x);