Yet Another eXchange Tool 0.11.1
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
xt_redist_internal.h File Reference

redistribution of data, non-public declarations More...

#include <stdbool.h>
#include <stdlib.h>
#include <mpi.h>
#include "core/ppm_visibility.h"
#include "xt/xt_redist.h"
#include "xt/xt_request.h"
#include "xt/xt_config.h"
#include "xt_mpi_ddt_cache.h"
Include dependency graph for xt_redist_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xt_redist_vtable
 
struct  Xt_redist_
 

Enumerations

enum  xt_msg_direction { SEND , RECV }
 

Functions

PPM_DSO_INTERNAL 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, bool dt_dup)
 
PPM_DSO_INTERNAL void xt_redist_msgs_strided_destruct (size_t n, struct Xt_redist_msg *msgs, MPI_Comm comm, size_t ofs_stride)
 
static void xt_redist_msgs_free (size_t n, struct Xt_redist_msg *msgs, MPI_Comm comm)
 
PPM_DSO_INTERNAL void xt_redist_check_comms (Xt_redist *redists, int num_redists, MPI_Comm comm)
 
PPM_DSO_INTERNAL int xt_redist_get_msg_ranks (Xt_redist redist, enum xt_msg_direction direction, int *restrict *ranks)
 
PPM_DSO_INTERNAL MPI_Datatype xt_redist_get_MPI_Datatype (Xt_redist redist, int rank, enum xt_msg_direction direction, bool do_dup)
 
PPM_DSO_INTERNAL MPI_Datatype xt_create_compound_datatype (size_t count, const MPI_Aint displacements[count], const MPI_Datatype datatypes[count], const int block_lengths[count], struct Xt_mpiddt_list *ddt_list, MPI_Comm comm)
 
PPM_DSO_INTERNAL 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], Xt_config config)
 

Detailed Description

redistribution of data, non-public declarations

contains declaration the redistribution data structure, which is derived from one or more xt_xmaps

Author
Jörg Behrens behre.nosp@m.ns@d.nosp@m.krz.d.nosp@m.e Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file xt_redist_internal.h.

Enumeration Type Documentation

◆ xt_msg_direction

Enumerator
SEND 
RECV 

Definition at line 67 of file xt_redist_internal.h.

Function Documentation

◆ xt_create_compound_datatype()

PPM_DSO_INTERNAL MPI_Datatype xt_create_compound_datatype ( size_t  count,
const MPI_Aint  displacements[count],
const MPI_Datatype  datatypes[count],
const int  block_lengths[count],
struct Xt_mpiddt_list ddt_list,
MPI_Comm  comm 
)

Generates a new MPI derived datatype from a number of MPI derived datatypes.

Parameters
[in]countnumber of datatypes
[in]displacementsbyte displacement of each block
[in]datatypestype of elements in each block
[in]block_lengthsnumber of elements in each block
[in,out]ddt_listpointer to optional cache of datatypes to re-use
[in]commcommunicator
Returns
new MPI derived datatype

Definition at line 229 of file xt_redist.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_redist_agg_msg_count()

PPM_DSO_INTERNAL 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],
Xt_config  config 
)

Determines number of processes that receive data from/send data to the local processes by any redists provided to this routine.

Parameters
[in]num_redistsnumber of redistribution objects
[in]directionspecifices whether the of outgoing or incoming message is to be determined
[in]redistsredistribution objects
[out]num_ranksnumber of incoming/outgoing messages per redist
[out]ranksranks of communicator partners for each redist
Returns
Number of processes that receive data from/send data to the local process.
Remarks
the user needs to ensure that rank arrays are big enough to hold all ranks

Definition at line 190 of file xt_redist.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_redist_check_comms()

PPM_DSO_INTERNAL void xt_redist_check_comms ( Xt_redist redists,
int  num_redists,
MPI_Comm  comm 
)

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.

Parameters
[in]redistsredistribution objects to be checked
[in]num_redistsnumber of redistribution objects is redists
[in]commreference communicator
Remarks
In case this check fails, it will abort the program.

Definition at line 142 of file xt_redist.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_redist_get_MPI_Datatype()

PPM_DSO_INTERNAL MPI_Datatype xt_redist_get_MPI_Datatype ( Xt_redist  redist,
int  rank,
enum xt_msg_direction  direction,
bool  do_dup 
)

Gets a MPI derived datatype that encodes all data sent/received in a specified message.

Parameters
[in]redistredistribution object
[in]rankMPI rank of the communicator partner
[in]directionspecifices whether the datatype for an outgoing or incoming message is requested
[in]do_dupif true only return MPI_Datatype_dup of internally stored datatype
Returns
Datatype for the specified message. The return value is MPI_DATATYPE_NULL, if no data for the specified message.

Definition at line 122 of file xt_redist.c.

Here is the caller graph for this function:

◆ xt_redist_get_msg_ranks()

PPM_DSO_INTERNAL 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.

Parameters
[in]redistredistribution object
[in]directionspecifices whether ranks for the outgoing or incoming messages are requested
[in,out]ranksranks for all outgoing/incoming messages
Returns
number of outgoing/incoming message
Remarks
the user needs to ensure that array ranks is big enough to hold all ranks, each element of ranks must be either a pointer to a valid output array or NULL, in which case it will be allocated

Definition at line 134 of file xt_redist.c.

Here is the caller graph for this function:

◆ xt_redist_msgs_free()

static void xt_redist_msgs_free ( size_t  n,
struct Xt_redist_msg msgs,
MPI_Comm  comm 
)
inlinestatic

Definition at line 101 of file xt_redist_internal.h.

Here is the call graph for this function:

◆ xt_redist_msgs_strided_copy()

PPM_DSO_INTERNAL 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,
bool  dt_dup 
)

Definition at line 54 of file xt_redist_msg.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_redist_msgs_strided_destruct()

PPM_DSO_INTERNAL void xt_redist_msgs_strided_destruct ( size_t  n,
struct Xt_redist_msg msgs,
MPI_Comm  comm,
size_t  ofs_stride 
)

Definition at line 77 of file xt_redist_msg.c.

Here is the call graph for this function:
Here is the caller graph for this function: