Commit 840ba113 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Pass through configuration object to exchanger creation.

* This will enable saving MPI_Type_dup calls later on, where
  ownership can be simply transferred.
parent 4cb21f44
......@@ -67,6 +67,7 @@
struct Xt_config_ xt_default_config = {
.exchanger_new = xt_exchanger_mix_isend_irecv_new,
.idxv_cnv_size = CHEAP_VECTOR_SIZE,
.flags = 0,
};
Xt_config xt_config_new(void)
......
......@@ -48,6 +48,8 @@
#include <config.h>
#endif
#include <stdint.h>
#include <mpi.h>
#include "core/ppm_visibility.h"
......@@ -55,6 +57,11 @@
#include "xt/xt_config.h"
#include "xt_exchanger.h"
enum xt_config_flags {
exch_no_dt_dup = (1 << 0),
};
struct Xt_config_ {
/**
* constructor to use when creating the exchanger of a redist
......@@ -65,6 +72,9 @@ struct Xt_config_ {
* into another representation to save on computation/memory overall
*/
int idxv_cnv_size;
/**
* binary combination of xt_config_flags */
int32_t flags;
};
extern struct Xt_config_ xt_default_config;
......
......@@ -54,6 +54,7 @@
#include <stdbool.h>
#include <mpi.h>
#include "xt/xt_config.h"
#include "xt/xt_core.h"
#include "xt/xt_request.h"
#include "xt_redist_internal.h"
......@@ -159,7 +160,8 @@ typedef Xt_exchanger
(*Xt_exchanger_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);
MPI_Comm comm, int tag_offset,
Xt_config config);
#endif // XT_EXCHANGER_H
/*
......
......@@ -48,6 +48,7 @@
#endif
#include "core/ppm_xfuncs.h"
#include "xt_config_internal.h"
#include "xt/xt_mpi.h"
#include "xt/xt_request_msgs.h"
#include "xt_mpi_internal.h"
......@@ -116,7 +117,8 @@ Xt_exchanger
xt_exchanger_irecv_isend_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) {
MPI_Comm comm, int tag_offset,
Xt_config config) {
/** note: tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
......@@ -125,7 +127,8 @@ xt_exchanger_irecv_isend_new(int nsend, int nrecv,
return xt_exchanger_simple_base_new(nsend, nrecv, send_msgs, recv_msgs,
comm, tag_offset,
xt_exchanger_irecv_isend_s_exchange,
xt_exchanger_irecv_isend_a_exchange);
xt_exchanger_irecv_isend_a_exchange,
config);
}
......
......@@ -50,6 +50,7 @@
#include <config.h>
#endif
#include "xt/xt_config.h"
#include "xt/xt_core.h"
#include "xt_exchanger.h"
#include "xt_redist_internal.h"
......@@ -63,6 +64,7 @@
* @param[in] comm MPI communicator that is to be used for the
* communication
* @param[in] tag_offset tag
* @param[in] config optional customization parameters
* @remark tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
* lifetime of the created exchanger object
......@@ -71,7 +73,8 @@ Xt_exchanger
xt_exchanger_irecv_isend_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);
MPI_Comm comm, int tag_offset,
Xt_config config);
#endif // XT_EXCHANGER_IRECV_ISEND_H
......
......@@ -60,8 +60,8 @@ xt_exchanger_irecv_isend_packed_s_exchange(
const void *src_data, void *dst_data,
int nsend, int nrecv,
const struct Xt_redist_msg *send_msgs, const struct Xt_redist_msg *recv_msgs,
int tag_offset, MPI_Comm comm) {
int tag_offset, MPI_Comm comm)
{
enum { AUTO_ALLOC_SIZE = 32, };
MPI_Request *requests, requests_auto[AUTO_ALLOC_SIZE];
int *buffer_sizes, buffer_sizes_auto[AUTO_ALLOC_SIZE];
......@@ -182,8 +182,9 @@ Xt_exchanger
xt_exchanger_irecv_isend_packed_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) {
MPI_Comm comm, int tag_offset,
Xt_config config)
{
/** note: tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
* lifetime of the created exchanger object
......@@ -191,7 +192,8 @@ xt_exchanger_irecv_isend_packed_new(int nsend, int nrecv,
return xt_exchanger_simple_base_new(nsend, nrecv, send_msgs, recv_msgs,
comm, tag_offset,
xt_exchanger_irecv_isend_packed_s_exchange,
xt_exchanger_irecv_isend_packed_a_exchange);
xt_exchanger_irecv_isend_packed_a_exchange,
config);
}
/*
......
......@@ -51,6 +51,7 @@
#endif
#include "xt/xt_core.h"
#include "xt/xt_config.h"
#include "xt_exchanger.h"
#include "xt_redist_internal.h"
......@@ -65,6 +66,7 @@
* @param[in] comm MPI communicator that is to be used for the
* communication
* @param[in] tag_offset tag
* @param[in] config optional customization parameters
* @remark tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
* lifetime of the created exchanger object
......@@ -73,7 +75,8 @@ Xt_exchanger
xt_exchanger_irecv_isend_packed_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);
MPI_Comm comm, int tag_offset,
Xt_config config);
#endif // XT_EXCHANGER_IRECV_ISEND_PACKED_H
......
......@@ -85,8 +85,8 @@ Xt_exchanger
xt_exchanger_irecv_send_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) {
MPI_Comm comm, int tag_offset, Xt_config config)
{
/** note: tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
* lifetime of the created exchanger object
......@@ -94,7 +94,7 @@ xt_exchanger_irecv_send_new(int nsend, int nrecv,
return xt_exchanger_simple_base_new(nsend, nrecv, send_msgs, recv_msgs,
comm, tag_offset,
xt_exchanger_irecv_send_s_exchange,
NULL);
NULL, config);
}
/*
......
......@@ -63,6 +63,7 @@
* @param[in] comm MPI communicator that is to be used for the
* communication
* @param[in] tag_offset tag
* @param[in] config optional customization parameters
* @remark tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
* lifetime of the created exchanger object
......@@ -71,7 +72,8 @@ Xt_exchanger
xt_exchanger_irecv_send_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);
MPI_Comm comm, int tag_offset,
Xt_config config);
#endif // XT_EXCHANGER_IRECV_SEND_H
......
......@@ -52,6 +52,7 @@
#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_mpi_internal.h"
......@@ -127,8 +128,9 @@ 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) {
MPI_Comm comm, int tag_offset,
Xt_config config)
{
/** note: tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
* lifetime of the created exchanger object
......@@ -141,12 +143,14 @@ xt_exchanger_mix_isend_irecv_new(int nsend, int nrecv,
exchanger->comm = comm;
exchanger->tag_offset = tag_offset;
struct mix_msg *restrict msgs = exchanger->msgs;
bool dt_dup = !(config->flags & exch_no_dt_dup);
xt_redist_msgs_strided_copy((size_t)nsend, send_msgs, sizeof (send_msgs[0]),
&(msgs[0].data), sizeof (msgs[0]), comm);
&(msgs[0].data), sizeof (msgs[0]), comm, dt_dup);
for (size_t i = 0; i < (size_t)nsend; ++i)
msgs[i].type = SEND;
xt_redist_msgs_strided_copy((size_t)nrecv, recv_msgs, sizeof (recv_msgs[0]),
&(msgs[nsend].data), sizeof (msgs[0]), comm);
&(msgs[nsend].data), sizeof (msgs[0]), comm,
dt_dup);
for (size_t i = 0; i < (size_t)nrecv; ++i)
msgs[i + (size_t)nsend].type = RECV;
......@@ -181,7 +185,7 @@ xt_exchanger_mix_isend_irecv_copy(Xt_exchanger exchanger,
*restrict orig_msgs = exchanger_msr->msgs;
xt_redist_msgs_strided_copy(nmsg, &orig_msgs->data, sizeof (*orig_msgs),
&new_msgs->data, sizeof (*new_msgs),
new_comm);
new_comm, true);
for (size_t i = 0; i < nmsg; ++i)
new_msgs[i].type = orig_msgs[i].type;
return (Xt_exchanger)exchanger_copy;
......
......@@ -65,6 +65,7 @@
* @param[in] comm MPI communicator that is to be used for the
* communication
* @param[in] tag_offset tag
* @param[in] config optional customization parameters
* @remark tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
* lifetime of the created exchanger object
......@@ -73,7 +74,8 @@ 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);
MPI_Comm comm, int tag_offset,
Xt_config config);
#endif // XT_EXCHANGER_MIX_ISEND_IRECV_H
......
......@@ -54,6 +54,7 @@
#include "core/core.h"
#include "core/ppm_xfuncs.h"
#include "xt_config_internal.h"
#include "xt/xt_mpi.h"
#include "xt_mpi_internal.h"
#include "xt_redist_internal.h"
......@@ -135,11 +136,14 @@ static void copy_from_redist_msgs(size_t n,
const struct Xt_redist_msg *restrict msgs,
int *restrict ranks,
MPI_Datatype *restrict datatypes,
MPI_Comm comm) {
MPI_Comm comm, bool dt_dup) {
for (size_t i = 0; i < n; ++i) {
ranks[i] = msgs[i].rank;
xt_mpi_call(MPI_Type_dup(msgs[i].datatype, datatypes + i), comm);
if (dt_dup)
xt_mpi_call(MPI_Type_dup(msgs[i].datatype, datatypes + i), comm);
else
datatypes[i] = msgs[i].datatype;
}
}
......@@ -147,8 +151,8 @@ Xt_exchanger
xt_exchanger_neigh_alltoall_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) {
MPI_Comm comm, int tag_offset, Xt_config config)
{
/** note: tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
* lifetime of the created exchanger object
......@@ -166,11 +170,12 @@ xt_exchanger_neigh_alltoall_new(int nsend, int nrecv,
= xt_exchanger_neigh_alltoall_alloc((size_t)nsend, (size_t)nrecv);
exchanger->tag_offset = tag_offset;
exchanger->nmsg[SEND] = nsend;
bool dt_dup = !(config->flags & exch_no_dt_dup);
copy_from_redist_msgs((size_t)nsend, send_msgs, exchanger->ranks,
exchanger->datatypes, comm);
exchanger->datatypes, comm, dt_dup);
exchanger->nmsg[RECV] = nrecv;
copy_from_redist_msgs((size_t)nrecv, recv_msgs, exchanger->ranks + nsend,
exchanger->datatypes + nsend, comm);
exchanger->datatypes + nsend, comm, dt_dup);
int reorder = 0; // no reordering of ranks in new comm
xt_mpi_call(
......
......@@ -73,7 +73,7 @@ Xt_exchanger
xt_exchanger_neigh_alltoall_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);
MPI_Comm comm, int tag_offset, Xt_config config);
#endif // XT_EXCHANGER_NEIGH_ALLTOALL_H
......
......@@ -54,6 +54,7 @@
#include "core/core.h"
#include "core/ppm_xfuncs.h"
#include "xt/xt_mpi.h"
#include "xt_config_internal.h"
#include "xt_mpi_internal.h"
#include "xt_redist_internal.h"
#include "xt_exchanger.h"
......@@ -122,8 +123,9 @@ xt_exchanger_simple_base_new(int nsend, int nrecv,
const struct Xt_redist_msg *recv_msgs,
MPI_Comm comm, int tag_offset,
xt_simple_s_exchange_func s_func,
xt_simple_a_exchange_func a_func) {
xt_simple_a_exchange_func a_func,
Xt_config config)
{
/** note: tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
* lifetime of the created exchanger object
......@@ -141,13 +143,14 @@ xt_exchanger_simple_base_new(int nsend, int nrecv,
exchanger->tag_offset = tag_offset;
exchanger->nmsg[SEND] = nsend;
exchanger->nmsg[RECV] = nrecv;
bool dt_dup = !(config->flags & exch_no_dt_dup);
xt_redist_msgs_strided_copy((size_t)nsend, send_msgs, sizeof (send_msgs[0]),
exchanger->msgs, sizeof (exchanger->msgs[0]),
comm);
comm, dt_dup);
xt_redist_msgs_strided_copy((size_t)nrecv, recv_msgs, sizeof (recv_msgs[0]),
exchanger->msgs + nsend,
sizeof (exchanger->msgs[0]),
comm);
comm, dt_dup);
exchanger->s_func = s_func;
exchanger->a_func = a_func;
......@@ -181,7 +184,7 @@ xt_exchanger_simple_base_copy(Xt_exchanger exchanger,
*restrict orig_msgs = exchanger_sb->msgs;
xt_redist_msgs_strided_copy(nmsg, orig_msgs, sizeof (*orig_msgs),
new_msgs, sizeof (*new_msgs),
new_comm);
new_comm, true);
exchanger_copy->comm = new_comm;
exchanger_copy->tag_offset = new_tag_offset;
return (Xt_exchanger)exchanger_copy;
......
......@@ -51,6 +51,7 @@
#endif
#include "xt/xt_core.h"
#include "xt/xt_config.h"
#include "xt_redist_internal.h"
#include "xt_exchanger.h"
......@@ -75,6 +76,7 @@ typedef void (*xt_simple_a_exchange_func)(
* @param[in] tag_offset tag
* @param[in] s_func function pointer used for synchronous exchanges
* @param[in] a_func function pointer used for asynchronous exchanges
* @param[in] config optional customization parameters
* @remark tag_offset + xt_mpi_tag_exchange_msg must not
* be used on @a comm by any other part of the program during the
* lifetime of the created exchanger object
......@@ -85,7 +87,8 @@ xt_exchanger_simple_base_new(int nsend, int nrecv,
const struct Xt_redist_msg *recv_msgs,
MPI_Comm comm, int tag_offset,
xt_simple_s_exchange_func s_func,
xt_simple_a_exchange_func a_func);
xt_simple_a_exchange_func a_func,
Xt_config config);
#endif // XT_EXCHANGER_SIMPLE_BASE_H
......
......@@ -139,7 +139,7 @@ xt_redist_msgs_strided_copy(size_t n,
size_t src_stride,
struct Xt_redist_msg *restrict dst,
size_t dst_stride,
MPI_Comm comm) {
MPI_Comm comm, bool dt_dup) {
const unsigned char *restrict src_store = (const unsigned char *)src;
......@@ -150,7 +150,10 @@ xt_redist_msgs_strided_copy(size_t n,
struct Xt_redist_msg *dst_msg
= (struct Xt_redist_msg *)(void *)(dst_store + i * dst_stride);
dst_msg->rank = src_msg->rank;
xt_mpi_call(MPI_Type_dup(src_msg->datatype, &(dst_msg->datatype)), comm);
if (dt_dup)
xt_mpi_call(MPI_Type_dup(src_msg->datatype, &(dst_msg->datatype)), comm);
else
dst_msg->datatype = src_msg->datatype;
}
}
......
......@@ -144,7 +144,7 @@ struct Xt_redist_collection_ {
size_t cache_size;
Xt_exchanger_new exchanger_new;
struct Xt_config_ config;
MPI_Comm comm;
int tag_offset;
......@@ -242,7 +242,7 @@ Xt_redist xt_redist_collection_custom_new(Xt_redist *redists, int num_redists,
Xt_redist_collection redist_coll
= xmalloc(sizeof (*redist_coll)
+ size_all_component_dt + nmsg * sizeof (int));
redist_coll->exchanger_new = config->exchanger_new;
redist_coll->config = *config;
redist_coll->nmsg[RECV] = nmsg_recv;
redist_coll->nmsg[SEND] = nmsg_send;
redist_coll->send_ranks
......@@ -379,11 +379,12 @@ get_exchanger(struct Xt_redist_collection_ *redist_coll,
xt_exchanger_delete(cache->exchangers[cache_index]);
exchanger = cache->exchangers[cache_index] =
redist_coll->exchanger_new((int)num_send_messages,
(int)num_recv_messages,
cache->msgs, cache->msgs
+ (size_t)num_send_messages,
comm, tag_offset);
redist_coll->config.exchanger_new((int)num_send_messages,
(int)num_recv_messages,
cache->msgs, cache->msgs
+ (size_t)num_send_messages,
comm, tag_offset,
&redist_coll->config);
cache->token = (cache->token + 1) % cache_size;
}
else
......@@ -405,9 +406,10 @@ get_exchanger(struct Xt_redist_collection_ *redist_coll,
displacements[1], p + num_send_messages, comm);
exchanger =
redist_coll->exchanger_new((int)num_send_messages, (int)num_recv_messages,
p, p + (size_t)num_send_messages, comm,
tag_offset);
redist_coll->config.exchanger_new((int)num_send_messages,
(int)num_recv_messages,
p, p + (size_t)num_send_messages, comm,
tag_offset, &redist_coll->config);
xt_redist_msgs_free(nmsg, p, comm);
}
......@@ -495,7 +497,7 @@ redist_collection_copy(Xt_redist redist)
+ size_all_component_dt + nmsg * sizeof (int));
redist_copy->vtable = redist_coll->vtable;
redist_copy->num_redists = num_redists;
redist_copy->exchanger_new = redist_coll->exchanger_new;
redist_copy->config = redist_coll->config;
redist_copy->nmsg[SEND] = nmsg_send;
redist_copy->nmsg[RECV] = nmsg_recv;
redist_copy->send_ranks
......
......@@ -89,7 +89,7 @@ xt_redist_msgs_strided_copy(size_t n,
size_t src_stride,
struct Xt_redist_msg *restrict dst,
size_t dst_stride,
MPI_Comm comm);
MPI_Comm comm, bool dt_dup);
PPM_DSO_INTERNAL void
xt_redist_msgs_strided_destruct(size_t n, struct Xt_redist_msg *msgs,
......
......@@ -153,7 +153,7 @@ Xt_redist xt_redist_single_array_base_custom_new(
redist->comm = xt_mpi_comm_smart_dup(comm, &redist->tag_offset);
redist->exchanger
= config->exchanger_new(nsend, nrecv, send_msgs, recv_msgs,
redist->comm, redist->tag_offset);
redist->comm, redist->tag_offset, config);
redist->vtable = &redist_sab_vtable;
redist->nmsg[SEND] = nsend;
......
......@@ -81,15 +81,15 @@ struct test_message {
static Xt_exchanger_new *parse_options(int *argc, char ***argv);
static void
test_bcast(MPI_Comm comm, Xt_exchanger_new exchanger_new);
test_bcast(MPI_Comm comm, Xt_exchanger_new exchanger_new, Xt_config config);
static void
test_gather(MPI_Comm comm, Xt_exchanger_new exchanger_new);
test_gather(MPI_Comm comm, Xt_exchanger_new exchanger_new, Xt_config config);
static void
test_all2all(MPI_Comm comm, Xt_exchanger_new exchanger_new);
test_all2all(MPI_Comm comm, Xt_exchanger_new exchanger_new, Xt_config config);
static void
test_rr(MPI_Comm comm, Xt_exchanger_new exchanger_new);
test_rr(MPI_Comm comm, Xt_exchanger_new exchanger_new, Xt_config config);
static void
test_intercomm_all2all(MPI_Comm comm, Xt_exchanger_new exchanger_new);
test_intercomm_all2all(MPI_Comm comm, Xt_exchanger_new exchanger_new, Xt_config config);
static int test_freq = 3;
......@@ -102,20 +102,22 @@ int main(int argc, char **argv)
xt_initialize(MPI_COMM_WORLD);
Xt_exchanger_new *exchangers_new = parse_options(&argc, &argv);
Xt_config config = xt_config_new();
for (size_t i = 0; exchangers_new[i] != (Xt_exchanger_new)0; ++i) {
Xt_exchanger_new exchanger_new = exchangers_new[i];
test_bcast(MPI_COMM_WORLD, exchanger_new);
test_bcast(MPI_COMM_WORLD, exchanger_new, config);
test_gather(MPI_COMM_WORLD, exchanger_new);
test_gather(MPI_COMM_WORLD, exchanger_new, config);
test_all2all(MPI_COMM_WORLD, exchanger_new);
test_all2all(MPI_COMM_WORLD, exchanger_new, config);
test_rr(MPI_COMM_WORLD, exchanger_new);
test_rr(MPI_COMM_WORLD, exchanger_new, config);
test_intercomm_all2all(MPI_COMM_WORLD, exchanger_new);
test_intercomm_all2all(MPI_COMM_WORLD, exchanger_new, config);
}
xt_config_delete(config);
free(exchangers_new);
xt_finalize();
MPI_Finalize();
......@@ -197,7 +199,7 @@ static Xt_exchanger_new *parse_options(int *argc, char ***argv)
}
static void
test_bcast(MPI_Comm comm, Xt_exchanger_new exchanger_new)
test_bcast(MPI_Comm comm, Xt_exchanger_new exchanger_new, Xt_config config)
{
int my_rank, comm_size;
xt_mpi_call(MPI_Comm_rank(comm, &my_rank), comm);
......@@ -230,7 +232,7 @@ test_bcast(MPI_Comm comm, Xt_exchanger_new exchanger_new)
Xt_exchanger exchanger = exchanger_new(nsend, nrecv,
send_msgs,
recv_msgs + (my_rank != i),
comm, 0);
comm, 0, config);
// test
int test_async = (exchanger_new != xt_exchanger_irecv_send_new);
......@@ -263,7 +265,7 @@ test_bcast(MPI_Comm comm, Xt_exchanger_new exchanger_new)
}
static void
test_gather(MPI_Comm comm, Xt_exchanger_new exchanger_new)
test_gather(MPI_Comm comm, Xt_exchanger_new exchanger_new, Xt_config config)
{
int my_rank, comm_size;
xt_mpi_call(MPI_Comm_rank(comm, &my_rank), comm);
......@@ -305,7 +307,8 @@ test_gather(MPI_Comm comm, Xt_exchanger_new exchanger_new)
Xt_exchanger exchanger[num_exchanges];
for (size_t j = 0; j < num_exchanges; ++j)
exchanger[j] = exchanger_new(nsend, (int)nrecv,
send_msgs, recv_msgs + j * nrecv, comm, 0);
send_msgs, recv_msgs + j * nrecv, comm, 0,
config);
// test
int test_async = (exchanger_new != xt_exchanger_irecv_send_new);
......@@ -349,7 +352,7 @@ test_gather(MPI_Comm comm, Xt_exchanger_new exchanger_new)
}
static void
test_all2all(MPI_Comm comm, Xt_exchanger_new exchanger_new)
test_all2all(MPI_Comm comm, Xt_exchanger_new exchanger_new, Xt_config config)
{
int my_rank, comm_size;
xt_mpi_call(MPI_Comm_rank(comm, &my_rank), comm);
......@@ -390,7 +393,7 @@ test_all2all(MPI_Comm comm, Xt_exchanger_new exchanger_new)
Xt_exchanger exchanger = exchanger_new(nsend, nrecv,
send_msgs,
recv_msgs,
MPI_COMM_WORLD, 0);
MPI_COMM_WORLD, 0, config);
// test
int test_async = (exchanger_new != xt_exchanger_irecv_send_new);
for (int async = 0; async < 1 + test_async; ++async) {
......@@ -432,7 +435,7 @@ test_all2all(MPI_Comm comm, Xt_exchanger_new exchanger_new)
}