Yet Another eXchange Tool 0.11.4
Loading...
Searching...
No Matches
xt_exchanger_mix_isend_irecv.c File Reference
#include <assert.h>
#include <mpi.h>
#include "core/core.h"
#include "core/ppm_xfuncs.h"
#include "xt_config_internal.h"
#include "xt/xt_mpi.h"
#include "xt/xt_request_msgs.h"
#include "xt_request_msgs_internal.h"
#include "xt_mpi_internal.h"
#include "xt_redist_internal.h"
#include "xt_exchanger.h"
#include "xt_exchanger_mix_isend_irecv.h"
#include "xt_quicksort_base.h"
Include dependency graph for xt_exchanger_mix_isend_irecv.c:

Go to the source code of this file.

Classes

struct  Xt_exchanger_mix_isend_irecv_
 

Macros

#define MSG_DIR(msg)
 
#define XT_SORTFUNC_DECL   static
 
#define SORT_TYPE   struct Xt_redist_msg
 
#define SORT_TYPE_SUFFIX   redist_msg_mix
 
#define SORT_TYPE_CMP_LT(u, v, i, j)
 
#define SORT_TYPE_CMP_LE(u, v, i, j)
 
#define SORT_TYPE_CMP_EQ(u, v, i, j)
 
#define XT_SORT_EXTRA_ARGS_DECL   , int comm_rank, int comm_size
 
#define XT_SORT_EXTRA_ARGS_PASS   , comm_rank, comm_size
 
#define XT_SORT_VECSWAP_EXTRA_ARGS_DECL
 
#define XT_SORT_VECSWAP_EXTRA_ARGS_PASS
 

Typedefs

typedef struct Xt_exchanger_mix_isend_irecv_Xt_exchanger_mix_isend_irecv
 

Enumerations

enum  { max_on_stack_req = 16 }
 

Functions

static Xt_exchanger xt_exchanger_mix_isend_irecv_copy (Xt_exchanger exchanger, MPI_Comm newComm, int new_tag_offset)
 
static void xt_exchanger_mix_isend_irecv_delete (Xt_exchanger exchanger)
 
static void xt_exchanger_mix_isend_irecv_s_exchange (Xt_exchanger exchanger, const void *src_data, void *dst_data)
 
static void xt_exchanger_mix_isend_irecv_a_exchange (Xt_exchanger exchanger, const void *src_data, void *dst_data, Xt_request *request)
 
static Xt_exchanger_omp_share xt_exchanger_mix_isend_irecv_create_omp_share (Xt_exchanger exchanger)
 
static int xt_exchanger_mix_isend_irecv_get_msg_ranks (Xt_exchanger exchanger, enum xt_msg_direction direction, int *restrict *ranks)
 
static MPI_Datatype xt_exchanger_mix_isend_irecv_get_MPI_Datatype (Xt_exchanger exchanger, int rank, enum xt_msg_direction direction, bool do_dup)
 
static Xt_exchanger_mix_isend_irecv xt_exchanger_mix_isend_irecv_alloc (size_t nmsg, Xt_config config)
 
static int adjusted_rank (int r, int comm_rank, int comm_size)
 
Xt_exchanger xt_exchanger_mix_isend_irecv_new (int nsend, int nrecv, const struct Xt_redist_msg *send_msgs, const struct Xt_redist_msg *recv_msgs, MPI_Comm comm, int tag_offset, Xt_config config)
 
static void redist_msgs_to_req (size_t nmsg, const struct Xt_redist_msg *restrict msgs, const void *src_data, void *dst_data, MPI_Request *requests, MPI_Comm comm, int tag_offset)
 

Variables

const struct xt_exchanger_vtable xt_exchanger_mix_isend_irecv_vtable
 

Detailed Description

Macro Definition Documentation

◆ MSG_DIR

#define MSG_DIR ( msg)
Value:
((msg).rank < 0)

Definition at line 139 of file xt_exchanger_mix_isend_irecv.c.

◆ SORT_TYPE

#define SORT_TYPE   struct Xt_redist_msg

Definition at line 178 of file xt_exchanger_mix_isend_irecv.c.

◆ SORT_TYPE_CMP_EQ

#define SORT_TYPE_CMP_EQ ( u,
v,
i,
j )
Value:
(((u).rank & INT_MAX) == ((v).rank & INT_MAX))

Definition at line 186 of file xt_exchanger_mix_isend_irecv.c.

◆ SORT_TYPE_CMP_LE

#define SORT_TYPE_CMP_LE ( u,
v,
i,
j )
Value:
(adjusted_rank((u).rank, comm_rank, comm_size) \
<= adjusted_rank((v).rank, comm_rank, comm_size))
static int adjusted_rank(int r, int comm_rank, int comm_size)

Definition at line 183 of file xt_exchanger_mix_isend_irecv.c.

◆ SORT_TYPE_CMP_LT

#define SORT_TYPE_CMP_LT ( u,
v,
i,
j )
Value:
(adjusted_rank((u).rank, comm_rank, comm_size) \
< adjusted_rank((v).rank, comm_rank, comm_size))

Definition at line 180 of file xt_exchanger_mix_isend_irecv.c.

◆ SORT_TYPE_SUFFIX

#define SORT_TYPE_SUFFIX   redist_msg_mix

Definition at line 179 of file xt_exchanger_mix_isend_irecv.c.

◆ XT_SORT_EXTRA_ARGS_DECL

#define XT_SORT_EXTRA_ARGS_DECL   , int comm_rank, int comm_size

Definition at line 188 of file xt_exchanger_mix_isend_irecv.c.

◆ XT_SORT_EXTRA_ARGS_PASS

#define XT_SORT_EXTRA_ARGS_PASS   , comm_rank, comm_size

Definition at line 189 of file xt_exchanger_mix_isend_irecv.c.

◆ XT_SORT_VECSWAP_EXTRA_ARGS_DECL

#define XT_SORT_VECSWAP_EXTRA_ARGS_DECL

Definition at line 190 of file xt_exchanger_mix_isend_irecv.c.

◆ XT_SORT_VECSWAP_EXTRA_ARGS_PASS

#define XT_SORT_VECSWAP_EXTRA_ARGS_PASS

Definition at line 191 of file xt_exchanger_mix_isend_irecv.c.

◆ XT_SORTFUNC_DECL

#define XT_SORTFUNC_DECL   static

Definition at line 177 of file xt_exchanger_mix_isend_irecv.c.

Typedef Documentation

◆ Xt_exchanger_mix_isend_irecv

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
max_on_stack_req 

Definition at line 270 of file xt_exchanger_mix_isend_irecv.c.

Function Documentation

◆ adjusted_rank()

static int adjusted_rank ( int r,
int comm_rank,
int comm_size )
inlinestatic

Definition at line 171 of file xt_exchanger_mix_isend_irecv.c.

◆ redist_msgs_to_req()

static void redist_msgs_to_req ( size_t nmsg,
const struct Xt_redist_msg *restrict msgs,
const void * src_data,
void * dst_data,
MPI_Request * requests,
MPI_Comm comm,
int tag_offset )
inlinestatic

Definition at line 286 of file xt_exchanger_mix_isend_irecv.c.

Here is the caller graph for this function:

◆ xt_exchanger_mix_isend_irecv_a_exchange()

static void xt_exchanger_mix_isend_irecv_a_exchange ( Xt_exchanger exchanger,
const void * src_data,
void * dst_data,
Xt_request * request )
static

Definition at line 328 of file xt_exchanger_mix_isend_irecv.c.

Here is the call graph for this function:

◆ xt_exchanger_mix_isend_irecv_alloc()

static Xt_exchanger_mix_isend_irecv xt_exchanger_mix_isend_irecv_alloc ( size_t nmsg,
Xt_config config )
static

Definition at line 151 of file xt_exchanger_mix_isend_irecv.c.

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

◆ xt_exchanger_mix_isend_irecv_copy()

static Xt_exchanger xt_exchanger_mix_isend_irecv_copy ( Xt_exchanger exchanger,
MPI_Comm newComm,
int new_tag_offset )
static

Definition at line 250 of file xt_exchanger_mix_isend_irecv.c.

Here is the call graph for this function:

◆ xt_exchanger_mix_isend_irecv_create_omp_share()

static Xt_exchanger_omp_share xt_exchanger_mix_isend_irecv_create_omp_share ( Xt_exchanger exchanger)
static

Definition at line 423 of file xt_exchanger_mix_isend_irecv.c.

Here is the call graph for this function:

◆ xt_exchanger_mix_isend_irecv_delete()

static void xt_exchanger_mix_isend_irecv_delete ( Xt_exchanger exchanger)
static

Definition at line 272 of file xt_exchanger_mix_isend_irecv.c.

Here is the call graph for this function:

◆ xt_exchanger_mix_isend_irecv_get_MPI_Datatype()

static MPI_Datatype xt_exchanger_mix_isend_irecv_get_MPI_Datatype ( Xt_exchanger exchanger,
int rank,
enum xt_msg_direction direction,
bool do_dup )
static

Definition at line 455 of file xt_exchanger_mix_isend_irecv.c.

Here is the call graph for this function:

◆ xt_exchanger_mix_isend_irecv_get_msg_ranks()

static int xt_exchanger_mix_isend_irecv_get_msg_ranks ( Xt_exchanger exchanger,
enum xt_msg_direction direction,
int *restrict * ranks )
static

Definition at line 435 of file xt_exchanger_mix_isend_irecv.c.

◆ xt_exchanger_mix_isend_irecv_new()

Xt_exchanger xt_exchanger_mix_isend_irecv_new ( int nsend,
int nrecv,
const struct Xt_redist_msg * send_msgs,
const struct Xt_redist_msg * recv_msgs,
MPI_Comm comm,
int tag_offset,
Xt_config config )

Constructor for an exchanger using asynchronous send and recv. The order in which the send's and recv's are called are optimised to reduce network congestion and improve performance.

Parameters
[in]nsendnumber of send messages
[in]nrecvnumber of receive messages
[in]send_msgsarray with send messages
[in]recv_msgsarray with receive messages
[in]commMPI communicator that is to be used for the communication
[in]tag_offsettag
[in]configoptional customization parameters
Remarks
tag_offset + xt_mpi_tag_exchange_msg must not be used on comm by any other part of the program during the lifetime of the created exchanger object

note: tag_offset + xt_mpi_tag_exchange_msg must not be used on comm by any other part of the program during the lifetime of the created exchanger object

Examples
test_exchanger_parallel.c.

Definition at line 197 of file xt_exchanger_mix_isend_irecv.c.

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

◆ xt_exchanger_mix_isend_irecv_s_exchange()

static void xt_exchanger_mix_isend_irecv_s_exchange ( Xt_exchanger exchanger,
const void * src_data,
void * dst_data )
static

Definition at line 305 of file xt_exchanger_mix_isend_irecv.c.

Here is the call graph for this function:

Variable Documentation

◆ xt_exchanger_mix_isend_irecv_vtable

const struct xt_exchanger_vtable xt_exchanger_mix_isend_irecv_vtable
Initial value:
= {
}
static MPI_Datatype xt_exchanger_mix_isend_irecv_get_MPI_Datatype(Xt_exchanger exchanger, int rank, enum xt_msg_direction direction, bool do_dup)
static void xt_exchanger_mix_isend_irecv_a_exchange(Xt_exchanger exchanger, const void *src_data, void *dst_data, Xt_request *request)
static void xt_exchanger_mix_isend_irecv_delete(Xt_exchanger exchanger)
static int xt_exchanger_mix_isend_irecv_get_msg_ranks(Xt_exchanger exchanger, enum xt_msg_direction direction, int *restrict *ranks)
static void xt_exchanger_mix_isend_irecv_s_exchange(Xt_exchanger exchanger, const void *src_data, void *dst_data)
static Xt_exchanger xt_exchanger_mix_isend_irecv_copy(Xt_exchanger exchanger, MPI_Comm newComm, int new_tag_offset)
static Xt_exchanger_omp_share xt_exchanger_mix_isend_irecv_create_omp_share(Xt_exchanger exchanger)

Definition at line 114 of file xt_exchanger_mix_isend_irecv.c.