|
Yet Another eXchange Tool
0.9.0
|
#include <limits.h>#include <stdbool.h>#include <stdlib.h>#include "core/core.h"#include "xt/xt_core.h"#include "xt/xt_redist.h"#include "xt/xt_mpi.h"#include "xt/xt_request.h"#include "xt/xt_sort.h"#include "core/ppm_xfuncs.h"#include "xt_redist_internal.h"Go to the source code of this file.
Functions | |
| Xt_redist | xt_redist_copy (Xt_redist redist) |
| void | xt_redist_delete (Xt_redist redist) |
| void | xt_redist_s_exchange (Xt_redist redist, int num_arrays, const void **src_data, void **dst_data) |
| void | xt_redist_a_exchange (Xt_redist redist, int num_arrays, const void **src_data, void **dst_data, Xt_request *request) |
| void | xt_redist_s_exchange1 (Xt_redist redist, const void *src_data, void *dst_data) |
| void | xt_redist_a_exchange1 (Xt_redist redist, const void *src_data, void *dst_data, Xt_request *request) |
| int | xt_redist_get_num_send_msg (Xt_redist redist) |
| int | xt_redist_get_num_recv_msg (Xt_redist redist) |
| MPI_Datatype | xt_redist_get_send_MPI_Datatype (Xt_redist redist, int rank) |
| MPI_Datatype | xt_redist_get_recv_MPI_Datatype (Xt_redist redist, int rank) |
| MPI_Datatype | xt_redist_get_MPI_Datatype (Xt_redist redist, int rank, enum xt_msg_direction direction) |
| MPI_Comm | xt_redist_get_MPI_Comm (Xt_redist redist) |
| int | xt_redist_get_msg_ranks (Xt_redist redist, enum xt_msg_direction direction, int *restrict *ranks) |
| void | xt_redist_msgs_strided_copy (size_t n, const struct Xt_redist_msg *restrict src, size_t src_stride, struct Xt_redist_msg *restrict dst, size_t dst_stride, MPI_Comm comm) |
| void | xt_redist_msgs_strided_destruct (size_t n, struct Xt_redist_msg *msgs, MPI_Comm comm, size_t ofs_stride) |
| void | xt_redist_check_comms (Xt_redist *redists, int num_redists, MPI_Comm comm) |
| static size_t | xt_ranks_uniq_count (size_t num_rank_sets, const size_t *restrict num_ranks, const int *const ranks[num_rank_sets]) |
| unsigned | xt_redist_agg_msg_count (size_t num_redists, enum xt_msg_direction direction, const Xt_redist redists[num_redists], size_t num_ranks[num_redists], int *restrict ranks[num_redists]) |
| MPI_Datatype | xt_create_compound_datatype (size_t count, const MPI_Aint displacements[count], const MPI_Datatype datatypes[count], const int block_lengths[count], MPI_Comm comm) |
Definition in file xt_redist.c.
| MPI_Datatype xt_create_compound_datatype | ( | size_t | count, |
| const MPI_Aint | displacements[count], | ||
| const MPI_Datatype | datatypes[count], | ||
| const int | block_lengths[count], | ||
| MPI_Comm | comm | ||
| ) |
Generates a new MPI derived datatype from a number of MPI derived datatypes.
| [in] | count | number of datatypes |
| [in] | displacements | byte displacement of each block |
| [in] | datatypes | type of elements in each block |
| [in] | block_lengths | number of elements in each block |
| [in] | comm | communicator |
Definition at line 239 of file xt_redist.c.
|
static |
| void xt_redist_a_exchange | ( | Xt_redist | redist, |
| int | num_arrays, | ||
| const void ** | src_data, | ||
| void ** | dst_data, | ||
| Xt_request * | request | ||
| ) |
asynchronous redistribution of data
| [in] | redist | redistribution structure |
| [in] | num_arrays | number of base addresses in src_data and dst_data |
| [in] | src_data | array containing the addresses of the first elements of the input data |
| [in,out] | dst_data | array containing the addresses of the first elements of the output data |
| [out] | request | pointer to a request object that can be used to complete an asynchronous exchange |
Definition at line 79 of file xt_redist.c.
| void xt_redist_a_exchange1 | ( | Xt_redist | redist, |
| const void * | src_data, | ||
| void * | dst_data, | ||
| Xt_request * | request | ||
| ) |
asynchronous redistribution of data - single array case
| [in] | redist | redistribution structure |
| [in] | src_data | address of the first element of the input data |
| [in,out] | dst_data | address of the first element of the output data |
| [out] | request | pointer to a request object that can be used to complete an asynchronous exchange |
Definition at line 91 of file xt_redist.c.
| unsigned xt_redist_agg_msg_count | ( | size_t | num_redists, |
| enum xt_msg_direction | direction, | ||
| const Xt_redist | redists[num_redists], | ||
| size_t | num_ranks[num_redists], | ||
| int *restrict | ranks[num_redists] | ||
| ) |
Determines number of processes that receive data from/send data to the local processes by any redists provided to this routine.
| [in] | num_redists | number of redistribution objects |
| [in] | direction | specifices whether the of outgoing or incoming message is to be determined |
| [in] | redists | redistribution objects |
| [out] | num_ranks | number of incoming/outgoing messages per redist |
| [out] | ranks | ranks of communicator partners for each redist |
Definition at line 217 of file xt_redist.c.
Checks whether a number of redists are based on the same communicator. This is a requirement in case these redists are to be combined into a redist collection.
| [in] | redists | redistribution objects to be checked |
| [in] | num_redists | number of redistribution objects is redists |
| [in] | comm | reference communicator |
Definition at line 169 of file xt_redist.c.
redist copy constructor
| [in,out] | redist | redistribution structure |
Definition at line 63 of file xt_redist.c.
| void xt_redist_delete | ( | Xt_redist | redist | ) |
destructor
| [in,out] | redist | redistribution structure |
Definition at line 68 of file xt_redist.c.
returns a MPI communicator, which the redistribution is based on
| [in] | redist | redistribution structure |
Definition at line 123 of file xt_redist.c.
| MPI_Datatype xt_redist_get_MPI_Datatype | ( | Xt_redist | redist, |
| int | rank, | ||
| enum xt_msg_direction | direction | ||
| ) |
Gets a MPI derived datatype that encodes all data sent/received in a specified message.
| [in] | redist | redistribution object |
| [in] | rank | MPI rank of the communicator partner |
| [in] | direction | specifices whether the datatype for an outgoing or incoming message is requested |
Definition at line 117 of file xt_redist.c.
| int xt_redist_get_msg_ranks | ( | Xt_redist | redist, |
| enum xt_msg_direction | direction, | ||
| int *restrict * | ranks | ||
| ) |
Gets the ranks of all processes that receive data from/send data to the local process in the exchanges defined by the redist.
| [in] | redist | redistribution object |
| [in] | direction | specifices whether ranks for the outgoing or incoming messages are requested |
| [out] | ranks | ranks for all outgoing/incoming messages |
Definition at line 128 of file xt_redist.c.
| int xt_redist_get_num_recv_msg | ( | Xt_redist | redist | ) |
gets the number of messages received by the local process in an exchange operation
| [in] | redist | redistribution structure |
Definition at line 102 of file xt_redist.c.
| int xt_redist_get_num_send_msg | ( | Xt_redist | redist | ) |
gets the number of messages send from the local process in an exchange operation
| [in] | redist | redistribution structure |
Definition at line 97 of file xt_redist.c.
| MPI_Datatype xt_redist_get_recv_MPI_Datatype | ( | Xt_redist | redist, |
| int | rank | ||
| ) |
gets a copy of the MPI_Datatype used for the data of the recv operation with the given rank
| [in] | redist | redistribution structure |
| [in] | rank | MPI rank |
Definition at line 112 of file xt_redist.c.
| MPI_Datatype xt_redist_get_send_MPI_Datatype | ( | Xt_redist | redist, |
| int | rank | ||
| ) |
gets a copy of the MPI_Datatype used for the data of the send operation with the given rank
| [in] | redist | redistribution structure |
| [in] | rank | MPI rank |
Definition at line 107 of file xt_redist.c.
| void xt_redist_msgs_strided_copy | ( | size_t | n, |
| const struct Xt_redist_msg *restrict | src, | ||
| size_t | src_stride, | ||
| struct Xt_redist_msg *restrict | dst, | ||
| size_t | dst_stride, | ||
| MPI_Comm | comm | ||
| ) |
| void xt_redist_msgs_strided_destruct | ( | size_t | n, |
| struct Xt_redist_msg * | msgs, | ||
| MPI_Comm | comm, | ||
| size_t | ofs_stride | ||
| ) |
| void xt_redist_s_exchange | ( | Xt_redist | redist, |
| int | num_arrays, | ||
| const void ** | src_data, | ||
| void ** | dst_data | ||
| ) |
synchronous redistribution of data
| [in] | redist | redistribution structure |
| [in] | num_arrays | number of base addresses in src_data and dst_data |
| [in] | src_data | array containing the addresses of the first elements of the input data |
| [in,out] | dst_data | array containing the addresses of the first elements of the output data |
Definition at line 73 of file xt_redist.c.
| void xt_redist_s_exchange1 | ( | Xt_redist | redist, |
| const void * | src_data, | ||
| void * | dst_data | ||
| ) |
synchronous redistribution of data - single array case
| [in] | redist | redistribution structure |
| [in] | src_data | address of the first element of the input data |
| [in,out] | dst_data | address of the first element of the output data |
Definition at line 86 of file xt_redist.c.