Yet Another eXchange Tool
0.9.0
|
#include <assert.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <mpi.h>
#include "core/core.h"
#include "core/ppm_xfuncs.h"
#include "xt/xt_core.h"
#include "xt/xt_mpi.h"
#include "xt_mpi_internal.h"
Go to the source code of this file.
Classes | |
struct | xt_mpi_comm_internal_attr |
Macros | |
#define | COMPACT_DT |
Typedefs | |
typedef unsigned long | used_map_elem |
Enumerations | |
enum | { used_map_elem_bits = sizeof (used_map_elem) * CHAR_BIT } |
Functions | |
static MPI_Datatype | xt_mpi_generate_compact_datatype_block (const int *disp, const int *blocklengths, int count, MPI_Datatype old_type) |
static MPI_Datatype | xt_mpi_generate_compact_datatype (int const *disp, int disp_len, MPI_Datatype old_type) |
void | xt_mpi_error (int error_code, 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 (int const *displacements, int count, MPI_Datatype old_type, MPI_Comm comm) |
static size_t | scan_stripe (const int *disp, size_t disp_len, struct Xt_offset_ext *restrict v) |
static int | match_simple_vec (size_t *pstart_, const struct Xt_offset_ext *v, size_t vlen, MPI_Datatype old_type, int *disp, MPI_Datatype *dt) |
static bool | match_block_vec (size_t *pstart_, const struct Xt_offset_ext *v, size_t vlen, MPI_Datatype old_type, int *disp, MPI_Datatype *dt) |
static bool | match_contiguous (size_t *pstart_, const struct Xt_offset_ext *v, size_t vlen, MPI_Datatype old_type, int *restrict disp, MPI_Datatype *dt) |
static bool | match_indexed (size_t *pstart_, const struct Xt_offset_ext *v, size_t vlen, MPI_Datatype old_type, int *disp, MPI_Datatype *dt) |
static int | gen_fallback_type (size_t set_start, size_t set_end, const struct Xt_offset_ext *v, size_t vlen, MPI_Datatype old_type, int *offset, MPI_Datatype *dt) |
static MPI_Datatype | parse_stripe (const struct Xt_offset_ext *v, size_t vlen, MPI_Datatype old_type) |
MPI_Datatype | xt_mpi_generate_datatype_stripe (const struct Xt_offset_ext *v, int count, MPI_Datatype old_type, MPI_Comm XT_UNUSED(comm)) |
static int | xt_mpi_comm_internal_keyval_copy (MPI_Comm XT_UNUSED(oldcomm), int XT_UNUSED(keyval), void *XT_UNUSED(extra_state), void *XT_UNUSED(attribute_val_in), void *attribute_val_out, int *flag) |
static int | xt_mpi_comm_internal_keyval_delete (MPI_Comm XT_UNUSED(comm), int XT_UNUSED(comm_keyval), void *attribute_val, void *XT_UNUSED(extra_state)) |
void | xt_mpi_init (void) |
void | xt_mpi_finalize (void) |
static struct xt_mpi_comm_internal_attr * | xt_mpi_comm_get_internal_attr (MPI_Comm comm) |
static int | ctzl (unsigned long v) |
MPI_Comm | xt_mpi_comm_smart_dup (MPI_Comm comm, int *tag_offset) |
void | xt_mpi_comm_smart_dedup (MPI_Comm *comm, int tag_offset) |
void | xt_mpi_comm_mark_exclusive (MPI_Comm comm) |
bool | xt_mpi_test_some (int *restrict num_req, MPI_Request *restrict req, int *restrict ops_completed, MPI_Comm comm) |
Variables | |
int | xt_mpi_comm_internal_keyval |
static int | xt_mpi_tag_ub_val |
Definition in file xt_mpi.c.
#define COMPACT_DT |
COMPACT_DT enables the anlysis of displacements in order to give a more compact description to the datatype generators of MPI. For strong enough MPI implementations this not required. Then you can undefine COMPACT_DT and save some prcessing time within yaxt without losing communication performance.
typedef unsigned long used_map_elem |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
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.
[in,out] | comm | communicator that will not be used by application code |
Definition at line 881 of file xt_mpi.c.
void xt_mpi_comm_smart_dedup | ( | MPI_Comm * | comm, |
int | tag_offset | ||
) |
Definition at line 864 of file xt_mpi.c.
Definition at line 813 of file xt_mpi.c.
void xt_mpi_error | ( | int | error_code, |
MPI_Comm | comm | ||
) |
void xt_mpi_finalize | ( | void | ) |
|
static |
|
static |
MPI_Datatype xt_mpi_generate_datatype | ( | int const * | displacements, |
int | count, | ||
MPI_Datatype | old_type, | ||
MPI_Comm | comm | ||
) |
generates an MPI datatype
[in] | displacements | array of displacements |
[in] | count | number of elements |
[in] | old_type | base MPI datatype of all elements |
[in] | comm | MPI communicator |
Definition at line 264 of file xt_mpi.c.
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
[in] | displacements | array of displacements |
[in] | blocklengths | array of block sizes |
[in] | count | number of blocks |
[in] | old_type | base MPI datatype of all elements |
[in] | comm | MPI communicator |
Definition at line 227 of file xt_mpi.c.
MPI_Datatype xt_mpi_generate_datatype_stripe | ( | const struct Xt_offset_ext * | v, |
int | count, | ||
MPI_Datatype | old_type, | ||
MPI_Comm | XT_UNUSEDcomm | ||
) |
void xt_mpi_init | ( | void | ) |
bool xt_mpi_test_some | ( | int *restrict | num_req, |
MPI_Request *restrict | req, | ||
int *restrict | ops_completed, | ||
MPI_Comm | comm | ||
) |