Yet Another eXchange Tool 0.11.2
Loading...
Searching...
No Matches
xt_mpi.h File Reference

utility routines for MPI More...

#include <mpi.h>
#include <xt/xt_core.h>
Include dependency graph for xt_mpi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define xt_mpi_call(call, comm)
 

Functions

void xt_mpi_error (int error_code, MPI_Comm comm)
 
MPI_Datatype xt_mpi_generate_datatype (int const *displacements, int count, MPI_Datatype old_type, MPI_Comm comm)
 
MPI_Datatype xt_mpi_generate_datatype_block (const int *displacements, const int *blocklengths, int count, MPI_Datatype old_type, MPI_Comm comm)
 
MPI_Datatype xt_mpi_generate_datatype_stripe (const struct Xt_offset_ext *v, int count, MPI_Datatype old_type, MPI_Comm comm)
 
MPI_Datatype xt_mpi_generate_datatype_astripe (const struct Xt_aoffset_ext *v, int count, MPI_Datatype old_type, MPI_Comm comm)
 
void xt_mpi_comm_mark_exclusive (MPI_Comm comm)
 

Detailed Description

utility routines for MPI

contains utility routines for handling MPI

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_mpi.h.

Macro Definition Documentation

◆ xt_mpi_call

Function Documentation

◆ xt_mpi_comm_mark_exclusive()

void xt_mpi_comm_mark_exclusive ( MPI_Comm comm)

Annotate communicator that is for exclusive use by YAXT.

YAXT will trust communicators marked this way to not have active communications other than those initiated by YAXT functions. This is useful to prevent unnecessary MPI_Comm_dup() calls.

Parameters
[in,out]commcommunicator that will not be used by application code
Examples
test_mpi_smartdedup.c, and test_xmap_common.c.

Definition at line 403 of file xt_mpi.c.

Here is the caller graph for this function:

◆ xt_mpi_error()

void xt_mpi_error ( int error_code,
MPI_Comm comm )

report error return of MPI call

Parameters
[in]error_codereturn code of an MPI call
[in]commcommunicator which was used for the respective MPI call

Definition at line 75 of file xt_mpi.c.

◆ xt_mpi_generate_datatype()

MPI_Datatype xt_mpi_generate_datatype ( int const * displacements,
int count,
MPI_Datatype old_type,
MPI_Comm comm )

generates an MPI datatype

Parameters
[in]displacementsarray of displacements
[in]countnumber of elements
[in]old_typebase MPI datatype of all elements
[in]commMPI communicator
Returns
MPI datatype for the given data layout
Remarks
the returned datatype needs to be freed by the user (MPI_Type_free)
Examples
test_mpi_generate_datatype.c.

Definition at line 245 of file xt_mpi_ddt_gen.c.

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

◆ xt_mpi_generate_datatype_astripe()

MPI_Datatype xt_mpi_generate_datatype_astripe ( const struct Xt_aoffset_ext * v,
int count,
MPI_Datatype old_type,
MPI_Comm comm )

generates an MPI datatype

Parameters
[in]varray of byte displacement, stride and length of sub-vectors
[in]countnumber of sub-vectors
[in]old_typebase MPI datatype of all elements
[in]commMPI communicator
Returns
MPI datatype for the given data layout
Remarks
the returned datatype needs to be freed by the user (MPI_Type_free)

◆ xt_mpi_generate_datatype_block()

MPI_Datatype xt_mpi_generate_datatype_block ( const int * displacements,
const int * blocklengths,
int count,
MPI_Datatype old_type,
MPI_Comm comm )

generates an MPI datatype

Parameters
[in]displacementsarray of displacements
[in]blocklengthsarray of block sizes
[in]countnumber of blocks
[in]old_typebase MPI datatype of all elements
[in]commMPI communicator
Returns
MPI datatype for the given data layout
Remarks
the returned datatype needs to be freed by the user (MPI_Type_free)
Examples
test_mpi_generate_datatype.c.

Definition at line 209 of file xt_mpi_ddt_gen.c.

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

◆ xt_mpi_generate_datatype_stripe()

MPI_Datatype xt_mpi_generate_datatype_stripe ( const struct Xt_offset_ext * v,
int count,
MPI_Datatype old_type,
MPI_Comm comm )

generates an MPI datatype

Parameters
[in]varray of displacement, stride and length of sub-vectors
[in]countnumber of sub-vectors
[in]old_typebase MPI datatype of all elements
[in]commMPI communicator
Returns
MPI datatype for the given data layout
Remarks
the returned datatype needs to be freed by the user (MPI_Type_free)