Yet Another eXchange Tool 0.11.1
|
implementation of configuration object More...
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <mpi.h>
#include <xt/xt_config.h>
#include <xt/xt_mpi.h>
#include "xt_config_internal.h"
#include "xt_exchanger_irecv_send.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 "xt_idxlist_internal.h"
#include "xt/quicksort.h"
#include "xt/mergesort.h"
#include "xt/xt_xmap_dist_dir_bucket_gen.h"
#include "xt_xmap_dist_dir_bucket_gen_cycl_stripe.h"
#include "xt_xmap_dist_dir_bucket_gen_internal.h"
#include "core/core.h"
#include "core/ppm_xfuncs.h"
Go to the source code of this file.
Enumerations | |
enum | { num_exchanger = sizeof (exchanger_table) / sizeof (exchanger_table[0]) } |
enum | { num_sort_algo = sizeof (sort_algo_table) / sizeof (sort_algo_table[0]) } |
Variables | ||
static const char | filename [] = "xt_config.c" | |
struct { | ||
char name [32] | ||
Xt_exchanger_new f | ||
int code | ||
} | exchanger_table [] | |
struct { | ||
char name [16] | ||
struct Xt_sort_algo_funcptr func | ||
} | sort_algo_table [] | |
struct Xt_config_ | xt_default_config | |
implementation of configuration object
Definition in file xt_config.c.
anonymous enum |
Enumerator | |
---|---|
num_exchanger |
Definition at line 120 of file xt_config.c.
anonymous enum |
Enumerator | |
---|---|
num_sort_algo |
Definition at line 199 of file xt_config.c.
|
inlinestatic |
|
inlinestatic |
void xt_config_defaults_init | ( | void | ) |
Definition at line 443 of file xt_config.c.
void xt_config_delete | ( | Xt_config | config | ) |
destructor of configuration objects
[in,out] | config | configuration object to destroy |
Definition at line 84 of file xt_config.c.
int xt_config_get_dist_dir_stripe_alignment | ( | Xt_config | config | ) |
Get distributed directory stripe alignment parameter.
[in] | config | configuration object to query |
Definition at line 379 of file xt_config.c.
int xt_config_get_exchange_method | ( | Xt_config | config | ) |
get exchanger used when the config object is passed to constructors
[in] | config | configuration object to query |
Definition at line 143 of file xt_config.c.
Xt_exchanger_new xt_config_get_exchange_new_by_comm | ( | Xt_config | config, |
MPI_Comm | comm | ||
) |
Get appropriate exchanger constructor.
config | configuration object |
comm | communicator to use the constructor with |
Definition at line 157 of file xt_config.c.
int xt_config_get_idxvec_autoconvert_size | ( | Xt_config | config | ) |
query size above which index lists of vector type will be converted
For many operations it makes sense to first compress large index vectors to stripes before continuing further computations.
[in] | config | configuration object to query |
Definition at line 325 of file xt_config.c.
int xt_config_get_mem_saving | ( | Xt_config | config | ) |
Get memory conservation parameter.
[in] | config | configuration object to query |
Definition at line 267 of file xt_config.c.
int xt_config_get_redist_mthread_mode | ( | Xt_config | config | ) |
query multi-thread mode of message passing
[in] | config | configuration object to query |
Definition at line 338 of file xt_config.c.
int xt_config_get_sort_algorithm_id | ( | Xt_config | config | ) |
query sorting algorithm suite
[in] | config | configuration object to query |
Definition at line 231 of file xt_config.c.
Xt_xmdd_bucket_gen xt_config_get_xmdd_bucket_gen | ( | Xt_config | config | ) |
Query configured bucket generator
Definition at line 274 of file xt_config.c.
Xt_config xt_config_new | ( | void | ) |
constructor for configuration object
Definition at line 77 of file xt_config.c.
void xt_config_set_dist_dir_stripe_alignment | ( | Xt_config | config, |
int | use_stripe_alignment | ||
) |
Set distributed directory stripe alignment parameter.
[in,out] | config | configuration object to modify |
use_stripe_alignment | 0: detect element positions one by one, 1: align full stripes to form position extents 2: automatically choose element of stripe alignment |
When set to 1, the computations in the distributed directory-based constructor can be much more expensive if stripes are very short. When set to 0, use very simple algorithm that positions each element individually but will use memory proportional to the local index list sizes.
By default the distributed directory switches automatically to stripe alignment if it appears profitable, which might be untrue if the number of resulting stripes/extents is rather high.
Definition at line 369 of file xt_config.c.
void xt_config_set_exchange_method | ( | Xt_config | config, |
int | method | ||
) |
set exchanger to use when the config object is passed to constructors
[in,out] | config | configuration object to modify |
method | an entry from enum Xt_exchangers to signify the desired exchanger for data transfers |
Definition at line 295 of file xt_config.c.
void xt_config_set_idxvec_autoconvert_size | ( | Xt_config | config, |
int | cnvsize | ||
) |
set size above which index lists of vector type will be converted
For many operations it makes sense to first compress large index vectors to stripes before continuing further computations. This function sets the size of vectors at which this conversion happens for operations that are called with the configuration object as parameter.
[in,out] | config | configuration object to modify |
[in] | cnvsize | size of vectors at which conversion happens |
Definition at line 331 of file xt_config.c.
void xt_config_set_mem_saving | ( | Xt_config | config, |
int | memconserve | ||
) |
Set memory conservation parameter.
[in,out] | config | configuration object to modify |
memconserve | switch on methods of memory saving currently supported values: 0 and 1 |
When set to 1, operations parameterized by config will aggressively try to trade memory savings for higher computational cost.
Currently, by not sorting index lists used in xmap construction.
When set to 0, use default trade-offs for space vs. time complexity.
Definition at line 258 of file xt_config.c.
void xt_config_set_redist_mthread_mode | ( | Xt_config | config, |
int | mode | ||
) |
set multi-thread mode of message passing
[in,out] | config | configuration object to modify |
[in] | mode | one of the enum Xt_mthread_mode members above |
Definition at line 345 of file xt_config.c.
void xt_config_set_sort_algorithm_by_id | ( | Xt_config | config, |
int | algo | ||
) |
set sorting algorithm suite
[in,out] | config | configuration object to modify |
[in] | algo | one of the enum Xt_sort_algorithm members above |
Definition at line 244 of file xt_config.c.
void xt_config_set_xmdd_bucket_gen | ( | Xt_config | config, |
Xt_xmdd_bucket_gen | bucket_gen_iface | ||
) |
Change generator for buckets in distributed directory The default is a generator that tiles the range of indices of all index lists involved in xmap creation in 1D fashion with stripes.
Definition at line 280 of file xt_config.c.
int xt_exchanger_id_by_name | ( | const char * | name | ) |
map exchanger name string to method id from Xt_exchangers
[in] | name | string that is supposed to match the part of the corresponding enum after xt_exchanger_ |
Definition at line 125 of file xt_config.c.
int xt_sort_algo_id_by_name | ( | const char * | name | ) |
Definition at line 214 of file xt_config.c.
int code |
Definition at line 94 of file xt_config.c.
const struct { ... } exchanger_table[] |
Definition at line 93 of file xt_config.c.
|
static |
Definition at line 75 of file xt_config.c.
struct Xt_sort_algo_funcptr func |
Definition at line 175 of file xt_config.c.
char name[16] |
Definition at line 92 of file xt_config.c.
const struct { ... } sort_algo_table[] |
struct Xt_config_ xt_default_config |
Definition at line 203 of file xt_config.c.