Yet Another eXchange Tool 0.11.3
Loading...
Searching...
No Matches
Functions
xt_exchanger.c File Reference
#include <string.h>
#include <stdlib.h>
#include "xt/xt_mpi.h"
#include "xt_exchanger.h"
#include "xt_exchanger_irecv_isend.h"
#include "xt_exchanger_mix_isend_irecv.h"
#include "xt_exchanger_irecv_isend_packed.h"
#include "xt_exchanger_irecv_isend_ddt_packed.h"
#include "xt_exchanger_neigh_alltoall.h"
Include dependency graph for xt_exchanger.c:

Go to the source code of this file.

Functions

Xt_exchanger xt_exchanger_copy (Xt_exchanger exchanger, MPI_Comm new_comm, int new_tag_offset)
 
void xt_exchanger_delete (Xt_exchanger exchanger)
 
void xt_exchanger_s_exchange (Xt_exchanger exchanger, const void *src_data, void *dst_data)
 
void xt_exchanger_a_exchange (Xt_exchanger exchanger, const void *src_data, void *dst_data, Xt_request *request)
 
int xt_exchanger_get_msg_ranks (Xt_exchanger exchanger, enum xt_msg_direction direction, int *restrict *ranks)
 
MPI_Datatype xt_exchanger_get_MPI_Datatype (Xt_exchanger exchanger, int rank, enum xt_msg_direction direction, bool do_dup)
 
Xt_exchanger_omp_share xt_exchanger_create_omp_share (Xt_exchanger exchanger)
 

Detailed Description

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_exchanger.c.

Function Documentation

◆ xt_exchanger_a_exchange()

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

Executes an asynchronous data exchange.

Parameters
[in]exchangerexchanger object
[in]src_datasource data
[out]dst_datadestination data
[out]requestpointer that will reference request object created for duration of exchange
Examples
test_exchanger_parallel.c.

Definition at line 77 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_copy()

Xt_exchanger xt_exchanger_copy ( Xt_exchanger orig,
MPI_Comm new_comm,
int new_tag_offset )

Copies an exchange object.

Parameters
[in]origexchanger object to be copied
[in]new_commcommunicator to be used by the new exchanger
[in]new_tag_offsetnew tag_offset

Definition at line 62 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_create_omp_share()

Xt_exchanger_omp_share xt_exchanger_create_omp_share ( Xt_exchanger exchanger)

Given an exchanger, create an object holding shared data for multi-threaded invocation.

Parameters
[in]exchangerexchanger to prepare the shared data for.

Definition at line 99 of file xt_exchanger.c.

◆ xt_exchanger_delete()

void xt_exchanger_delete ( Xt_exchanger exchanger)

Destructor for an exchanger.

Examples
test_exchanger_parallel.c.

Definition at line 67 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_get_MPI_Datatype()

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

gets a copy of the MPI_Datatype used for a specificed message

Parameters
[in]exchangerexchanger object
[in]rankMPI rank
[in]directionspecific whether the datatype of an incoming or outgoing message is requested
[in]do_dupmpi datatype copy will be dup if true
Returns
MPI_Datatype for the specificed message
Remarks
returns MPI_DATATYPE_NULL if there is no message matching the specificed configuration

Definition at line 93 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_get_msg_ranks()

int xt_exchanger_get_msg_ranks ( Xt_exchanger exchanger,
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 specificed message.

Parameters
[in]exchangerexchanger object
[in]directionspecifices whether ranks for the outgoing or incoming messages are requested
[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

Definition at line 85 of file xt_exchanger.c.

Here is the caller graph for this function:

◆ xt_exchanger_s_exchange()

void xt_exchanger_s_exchange ( Xt_exchanger exchanger,
const void * src_data,
void * dst_data )

Executes a synchronous data exchange.

Parameters
[in]exchangerexchanger object
[in]src_datasource data
[out]dst_datadestination data
Examples
test_exchanger_parallel.c.

Definition at line 72 of file xt_exchanger.c.

Here is the caller graph for this function: