|
IPPL (Independent Parallel Particle Layer)
IPPL
|
#include <Communicator.h>
Public Types | |
| template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space> | |
| using | archive_type = detail::Archive<MemorySpace> |
| template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space> | |
| using | buffer_type = std::shared_ptr<archive_type<MemorySpace>> |
| using | size_type = detail::size_type |
Public Member Functions | |
| Communicator () | |
| Communicator (MPI_Comm comm) | |
| Communicator & | operator= (MPI_Comm comm) |
| ~Communicator ()=default | |
| Communicator | split (int color, int key) const |
| operator const MPI_Comm & () const noexcept | |
| int | size () const noexcept |
| int | rank () const noexcept |
| void | barrier () |
| void | abort (int errorcode=-1) |
| template<typename T> | |
| void | send (const T &buffer, int count, int dest, int tag) |
| template<typename T> | |
| void | send (const T *buffer, int count, int dest, int tag) |
| template<typename T> | |
| void | recv (T &output, int count, int source, int tag, Status &status) |
| template<typename T> | |
| void | recv (T *output, int count, int source, int tag, Status &status) |
| void | probe (int source, int tag, Status &status) |
| template<typename T> | |
| void | isend (const T &buffer, int count, int dest, int tag, Request &request) |
| template<typename T> | |
| void | isend (const T *buffer, int count, int dest, int tag, Request &request) |
| template<typename T> | |
| void | irecv (T &buffer, int count, int source, int tag, Request &request) |
| template<typename T> | |
| void | irecv (T *buffer, int count, int source, int tag, Request &request) |
| bool | iprobe (int source, int tag, Status &status) |
| template<typename T> | |
| void | gather (const T *input, T *output, int count, int root=0) |
| template<typename T> | |
| void | scatter (const T *input, T *output, int count, int root=0) |
| template<typename T, class Op> | |
| void | reduce (const T *input, T *output, int count, Op op, int root=0) |
| template<typename T, class Op> | |
| void | reduce (const T &input, T &output, int count, Op op, int root=0) |
| template<typename T, class Op> | |
| void | allreduce (const T *input, T *output, int count, Op op) |
| template<typename T, class Op> | |
| void | allreduce (const T &input, T &output, int count, Op op) |
| template<typename T, class Op> | |
| void | allreduce (T *inout, int count, Op op) |
| template<typename T, class Op> | |
| void | allreduce (T &inout, int count, Op op) |
| double | getDefaultOverallocation () const |
| void | setDefaultOverallocation (double factor) |
| template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space, typename T = char> | |
| buffer_type< MemorySpace > | getBuffer (size_type size, double overallocation=1.0) |
| void | deleteAllBuffers () |
| void | freeAllBuffers () |
| template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space> | |
| void | freeBuffer (buffer_type< MemorySpace > buffer) |
| const MPI_Comm & | getCommunicator () const noexcept |
| template<class Buffer, typename Archive> | |
| void | recv (int src, int tag, Buffer &buffer, Archive &ar, size_type msize, size_type nrecvs) |
| template<class Buffer, typename Archive> | |
| void | isend (int dest, int tag, Buffer &buffer, Archive &ar, MPI_Request &request, size_type nsends) |
| template<typename Archive> | |
| void | irecv (int src, int tag, Archive &ar, MPI_Request &request, size_type msize) |
| void | printLogs (const std::string &filename) |
| int | next_tag (int t, int s=DEF_CYCLE_SIZE) |
| int | preceding_tag (int t, int s=DEF_CYCLE_SIZE) |
| int | following_tag (int t, int s=DEF_CYCLE_SIZE) |
| int | current_tag (int t, int s=DEF_CYCLE_SIZE) |
| int | reset_tag (int t, int s=DEF_CYCLE_SIZE) |
Protected Attributes | |
| std::shared_ptr< MPI_Comm > | comm_m |
| int | size_m |
| int | rank_m |
Private Types | |
| template<typename MemorySpace> | |
| using | buffer_container_type = LoggingBufferHandler<MemorySpace> |
| using | buffer_handler_type |
Private Member Functions | |
| std::vector< LogEntry > | gatherLocalLogs () |
| void | sendLogsToRank0 (const std::vector< LogEntry > &localLogs) |
| std::vector< LogEntry > | gatherLogsFromAllRanks (const std::vector< LogEntry > &localLogs) |
| void | writeLogsToFile (const std::vector< LogEntry > &allLogs, const std::string &filename) |
| TagInfo & | create_base_tag (int t, int s=DEF_CYCLE_SIZE) |
Private Attributes | |
| buffer_handler_type | buffer_handlers_m |
| double | defaultOveralloc_m = 1.0 |
| std::map< int, TagInfo, TagCompare > | TagList |
Definition at line 31 of file Communicator.h.
| using ippl::mpi::Communicator::archive_type = detail::Archive<MemorySpace> |
Definition at line 131 of file Communicator.h.
|
private |
Definition at line 138 of file Communicator.h.
|
private |
Definition at line 140 of file Communicator.h.
| using ippl::mpi::Communicator::buffer_type = std::shared_ptr<archive_type<MemorySpace>> |
Definition at line 134 of file Communicator.h.
Definition at line 144 of file Communicator.h.
| ippl::mpi::Communicator::Communicator | ( | ) |
Definition at line 7 of file Communicator.cpp.
References comm_m, rank_m, and size_m.
Referenced by operator=(), and split().
| ippl::mpi::Communicator::Communicator | ( | MPI_Comm | comm | ) |
Definition at line 13 of file Communicator.cpp.
|
default |
|
inline |
| void ippl::mpi::Communicator::allreduce | ( | const T & | input, |
| T & | output, | ||
| int | count, | ||
| Op | op ) |
Definition at line 45 of file Collectives.hpp.
References allreduce().
| void ippl::mpi::Communicator::allreduce | ( | const T * | input, |
| T * | output, | ||
| int | count, | ||
| Op | op ) |
Definition at line 36 of file Collectives.hpp.
References comm_m, ippl::mpi::get_mpi_datatype(), and ippl::mpi::get_mpi_op().
Referenced by allreduce(), and allreduce().
| void ippl::mpi::Communicator::allreduce | ( | T & | inout, |
| int | count, | ||
| Op | op ) |
Definition at line 59 of file Collectives.hpp.
References allreduce().
| void ippl::mpi::Communicator::allreduce | ( | T * | inout, |
| int | count, | ||
| Op | op ) |
Definition at line 50 of file Collectives.hpp.
References comm_m, ippl::mpi::get_mpi_datatype(), and ippl::mpi::get_mpi_op().
|
inline |
Definition at line 49 of file Communicator.h.
References comm_m.
|
inlineprivateinherited |
Definition at line 107 of file TagMaker.h.
References TagMaker::TagInfo::base, TagMaker::TagInfo::cycleSize, DEF_CYCLE_SIZE, and TagList.
Referenced by current_tag(), following_tag(), next_tag(), preceding_tag(), and reset_tag().
|
inlineinherited |
Definition at line 64 of file TagMaker.h.
References TagMaker::TagInfo::base, create_base_tag(), TagMaker::TagInfo::current, and DEF_CYCLE_SIZE.
| void ippl::mpi::Communicator::deleteAllBuffers | ( | ) |
Definition at line 34 of file Buffers.cpp.
References buffer_handlers_m.
|
inlineinherited |
Definition at line 56 of file TagMaker.h.
References TagMaker::TagInfo::base, create_base_tag(), TagMaker::TagInfo::current, TagMaker::TagInfo::cycleSize, and DEF_CYCLE_SIZE.
| void ippl::mpi::Communicator::freeAllBuffers | ( | ) |
Definition at line 40 of file Buffers.cpp.
References buffer_handlers_m.
| void ippl::mpi::Communicator::freeBuffer | ( | Communicator::buffer_type< MemorySpace > | buffer | ) |
Definition at line 36 of file Buffers.hpp.
References buffer_handlers_m.
| void ippl::mpi::Communicator::gather | ( | const T * | input, |
| T * | output, | ||
| int | count, | ||
| int | root = 0 ) |
Definition at line 8 of file Collectives.hpp.
References comm_m, and ippl::mpi::get_mpi_datatype().
|
private |
Definition at line 28 of file CommunicatorLogging.cpp.
References buffer_handlers_m.
Referenced by printLogs().
|
private |
Definition at line 48 of file CommunicatorLogging.cpp.
References ippl::mpi::deserializeLogs(), rank(), recv(), and size_m.
Referenced by printLogs().
| Communicator::buffer_type< MemorySpace > ippl::mpi::Communicator::getBuffer | ( | size_type | size, |
| double | overallocation = 1.0 ) |
Definition at line 27 of file Buffers.hpp.
References buffer_handlers_m, defaultOveralloc_m, and size().
|
inlinenoexcept |
Definition at line 158 of file Communicator.h.
References comm_m.
|
inline |
Definition at line 145 of file Communicator.h.
References defaultOveralloc_m.
| bool ippl::mpi::Communicator::iprobe | ( | int | source, |
| int | tag, | ||
| Status & | status ) |
Definition at line 36 of file Communicator.cpp.
References comm_m.
|
inline |
Definition at line 188 of file Communicator.h.
References abort(), and comm_m.
| void ippl::mpi::Communicator::irecv | ( | T & | buffer, |
| int | count, | ||
| int | source, | ||
| int | tag, | ||
| Request & | request ) |
Definition at line 49 of file PointToPoint.hpp.
References irecv().
Referenced by irecv().
| void ippl::mpi::Communicator::irecv | ( | T * | buffer, |
| int | count, | ||
| int | source, | ||
| int | tag, | ||
| Request & | request ) |
Definition at line 54 of file PointToPoint.hpp.
References comm_m, and ippl::mpi::get_mpi_datatype().
| void ippl::mpi::Communicator::isend | ( | const T & | buffer, |
| int | count, | ||
| int | dest, | ||
| int | tag, | ||
| Request & | request ) |
Definition at line 37 of file PointToPoint.hpp.
References isend().
Referenced by isend().
| void ippl::mpi::Communicator::isend | ( | const T * | buffer, |
| int | count, | ||
| int | dest, | ||
| int | tag, | ||
| Request & | request ) |
Definition at line 42 of file PointToPoint.hpp.
References comm_m, and ippl::mpi::get_mpi_datatype().
|
inline |
Definition at line 177 of file Communicator.h.
References abort(), and comm_m.
|
inlineinherited |
Definition at line 34 of file TagMaker.h.
References TagMaker::TagInfo::base, create_base_tag(), TagMaker::TagInfo::current, TagMaker::TagInfo::cycleSize, and DEF_CYCLE_SIZE.
|
inlinenoexcept |
Definition at line 43 of file Communicator.h.
References comm_m.
| Communicator & ippl::mpi::Communicator::operator= | ( | MPI_Comm | comm | ) |
Definition at line 19 of file Communicator.cpp.
References comm_m, Communicator(), rank_m, and size_m.
|
inlineinherited |
Definition at line 44 of file TagMaker.h.
References TagMaker::TagInfo::base, create_base_tag(), TagMaker::TagInfo::current, TagMaker::TagInfo::cycleSize, and DEF_CYCLE_SIZE.
| void ippl::mpi::Communicator::printLogs | ( | const std::string & | filename | ) |
Definition at line 13 of file CommunicatorLogging.cpp.
References gatherLocalLogs(), gatherLogsFromAllRanks(), rank(), sendLogsToRank0(), and writeLogsToFile().
| void ippl::mpi::Communicator::probe | ( | int | source, |
| int | tag, | ||
| Status & | status ) |
Definition at line 32 of file Communicator.cpp.
References comm_m.
|
inlinenoexcept |
Definition at line 47 of file Communicator.h.
References rank_m.
Referenced by ippl::detail::HaloCells< T, Dim, ViewArgs >::applyPeriodicSerialDim(), gatherLogsFromAllRanks(), and printLogs().
|
inline |
Definition at line 161 of file Communicator.h.
References abort(), and comm_m.
| void ippl::mpi::Communicator::recv | ( | T & | output, |
| int | count, | ||
| int | source, | ||
| int | tag, | ||
| Status & | status ) |
Definition at line 21 of file PointToPoint.hpp.
References recv().
Referenced by gatherLogsFromAllRanks(), and recv().
| void ippl::mpi::Communicator::recv | ( | T * | output, |
| int | count, | ||
| int | source, | ||
| int | tag, | ||
| Status & | status ) |
Definition at line 26 of file PointToPoint.hpp.
References comm_m, and ippl::mpi::get_mpi_datatype().
| void ippl::mpi::Communicator::reduce | ( | const T & | input, |
| T & | output, | ||
| int | count, | ||
| Op | op, | ||
| int | root = 0 ) |
Definition at line 31 of file Collectives.hpp.
References reduce().
| void ippl::mpi::Communicator::reduce | ( | const T * | input, |
| T * | output, | ||
| int | count, | ||
| Op | op, | ||
| int | root = 0 ) |
Definition at line 22 of file Collectives.hpp.
References comm_m, ippl::mpi::get_mpi_datatype(), and ippl::mpi::get_mpi_op().
Referenced by reduce().
|
inlineinherited |
Definition at line 71 of file TagMaker.h.
References TagMaker::TagInfo::base, create_base_tag(), TagMaker::TagInfo::current, and DEF_CYCLE_SIZE.
| void ippl::mpi::Communicator::scatter | ( | const T * | input, |
| T * | output, | ||
| int | count, | ||
| int | root = 0 ) |
Definition at line 15 of file Collectives.hpp.
References comm_m, and ippl::mpi::get_mpi_datatype().
| void ippl::mpi::Communicator::send | ( | const T & | buffer, |
| int | count, | ||
| int | dest, | ||
| int | tag ) |
Definition at line 9 of file PointToPoint.hpp.
References send().
Referenced by send(), and sendLogsToRank0().
| void ippl::mpi::Communicator::send | ( | const T * | buffer, |
| int | count, | ||
| int | dest, | ||
| int | tag ) |
Definition at line 14 of file PointToPoint.hpp.
References comm_m, and ippl::mpi::get_mpi_datatype().
|
private |
Definition at line 39 of file CommunicatorLogging.cpp.
References send(), and ippl::mpi::serializeLogs().
Referenced by printLogs().
| void ippl::mpi::Communicator::setDefaultOverallocation | ( | double | factor | ) |
Definition at line 30 of file Buffers.cpp.
References defaultOveralloc_m.
|
inlinenoexcept |
Definition at line 45 of file Communicator.h.
References size_m.
Referenced by ippl::OrthogonalRecursiveBisection< Field, Tp >::binaryRepartition(), and getBuffer().
| Communicator ippl::mpi::Communicator::split | ( | int | color, |
| int | key ) const |
|
private |
Definition at line 93 of file CommunicatorLogging.cpp.
References endl(), first(), Inform::flush(), Inform::OVERWRITE, and Inform::setOutputLevel().
Referenced by printLogs().
|
private |
Definition at line 204 of file Communicator.h.
Referenced by deleteAllBuffers(), freeAllBuffers(), freeBuffer(), gatherLocalLogs(), and getBuffer().
|
protected |
Definition at line 211 of file Communicator.h.
Referenced by abort(), allreduce(), allreduce(), barrier(), Communicator(), Communicator(), gather(), getCommunicator(), iprobe(), irecv(), irecv(), isend(), isend(), operator const MPI_Comm &(), operator=(), probe(), recv(), recv(), reduce(), scatter(), and send().
|
private |
Definition at line 206 of file Communicator.h.
Referenced by getBuffer(), getDefaultOverallocation(), and setDefaultOverallocation().
|
protected |
Definition at line 213 of file Communicator.h.
Referenced by Communicator(), Communicator(), operator=(), and rank().
|
protected |
Definition at line 212 of file Communicator.h.
Referenced by Communicator(), Communicator(), gatherLogsFromAllRanks(), operator=(), and size().
|
privateinherited |
Definition at line 102 of file TagMaker.h.
Referenced by create_base_tag().