Moving mca/common/netpatterns and commpaterns to ompi/patterns.
This commit was SVN r28035.
Этот коммит содержится в:
родитель
57b21014f8
Коммит
a31bc57849
@ -182,6 +182,8 @@ include tools/Makefile.am
|
||||
include mpi/Makefile.am
|
||||
include mpi/man/man3/Makefile.extra
|
||||
include mpiext/Makefile.am
|
||||
include patterns/net/Makefile.am
|
||||
include patterns/comm/Makefile.am
|
||||
|
||||
# Ensure that the man page directory exists before we try to make man
|
||||
# page files (because ompi/mpi/man/man3 has no config.status-generated
|
||||
|
@ -51,9 +51,7 @@ mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_bcol_basesmuma_la_SOURCES = $(sources)
|
||||
mca_bcol_basesmuma_la_LDFLAGS = -module -avoid-version $(btl_portals_LDFLAGS)
|
||||
mca_bcol_basesmuma_la_LIBADD = \
|
||||
$(btl_portals_LIBS) \
|
||||
$(top_ompi_builddir)/ompi/mca/common/netpatterns/libmca_common_netpatterns.la \
|
||||
$(top_ompi_builddir)/ompi/mca/common/commpatterns/libmca_common_commpatterns.la
|
||||
$(btl_portals_LIBS)
|
||||
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "ompi/mca/coll/ml/coll_ml_allocation.h"
|
||||
#include "ompi/request/request.h"
|
||||
#include "ompi/proc/proc.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
|
||||
#include "opal/mca/mca.h"
|
||||
#include "opal/util/arch.h"
|
||||
@ -774,16 +774,16 @@ struct mca_bcol_basesmuma_module_t {
|
||||
sm_buffer_mgmt colls_with_user_data;
|
||||
|
||||
/* recursive-doubling tree node */
|
||||
mca_common_netpatterns_pair_exchange_node_t recursive_doubling_tree;
|
||||
netpatterns_pair_exchange_node_t recursive_doubling_tree;
|
||||
|
||||
/* k-nomial gather/allgather tree */
|
||||
mca_common_netpatterns_k_exchange_node_t knomial_allgather_tree;
|
||||
netpatterns_k_exchange_node_t knomial_allgather_tree;
|
||||
|
||||
/* fanin tree node - root is rank 0 */
|
||||
mca_common_netpatterns_tree_node_t fanin_node;
|
||||
netpatterns_tree_node_t fanin_node;
|
||||
|
||||
/* fanout tree node - root is rank 0 */
|
||||
mca_common_netpatterns_tree_node_t fanout_node;
|
||||
netpatterns_tree_node_t fanout_node;
|
||||
|
||||
/* index of blocking barrier memory region to use */
|
||||
int index_blocking_barrier_memory_bank;
|
||||
@ -792,18 +792,18 @@ struct mca_bcol_basesmuma_module_t {
|
||||
int *comm_to_sm_map;
|
||||
|
||||
/* reduction fanout tree */
|
||||
mca_common_netpatterns_tree_node_t* reduction_tree;
|
||||
netpatterns_tree_node_t* reduction_tree;
|
||||
|
||||
/* broadcast fanout tree */
|
||||
mca_common_netpatterns_tree_node_t* fanout_read_tree;
|
||||
netpatterns_tree_node_t* fanout_read_tree;
|
||||
|
||||
/* scatter - k-ary tree */
|
||||
int scatter_kary_radix;
|
||||
mca_common_netpatterns_tree_node_t *scatter_kary_tree;
|
||||
netpatterns_tree_node_t *scatter_kary_tree;
|
||||
|
||||
/* Knomial exchange tree */
|
||||
/* Currently used for only large message reduce */
|
||||
mca_common_netpatterns_k_exchange_node_t knomial_exchange_tree;
|
||||
netpatterns_k_exchange_node_t knomial_exchange_tree;
|
||||
|
||||
/* sequence number offset - want to make sure that we start
|
||||
* id'ing collectives with id 0, so we can have simple
|
||||
|
@ -135,7 +135,7 @@ int bcol_basesmuma_bcast(bcol_function_args_t *input_args,
|
||||
volatile char* parent_data_pointer;
|
||||
mca_bcol_basesmuma_header_t *my_ctl_pointer;
|
||||
volatile mca_bcol_basesmuma_header_t *parent_ctl_pointer;
|
||||
mca_common_netpatterns_tree_node_t* my_fanout_read_tree;
|
||||
netpatterns_tree_node_t* my_fanout_read_tree;
|
||||
size_t pack_len = 0, dt_size;
|
||||
|
||||
void *data_addr = (void *)((unsigned char *)input_args->src_desc->data_addr );
|
||||
@ -268,7 +268,7 @@ int bcol_basesmuma_hdl_zerocopy_bcast(bcol_function_args_t *input_args,
|
||||
mca_bcol_basesmuma_module_t* bcol_module=
|
||||
(mca_bcol_basesmuma_module_t *)c_input_args->bcol_module;
|
||||
|
||||
mca_common_netpatterns_tree_node_t* my_fanout_read_tree;
|
||||
netpatterns_tree_node_t* my_fanout_read_tree;
|
||||
size_t pack_len = 0, dt_size;
|
||||
|
||||
void *data_addr = (void *)((unsigned char *)input_args->src_desc->data_addr);
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "ompi/mca/bcol/bcol.h"
|
||||
#include "ompi/mca/bcol/base/base.h"
|
||||
#include "ompi/mca/coll/ml/coll_ml.h"
|
||||
#include "ompi/mca/common/commpatterns/common_coll_ops.h"
|
||||
#include "ompi/patterns/comm/coll_ops.h"
|
||||
|
||||
#include "opal/dss/dss.h"
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "ompi/constants.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "ompi/mca/bcol/bcol.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
|
||||
#include "opal/sys/atomic.h"
|
||||
|
||||
@ -52,7 +52,7 @@ static int bcol_basesmuma_fanin_new(bcol_function_args_t *input_args,
|
||||
volatile mca_bcol_basesmuma_header_t *child_ctl;
|
||||
|
||||
|
||||
mca_common_netpatterns_tree_node_t *my_tree_node = &(bcol_module->fanin_node);
|
||||
netpatterns_tree_node_t *my_tree_node = &(bcol_module->fanin_node);
|
||||
|
||||
/* Figure out - what instance of the basesmuma bcol I am */
|
||||
sequence_number = input_args->sequence_num;
|
||||
@ -134,7 +134,7 @@ static int bcol_basesmuma_fanin_new_progress(bcol_function_args_t *input_args,
|
||||
volatile mca_bcol_basesmuma_header_t *child_ctl;
|
||||
|
||||
|
||||
mca_common_netpatterns_tree_node_t *my_tree_node = &(bcol_module->fanin_node);
|
||||
netpatterns_tree_node_t *my_tree_node = &(bcol_module->fanin_node);
|
||||
|
||||
sequence_number = input_args->sequence_num;
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "ompi/constants.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "ompi/mca/bcol/bcol.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
|
||||
#include "opal/sys/atomic.h"
|
||||
|
||||
@ -50,7 +50,7 @@ static int bcol_basesmuma_fanout_new(
|
||||
volatile mca_bcol_basesmuma_header_t *parent_ctl;
|
||||
|
||||
|
||||
mca_common_netpatterns_tree_node_t *my_tree_node = &(bcol_module->fanin_node);
|
||||
netpatterns_tree_node_t *my_tree_node = &(bcol_module->fanin_node);
|
||||
|
||||
/* Figure out - what instance of the basesmuma bcol I am */
|
||||
sequence_number = input_args->sequence_num;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "ompi/mca/bcol/bcol.h"
|
||||
#include "ompi/mca/bcol/base/base.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
|
||||
#include "opal/util/show_help.h"
|
||||
#include "opal/align.h"
|
||||
@ -217,7 +217,7 @@ static int load_recursive_knomial_info(mca_bcol_basesmuma_module_t
|
||||
*sm_module)
|
||||
{
|
||||
int rc = OMPI_SUCCESS;
|
||||
rc = mca_common_netpatterns_setup_recursive_knomial_tree_node(
|
||||
rc = netpatterns_setup_recursive_knomial_tree_node(
|
||||
sm_module->super.sbgp_partner_module->group_size,
|
||||
sm_module->super.sbgp_partner_module->my_index,
|
||||
mca_bcol_basesmuma_component.k_nomial_radix,
|
||||
@ -230,7 +230,7 @@ int bcol_basesmuma_setup_knomial_tree(mca_bcol_base_module_t *super)
|
||||
{
|
||||
mca_bcol_basesmuma_module_t *sm_module = (mca_bcol_basesmuma_module_t *) super;
|
||||
|
||||
return mca_common_netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
return netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
sm_module->super.sbgp_partner_module->group_size,
|
||||
sm_module->super.sbgp_partner_module->my_index,
|
||||
mca_bcol_basesmuma_component.k_nomial_radix,
|
||||
@ -290,7 +290,7 @@ mca_bcol_basesmuma_comm_query(mca_sbgp_base_module_t *module, int *num_modules)
|
||||
sm_module->reduction_tree = NULL;
|
||||
sm_module->fanout_read_tree = NULL;
|
||||
|
||||
ret=mca_common_netpatterns_setup_recursive_doubling_tree_node(
|
||||
ret=netpatterns_setup_recursive_doubling_tree_node(
|
||||
module->group_size,module->my_index,
|
||||
&(sm_module->recursive_doubling_tree));
|
||||
if(OMPI_SUCCESS != ret) {
|
||||
@ -302,7 +302,7 @@ mca_bcol_basesmuma_comm_query(mca_sbgp_base_module_t *module, int *num_modules)
|
||||
/* setup the fanin tree - this is used only as part of a hierarchical
|
||||
* barrier, so will set this up with rank 0 as the root */
|
||||
my_rank=module->my_index;
|
||||
ret=mca_common_netpatterns_setup_narray_tree(cs->radix_fanin,
|
||||
ret=netpatterns_setup_narray_tree(cs->radix_fanin,
|
||||
my_rank,module->group_size,&(sm_module->fanin_node));
|
||||
if(OMPI_SUCCESS != ret) {
|
||||
fprintf(stderr,"Error setting up fanin tree \n");
|
||||
@ -312,7 +312,7 @@ mca_bcol_basesmuma_comm_query(mca_sbgp_base_module_t *module, int *num_modules)
|
||||
|
||||
/* setup the fanout tree - this is used only as part of a hierarchical
|
||||
* barrier, so will set this up with rank 0 as the root */
|
||||
ret=mca_common_netpatterns_setup_narray_tree(cs->radix_fanout,
|
||||
ret=netpatterns_setup_narray_tree(cs->radix_fanout,
|
||||
my_rank,module->group_size,&(sm_module->fanout_node));
|
||||
if(OMPI_SUCCESS != ret) {
|
||||
fprintf(stderr,"Error setting up fanout tree \n");
|
||||
@ -329,14 +329,14 @@ mca_bcol_basesmuma_comm_query(mca_sbgp_base_module_t *module, int *num_modules)
|
||||
bcast_radix = cs->radix_read_tree;
|
||||
|
||||
/* initialize fan-out read tree */
|
||||
sm_module->fanout_read_tree=(mca_common_netpatterns_tree_node_t*) malloc(
|
||||
sizeof(mca_common_netpatterns_tree_node_t)*module->group_size);
|
||||
sm_module->fanout_read_tree=(netpatterns_tree_node_t*) malloc(
|
||||
sizeof(netpatterns_tree_node_t)*module->group_size);
|
||||
if( NULL == sm_module->fanout_read_tree ) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
for(i = 0; i < module->group_size; i++){
|
||||
ret = mca_common_netpatterns_setup_narray_tree(bcast_radix,
|
||||
ret = netpatterns_setup_narray_tree(bcast_radix,
|
||||
i, module->group_size, &(sm_module->fanout_read_tree[i]));
|
||||
if(OMPI_SUCCESS != ret) {
|
||||
goto Error;
|
||||
@ -359,13 +359,13 @@ mca_bcol_basesmuma_comm_query(mca_sbgp_base_module_t *module, int *num_modules)
|
||||
*/
|
||||
|
||||
/* initialize reduction tree */
|
||||
sm_module->reduction_tree=(mca_common_netpatterns_tree_node_t *) malloc(
|
||||
sizeof(mca_common_netpatterns_tree_node_t )*module->group_size);
|
||||
sm_module->reduction_tree=(netpatterns_tree_node_t *) malloc(
|
||||
sizeof(netpatterns_tree_node_t )*module->group_size);
|
||||
if( NULL == sm_module->reduction_tree ) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
ret=mca_common_netpatterns_setup_multinomial_tree(
|
||||
ret=netpatterns_setup_multinomial_tree(
|
||||
cs->order_reduction_tree,module->group_size,
|
||||
sm_module->reduction_tree);
|
||||
if( MPI_SUCCESS != ret ) {
|
||||
@ -389,7 +389,7 @@ mca_bcol_basesmuma_comm_query(mca_sbgp_base_module_t *module, int *num_modules)
|
||||
*/
|
||||
sm_module->scatter_kary_radix=cs->scatter_kary_radix;
|
||||
sm_module->scatter_kary_tree=NULL;
|
||||
ret=mca_common_netpatterns_setup_narray_tree_contigous_ranks(
|
||||
ret=netpatterns_setup_narray_tree_contigous_ranks(
|
||||
sm_module->scatter_kary_radix,
|
||||
sm_module->super.sbgp_partner_module->group_size,
|
||||
&(sm_module->scatter_kary_tree));
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "ompi/mca/bcol/bcol.h"
|
||||
#include "bcol_basesmuma.h"
|
||||
#include "opal/sys/atomic.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
|
||||
/*
|
||||
* Initialize nonblocking barrier. This is code specific for handling
|
||||
@ -35,7 +35,7 @@ int bcol_basesmuma_rd_nb_barrier_init_admin(
|
||||
int ret=OMPI_SUCCESS, idx, leading_dim, loop_cnt, exchange;
|
||||
int pair_rank;
|
||||
mca_bcol_basesmuma_ctl_struct_t **ctl_structs;
|
||||
mca_common_netpatterns_pair_exchange_node_t *my_exchange_node;
|
||||
netpatterns_pair_exchange_node_t *my_exchange_node;
|
||||
int extra_rank, my_rank, pow_2;
|
||||
mca_bcol_basesmuma_ctl_struct_t volatile *partner_ctl;
|
||||
mca_bcol_basesmuma_ctl_struct_t volatile *my_ctl;
|
||||
@ -205,7 +205,7 @@ int bcol_basesmuma_rd_nb_barrier_progress_admin(
|
||||
int ret=OMPI_SUCCESS, idx, leading_dim, loop_cnt, exchange;
|
||||
int pair_rank, start_index, restart_phase;
|
||||
mca_bcol_basesmuma_ctl_struct_t **ctl_structs;
|
||||
mca_common_netpatterns_pair_exchange_node_t *my_exchange_node;
|
||||
netpatterns_pair_exchange_node_t *my_exchange_node;
|
||||
int extra_rank, my_rank, pow_2;
|
||||
mca_bcol_basesmuma_ctl_struct_t volatile *partner_ctl;
|
||||
mca_bcol_basesmuma_ctl_struct_t volatile *my_ctl;
|
||||
|
@ -55,7 +55,7 @@ int bcol_basesmuma_k_nomial_barrier_init(bcol_function_args_t *input_args,
|
||||
int flag_offset = 0;
|
||||
volatile int8_t ready_flag;
|
||||
mca_bcol_basesmuma_module_t *bcol_module = (mca_bcol_basesmuma_module_t *) const_args->bcol_module;
|
||||
mca_common_netpatterns_k_exchange_node_t *exchange_node = &bcol_module->knomial_allgather_tree;
|
||||
netpatterns_k_exchange_node_t *exchange_node = &bcol_module->knomial_allgather_tree;
|
||||
mca_bcol_basesmuma_component_t *cm = &mca_bcol_basesmuma_component;
|
||||
uint32_t buffer_index = input_args->buffer_index;
|
||||
int *active_requests =
|
||||
@ -244,7 +244,7 @@ int bcol_basesmuma_k_nomial_barrier_progress(bcol_function_args_t *input_args,
|
||||
int flag_offset;
|
||||
volatile int8_t ready_flag;
|
||||
mca_bcol_basesmuma_module_t *bcol_module = (mca_bcol_basesmuma_module_t *) const_args->bcol_module;
|
||||
mca_common_netpatterns_k_exchange_node_t *exchange_node = &bcol_module->knomial_allgather_tree;
|
||||
netpatterns_k_exchange_node_t *exchange_node = &bcol_module->knomial_allgather_tree;
|
||||
mca_bcol_basesmuma_component_t *cm = &mca_bcol_basesmuma_component;
|
||||
uint32_t buffer_index = input_args->buffer_index;
|
||||
int *active_requests =
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "ompi/mca/mpool/base/base.h"
|
||||
#include "ompi/mca/bcol/bcol.h"
|
||||
#include "ompi/mca/bcol/base/base.h"
|
||||
#include "ompi/mca/common/commpatterns/common_coll_ops.h"
|
||||
#include "ompi/patterns/comm/coll_ops.h"
|
||||
|
||||
#include "opal/class/opal_object.h"
|
||||
#include "opal/dss/dss.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "ompi/proc/proc.h"
|
||||
#include "ompi/mca/common/commpatterns/common_coll_ops.h"
|
||||
#include "ompi/patterns/comm/coll_ops.h"
|
||||
|
||||
#include "opal/dss/dss.h"
|
||||
#include "opal/util/error.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "ompi/op/op.h"
|
||||
#include "ompi/include/ompi/constants.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns_knomial_tree.h"
|
||||
#include "ompi/patterns/net/netpatterns_knomial_tree.h"
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
|
@ -364,16 +364,16 @@ struct mca_bcol_iboffload_module_t {
|
||||
opal_list_t collfrag_pending;
|
||||
|
||||
/* recursive-doubling tree node */
|
||||
mca_common_netpatterns_pair_exchange_node_t recursive_doubling_tree;
|
||||
netpatterns_pair_exchange_node_t recursive_doubling_tree;
|
||||
|
||||
/* N exchange tree */
|
||||
mca_common_netpatterns_pair_exchange_node_t n_exchange_tree;
|
||||
netpatterns_pair_exchange_node_t n_exchange_tree;
|
||||
|
||||
/* Knomial exchange tree */
|
||||
mca_common_netpatterns_k_exchange_node_t knomial_exchange_tree;
|
||||
netpatterns_k_exchange_node_t knomial_exchange_tree;
|
||||
|
||||
/* Knomial exchange tree */
|
||||
mca_common_netpatterns_k_exchange_node_t knomial_allgather_tree;
|
||||
netpatterns_k_exchange_node_t knomial_allgather_tree;
|
||||
|
||||
/* The array will keep pre-calculated task consumption per
|
||||
* algorithm
|
||||
|
@ -54,7 +54,7 @@ int mca_bcol_iboffload_barrier_intra_recursive_doubling(
|
||||
mca_bcol_iboffload_frag_t *send_fragment = NULL,
|
||||
*preposted_recv_frag = NULL;
|
||||
|
||||
mca_common_netpatterns_pair_exchange_node_t *my_exchange_node =
|
||||
netpatterns_pair_exchange_node_t *my_exchange_node =
|
||||
&iboffload->recursive_doubling_tree;
|
||||
|
||||
IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_barrier_intra_recursive_doubling.\n"));
|
||||
@ -364,7 +364,7 @@ int mca_bcol_iboffload_nb_memory_service_barrier_intra(bcol_function_args_t *inp
|
||||
/* Recursive K - ing*/
|
||||
static int recursive_knomial_start_connections(struct mca_bcol_iboffload_module_t *iboffload)
|
||||
{
|
||||
mca_common_netpatterns_k_exchange_node_t *my_exchange_node =
|
||||
netpatterns_k_exchange_node_t *my_exchange_node =
|
||||
&iboffload->knomial_exchange_tree;
|
||||
int k, i, n_exchanges = my_exchange_node->n_exchanges,
|
||||
**exchanges = my_exchange_node->rank_exchanges,
|
||||
@ -442,7 +442,7 @@ static int mca_bcol_iboffload_barrier_intra_recursive_knomial(
|
||||
mca_bcol_iboffload_frag_t *send_fragment = NULL,
|
||||
*preposted_recv_frag = NULL;
|
||||
|
||||
mca_common_netpatterns_k_exchange_node_t *my_exchange_node =
|
||||
netpatterns_k_exchange_node_t *my_exchange_node =
|
||||
&iboffload->knomial_exchange_tree;
|
||||
IBOFFLOAD_VERBOSE(10, ("Calling for mca_bcol_iboffload_barrier_intra_recursive_knomial. Node type %d\n", my_exchange_node->node_type));
|
||||
|
||||
@ -706,7 +706,7 @@ int mca_bcol_iboffload_barrier_intra_recursive_knomial_start(
|
||||
|
||||
int mca_bcol_iboffload_rec_doubling_start_connections(mca_bcol_iboffload_module_t *iboffload)
|
||||
{
|
||||
mca_common_netpatterns_pair_exchange_node_t *my_exchange_node =
|
||||
netpatterns_pair_exchange_node_t *my_exchange_node =
|
||||
&iboffload->recursive_doubling_tree;
|
||||
|
||||
int i, n_exchanges = my_exchange_node->n_exchanges,
|
||||
|
@ -203,7 +203,7 @@ int mca_bcol_iboffload_small_msg_bcast_progress(
|
||||
static int mca_bcol_iboffload_small_msg_bcast_exec(mca_bcol_iboffload_module_t *iboffload_module,
|
||||
mca_bcol_iboffload_collreq_t *coll_request)
|
||||
{
|
||||
mca_common_netpatterns_pair_exchange_node_t *recursive_doubling_tree =
|
||||
netpatterns_pair_exchange_node_t *recursive_doubling_tree =
|
||||
&iboffload_module->recursive_doubling_tree;
|
||||
|
||||
int rc,
|
||||
@ -396,7 +396,7 @@ int mca_bcol_iboffload_small_msg_bcast_intra(bcol_function_args_t *fn_arguments,
|
||||
static int mca_bcol_iboffload_small_msg_bcast_extra_exec(mca_bcol_iboffload_module_t *iboffload_module,
|
||||
mca_bcol_iboffload_collreq_t *coll_request)
|
||||
{
|
||||
mca_common_netpatterns_pair_exchange_node_t *recursive_doubling_tree =
|
||||
netpatterns_pair_exchange_node_t *recursive_doubling_tree =
|
||||
&iboffload_module->recursive_doubling_tree;
|
||||
|
||||
int rc,
|
||||
@ -617,7 +617,7 @@ do {
|
||||
static int mca_bcol_iboffload_bcast_scatter_allgather_exec(mca_bcol_iboffload_module_t *iboffload_module,
|
||||
mca_bcol_iboffload_collreq_t *coll_request)
|
||||
{
|
||||
mca_common_netpatterns_pair_exchange_node_t *recursive_doubling_tree =
|
||||
netpatterns_pair_exchange_node_t *recursive_doubling_tree =
|
||||
&iboffload_module->recursive_doubling_tree;
|
||||
|
||||
int rc,
|
||||
@ -857,7 +857,7 @@ int mca_bcol_iboffload_bcast_scatter_allgather_intra(bcol_function_args_t *fn_ar
|
||||
static int mca_bcol_iboffload_bcast_scatter_allgather_extra_exec(mca_bcol_iboffload_module_t *iboffload_module,
|
||||
mca_bcol_iboffload_collreq_t *coll_request)
|
||||
{
|
||||
mca_common_netpatterns_pair_exchange_node_t *recursive_doubling_tree =
|
||||
netpatterns_pair_exchange_node_t *recursive_doubling_tree =
|
||||
&iboffload_module->recursive_doubling_tree;
|
||||
|
||||
int rc, dst;
|
||||
|
@ -364,7 +364,7 @@ int bcol_iboffload_binomial_root_to_src(int group_root, int my_rank,
|
||||
|
||||
static inline void bcol_iboffload_setup_binomial_connection(mca_bcol_iboffload_module_t *iboffload)
|
||||
{
|
||||
mca_common_netpatterns_pair_exchange_node_t *my_exchange_node =
|
||||
netpatterns_pair_exchange_node_t *my_exchange_node =
|
||||
&iboffload->recursive_doubling_tree;
|
||||
|
||||
int i, n_exchanges = my_exchange_node->n_exchanges,
|
||||
|
@ -178,8 +178,8 @@ mca_bcol_iboffload_module_destruct(mca_bcol_iboffload_module_t *module)
|
||||
free(module->endpoints);
|
||||
}
|
||||
|
||||
mca_common_netpatterns_free_recursive_doubling_tree_node(&module->n_exchange_tree);
|
||||
mca_common_netpatterns_free_recursive_doubling_tree_node(&module->recursive_doubling_tree);
|
||||
netpatterns_free_recursive_doubling_tree_node(&module->n_exchange_tree);
|
||||
netpatterns_free_recursive_doubling_tree_node(&module->recursive_doubling_tree);
|
||||
|
||||
OBJ_RELEASE(module->device->net_context);
|
||||
OBJ_RELEASE(module->device);
|
||||
@ -745,7 +745,7 @@ int mca_bcol_iboffload_setup_knomial_tree(mca_bcol_base_module_t *super)
|
||||
{
|
||||
int rc;
|
||||
mca_bcol_iboffload_module_t *ib_module = (mca_bcol_iboffload_module_t *) super;
|
||||
rc = mca_common_netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
rc = netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
ib_module->super.sbgp_partner_module->group_size,
|
||||
ib_module->super.sbgp_partner_module->my_index,
|
||||
mca_bcol_iboffload_component.k_nomial_radix,
|
||||
@ -1090,7 +1090,7 @@ mca_bcol_iboffload_comm_query(mca_sbgp_base_module_t *sbgp, int *num_modules)
|
||||
/* Barrier initialization - recuresive doubling */
|
||||
#if 1
|
||||
if (OMPI_SUCCESS !=
|
||||
mca_common_netpatterns_setup_recursive_doubling_tree_node(
|
||||
netpatterns_setup_recursive_doubling_tree_node(
|
||||
iboffload_module->group_size, my_rank,
|
||||
&iboffload_module->recursive_doubling_tree)) {
|
||||
IBOFFLOAD_ERROR(("Failed to setup recursive doubling tree,"
|
||||
@ -1101,7 +1101,7 @@ mca_bcol_iboffload_comm_query(mca_sbgp_base_module_t *sbgp, int *num_modules)
|
||||
|
||||
/* Barrier initialization - N exchange tree */
|
||||
if (OMPI_SUCCESS !=
|
||||
mca_common_netpatterns_setup_recursive_doubling_n_tree_node(
|
||||
netpatterns_setup_recursive_doubling_n_tree_node(
|
||||
iboffload_module->group_size, my_rank,
|
||||
cm->exchange_tree_order,
|
||||
&iboffload_module->n_exchange_tree)) {
|
||||
@ -1113,7 +1113,7 @@ mca_bcol_iboffload_comm_query(mca_sbgp_base_module_t *sbgp, int *num_modules)
|
||||
|
||||
/* Recursive K-ing initialization - Knomial exchange tree */
|
||||
if (OMPI_SUCCESS !=
|
||||
mca_common_netpatterns_setup_recursive_knomial_tree_node(
|
||||
netpatterns_setup_recursive_knomial_tree_node(
|
||||
iboffload_module->group_size, my_rank,
|
||||
cm->knomial_tree_order,
|
||||
&iboffload_module->knomial_exchange_tree)) {
|
||||
@ -1156,7 +1156,7 @@ mca_bcol_iboffload_comm_query(mca_sbgp_base_module_t *sbgp, int *num_modules)
|
||||
}
|
||||
/* that should take care of that */
|
||||
if (OMPI_SUCCESS !=
|
||||
mca_common_netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
iboffload_module->group_size, sbgp->group_list[my_rank],
|
||||
cm->k_nomial_radix, iboffload_module->super.list_n_connected,
|
||||
&iboffload_module->knomial_allgather_tree)) {
|
||||
|
@ -44,8 +44,7 @@ mcacomponentdir = $(pkglibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_bcol_ptpcoll_la_SOURCES = $(sources)
|
||||
mca_bcol_ptpcoll_la_LDFLAGS = -module -avoid-version
|
||||
mca_bcol_ptpcoll_la_LIBADD = \
|
||||
$(top_ompi_builddir)/ompi/mca/common/netpatterns/libmca_common_netpatterns.la
|
||||
mca_bcol_ptpcoll_la_LIBADD =
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_bcol_ptpcoll_la_SOURCES =$(sources)
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "ompi/request/request.h"
|
||||
#include "ompi/mca/pml/pml.h"
|
||||
#include "ompi/mca/coll/ml/coll_ml_allocation.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
@ -297,7 +297,7 @@ struct mca_bcol_ptpcoll_module_t {
|
||||
int full_narray_tree_num_leafs;
|
||||
|
||||
/* Nary tree info */
|
||||
mca_common_netpatterns_tree_node_t *narray_node;
|
||||
netpatterns_tree_node_t *narray_node;
|
||||
|
||||
/* if the rank in group, it keeps the extra peer.
|
||||
if the rank is extra, it keeps the proxy peer.
|
||||
@ -328,13 +328,13 @@ struct mca_bcol_ptpcoll_module_t {
|
||||
/* number of extra peers , maximum k - 1*/
|
||||
int narray_knomial_proxy_num;
|
||||
/* Narray-Knomial node information array */
|
||||
mca_common_netpatterns_narray_knomial_tree_node_t *narray_knomial_node;
|
||||
netpatterns_narray_knomial_tree_node_t *narray_knomial_node;
|
||||
/* Knomial exchange tree */
|
||||
mca_common_netpatterns_k_exchange_node_t knomial_exchange_tree;
|
||||
netpatterns_k_exchange_node_t knomial_exchange_tree;
|
||||
/* knomial allgather tree --- Do not disable, we need both
|
||||
different algorithms define recursive k - ing differently
|
||||
*/
|
||||
mca_common_netpatterns_k_exchange_node_t knomial_allgather_tree;
|
||||
netpatterns_k_exchange_node_t knomial_allgather_tree;
|
||||
|
||||
/* Knomial allgather offsets */
|
||||
int **allgather_offsets;
|
||||
|
@ -34,7 +34,7 @@ static int bcol_ptpcoll_barrier_recurs_knomial_new(
|
||||
mca_bcol_ptpcoll_module_t *ptpcoll_module =
|
||||
(mca_bcol_ptpcoll_module_t *) const_args->bcol_module;
|
||||
|
||||
mca_common_netpatterns_k_exchange_node_t *my_exchange_node =
|
||||
netpatterns_k_exchange_node_t *my_exchange_node =
|
||||
&ptpcoll_module->knomial_exchange_tree;
|
||||
|
||||
int rc, k, pair_comm_rank, exchange, completed,
|
||||
@ -223,7 +223,7 @@ static int bcol_ptpcoll_barrier_recurs_knomial_new_progress(
|
||||
mca_bcol_ptpcoll_module_t *ptpcoll_module =
|
||||
(mca_bcol_ptpcoll_module_t *) const_args->bcol_module;
|
||||
|
||||
mca_common_netpatterns_k_exchange_node_t *my_exchange_node =
|
||||
netpatterns_k_exchange_node_t *my_exchange_node =
|
||||
&ptpcoll_module->knomial_exchange_tree;
|
||||
|
||||
int rc, k, tag, pair_comm_rank, exchange,
|
||||
@ -371,7 +371,7 @@ static int bcol_ptpcoll_barrier_recurs_knomial_extra_new(
|
||||
mca_bcol_ptpcoll_module_t *ptpcoll_module =
|
||||
(mca_bcol_ptpcoll_module_t *) const_args->bcol_module;
|
||||
|
||||
mca_common_netpatterns_k_exchange_node_t *my_exchange_node =
|
||||
netpatterns_k_exchange_node_t *my_exchange_node =
|
||||
&ptpcoll_module->knomial_exchange_tree;
|
||||
|
||||
ompi_communicator_t *comm =
|
||||
@ -862,7 +862,7 @@ static int bcol_ptpcoll_barrier_extra_node_progress(
|
||||
|
||||
static int mca_bcol_ptpcoll_barrier_setup(mca_bcol_base_module_t *super, int bcoll_type)
|
||||
{
|
||||
mca_common_netpatterns_k_exchange_node_t *my_exchange_node;
|
||||
netpatterns_k_exchange_node_t *my_exchange_node;
|
||||
mca_bcol_ptpcoll_module_t * ptpcoll_module =
|
||||
(mca_bcol_ptpcoll_module_t *) super;
|
||||
|
||||
|
@ -141,7 +141,7 @@ int bcol_ptpcoll_bcast_k_nomial_anyroot(bcol_function_args_t *input_args,
|
||||
int count = input_args->count * input_args->dtype->super.size;
|
||||
int *active_requests =
|
||||
&(ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].active_requests);
|
||||
mca_common_netpatter_knomial_step_info_t step_info = {0, 0, 0};
|
||||
netpatterns_knomial_step_info_t step_info = {0, 0, 0};
|
||||
|
||||
PTPCOLL_VERBOSE(3, ("BCAST Anyroot, index_this_type %d, num_of_this_type %d",
|
||||
const_args->index_of_this_type_in_collective + 1,
|
||||
@ -529,7 +529,7 @@ int bcol_ptpcoll_bcast_k_nomial_known_root_progress(bcol_function_args_t *input_
|
||||
/* No data was received. Waiting for data */
|
||||
if (0 == (*active_requests)) {
|
||||
int extra_root = -1;
|
||||
mca_common_netpatter_knomial_step_info_t step_info;
|
||||
netpatterns_knomial_step_info_t step_info;
|
||||
/* We can not block. So run couple of test for data arrival */
|
||||
if (0 == mca_bcol_ptpcoll_test_for_match(recv_request, &rc)) {
|
||||
PTPCOLL_VERBOSE(10, ("Test was not matched (active request %d)",
|
||||
@ -624,7 +624,7 @@ int bcol_ptpcoll_bcast_k_nomial_known_root(bcol_function_args_t *input_args,
|
||||
int matched = 0;
|
||||
int k_level, logk_level;
|
||||
int extra_root = -1;
|
||||
mca_common_netpatter_knomial_step_info_t step_info;
|
||||
netpatterns_knomial_step_info_t step_info;
|
||||
|
||||
PTPCOLL_VERBOSE(3, ("BCAST Know root, index_this_type %d, num_of_this_type %d",
|
||||
const_args->index_of_this_type_in_collective + 1,
|
||||
@ -694,7 +694,7 @@ int bcol_ptpcoll_bcast_k_nomial_known_root(bcol_function_args_t *input_args,
|
||||
}
|
||||
}
|
||||
|
||||
data_src = mca_common_netpatterns_get_knomial_data_source(
|
||||
data_src = netpatterns_get_knomial_data_source(
|
||||
my_group_index, group_root_index, radix, ptpcoll_module->pow_knum,
|
||||
&k_level, &logk_level);
|
||||
|
||||
@ -1709,8 +1709,8 @@ static int bcol_ptpcoll_bcast_narray_knomial_scatter_gatther_known_root(bcol_fun
|
||||
int group_size = ptpcoll_module->full_narray_tree_size;
|
||||
int completed = 0;
|
||||
int virtual_root;
|
||||
mca_common_netpatterns_narray_knomial_tree_node_t *narray_knomial_node = NULL;
|
||||
mca_common_netpatterns_narray_knomial_tree_node_t *narray_node = NULL;
|
||||
netpatterns_narray_knomial_tree_node_t *narray_knomial_node = NULL;
|
||||
netpatterns_narray_knomial_tree_node_t *narray_node = NULL;
|
||||
|
||||
PTPCOLL_VERBOSE(3, ("BCAST Anyroot, index_this_type %d, num_of_this_type %d",
|
||||
const_args->index_of_this_type_in_collective + 1,
|
||||
@ -2032,7 +2032,7 @@ static int bcol_ptpcoll_bcast_narray_progress(bcol_function_args_t *input_args,
|
||||
int matched = true;
|
||||
int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index;
|
||||
int relative_group_index = 0;
|
||||
mca_common_netpatterns_tree_node_t *narray_node = NULL;
|
||||
netpatterns_tree_node_t *narray_node = NULL;
|
||||
|
||||
PTPCOLL_VERBOSE(3, ("Bcast, Narray tree Progress"));
|
||||
|
||||
@ -2119,7 +2119,7 @@ static int bcol_ptpcoll_bcast_narray(bcol_function_args_t *input_args,
|
||||
int my_group_index = ptpcoll_module->super.sbgp_partner_module->my_index;
|
||||
int group_root_index;
|
||||
int relative_group_index = 0;
|
||||
mca_common_netpatterns_tree_node_t *narray_node = NULL;
|
||||
netpatterns_tree_node_t *narray_node = NULL;
|
||||
|
||||
PTPCOLL_VERBOSE(3, ("Bcast, Narray tree"));
|
||||
|
||||
|
@ -756,9 +756,9 @@ int bcol_ptpcoll_bcast_narray_knomial_gather(mca_bcol_ptpcoll_module_t *ptpcoll_
|
||||
ompi_communicator_t* comm = ptpcoll_module->super.sbgp_partner_module->group_comm;
|
||||
ompi_request_t **requests =
|
||||
ptpcoll_module->ml_mem.ml_buf_desc[buffer_index].requests;
|
||||
mca_common_netpatterns_narray_knomial_tree_node_t *narray_node =
|
||||
netpatterns_narray_knomial_tree_node_t *narray_node =
|
||||
&ptpcoll_module->narray_knomial_node[relative_group_index];
|
||||
mca_common_netpatterns_k_exchange_node_t *k_node =
|
||||
netpatterns_k_exchange_node_t *k_node =
|
||||
&narray_node->k_node;
|
||||
mca_bcol_ptpcoll_component_t *cm =
|
||||
&mca_bcol_ptpcoll_component;
|
||||
|
@ -264,7 +264,7 @@ int mca_bcol_ptpcoll_setup_knomial_tree(mca_bcol_base_module_t *super)
|
||||
{
|
||||
mca_bcol_ptpcoll_module_t *p2p_module = (mca_bcol_ptpcoll_module_t *) super;
|
||||
int rc = 0;
|
||||
rc = mca_common_netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
rc = netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
p2p_module->super.sbgp_partner_module->group_size,
|
||||
p2p_module->super.sbgp_partner_module->my_index,
|
||||
mca_bcol_ptpcoll_component.k_nomial_radix,
|
||||
@ -314,7 +314,7 @@ static int load_narray_knomial_tree (mca_bcol_ptpcoll_module_t *ptpcoll_module)
|
||||
|
||||
ptpcoll_module->narray_knomial_node = calloc(
|
||||
ptpcoll_module->full_narray_tree_size,
|
||||
sizeof(mca_common_netpatterns_narray_knomial_tree_node_t));
|
||||
sizeof(netpatterns_narray_knomial_tree_node_t));
|
||||
if(NULL == ptpcoll_module->narray_knomial_node) {
|
||||
goto Error;
|
||||
}
|
||||
@ -345,7 +345,7 @@ static int load_narray_knomial_tree (mca_bcol_ptpcoll_module_t *ptpcoll_module)
|
||||
}
|
||||
/* Setting node info */
|
||||
for(i = 0; i < ptpcoll_module->full_narray_tree_size; i++) {
|
||||
rc = mca_common_netpatterns_setup_narray_knomial_tree(
|
||||
rc = netpatterns_setup_narray_knomial_tree(
|
||||
cm->narray_knomial_radix,
|
||||
i,
|
||||
ptpcoll_module->full_narray_tree_size,
|
||||
@ -381,13 +381,13 @@ static int load_narray_tree(mca_bcol_ptpcoll_module_t *ptpcoll_module)
|
||||
mca_bcol_ptpcoll_component_t *cm = &mca_bcol_ptpcoll_component;
|
||||
|
||||
ptpcoll_module->narray_node = calloc(ptpcoll_module->group_size,
|
||||
sizeof(mca_common_netpatterns_tree_node_t));
|
||||
sizeof(netpatterns_tree_node_t));
|
||||
if(NULL == ptpcoll_module->narray_node ) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
for(i = 0; i < ptpcoll_module->group_size; i++) {
|
||||
rc = mca_common_netpatterns_setup_narray_tree(
|
||||
rc = netpatterns_setup_narray_tree(
|
||||
cm->narray_radix,
|
||||
i,
|
||||
ptpcoll_module->group_size,
|
||||
@ -509,7 +509,7 @@ static int load_binomial_info(mca_bcol_ptpcoll_module_t *ptpcoll_module)
|
||||
static int load_recursive_knomial_info(mca_bcol_ptpcoll_module_t *ptpcoll_module)
|
||||
{
|
||||
int rc = OMPI_SUCCESS;
|
||||
rc = mca_common_netpatterns_setup_recursive_knomial_tree_node(
|
||||
rc = netpatterns_setup_recursive_knomial_tree_node(
|
||||
ptpcoll_module->group_size,
|
||||
ptpcoll_module->super.sbgp_partner_module->my_index,
|
||||
mca_bcol_ptpcoll_component.k_nomial_radix,
|
||||
|
@ -68,18 +68,9 @@ mcacomponentdir = $(pkglibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_coll_ml_la_SOURCES = $(sources)
|
||||
mca_coll_ml_la_LDFLAGS = -module -avoid-version
|
||||
mca_coll_ml_la_LIBADD = \
|
||||
$(top_ompi_builddir)/ompi/mca/common/commpatterns/libmca_common_commpatterns.la \
|
||||
$(top_ompi_builddir)/ompi/mca/common/netpatterns/libmca_common_netpatterns.la
|
||||
mca_coll_ml_la_LIBADD =
|
||||
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_coll_ml_la_SOURCES =$(sources)
|
||||
libmca_coll_ml_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
$(top_ompi_builddir)/ompi/mca/common/commpatterns/libmca_common_commpatterns.la: foo.c
|
||||
cd $(top_ompi_builddir)/ompi/mca/common/commpatterns && $(MAKE)
|
||||
$(top_ompi_builddir)/ompi/mca/common/netpatterns/libmca_common_netpatterns.la: foo.c
|
||||
cd $(top_ompi_builddir)/ompi/mca/common/netpatterns && $(MAKE)
|
||||
|
||||
foo.c:
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "coll_ml.h"
|
||||
#include "coll_ml_inlines.h"
|
||||
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
#include "coll_ml_mca.h"
|
||||
#include "coll_ml_custom_utils.h"
|
||||
|
||||
@ -440,7 +440,7 @@ static int ml_open(void)
|
||||
OBJ_CONSTRUCT(&(cs->sequential_collectives_mutex), opal_mutex_t);
|
||||
OBJ_CONSTRUCT(&(cs->sequential_collectives), opal_list_t);
|
||||
|
||||
rc = ompi_common_netpatterns_init();
|
||||
rc = netpatterns_init();
|
||||
if (OMPI_SUCCESS != rc) {
|
||||
return rc;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "ompi/mca/coll/base/base.h"
|
||||
#include "ompi/mca/coll/ml/coll_ml.h"
|
||||
#include "ompi/mca/coll/ml/coll_ml_inlines.h"
|
||||
#include "ompi/mca/common/commpatterns/common_coll_ops.h"
|
||||
#include "ompi/patterns/comm/coll_ops.h"
|
||||
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "coll_ml_inlines.h"
|
||||
#include "coll_ml_mca.h"
|
||||
#include "coll_ml_lmngr.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
#include "opal/mca/installdirs/installdirs.h"
|
||||
|
||||
/*
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "ompi/mca/sbgp/base/base.h"
|
||||
#include "ompi/mca/bcol/base/base.h"
|
||||
#include "ompi/mca/sbgp/sbgp.h"
|
||||
#include "ompi/mca/common/commpatterns/common_coll_ops.h"
|
||||
#include "ompi/patterns/comm/coll_ops.h"
|
||||
#include "ompi/mca/coll/ml/coll_ml.h"
|
||||
|
||||
#include "opal/util/argv.h"
|
||||
|
@ -1,104 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# A word of explanation...
|
||||
#
|
||||
# This library is linked against various MCA components because all
|
||||
# shared-memory based components (e.g., mpool, ptl, etc.) need to
|
||||
# share some common code and data. There's two cases:
|
||||
#
|
||||
# 1. libmca_common_commpatterns.la is a shared library. By linking that shared
|
||||
# library to all components that need it, the OS linker will
|
||||
# automatically load it into the process as necessary, and there will
|
||||
# only be one copy (i.e., all the components will share *one* copy of
|
||||
# the code and data).
|
||||
#
|
||||
# 2. libmca_common_commpatterns.la is a static library. In this case, it will
|
||||
# be rolled up into the top-level libmpi.la. It will also be rolled
|
||||
# into each component, but then the component will also be rolled up
|
||||
# into the upper-level libmpi.la. Linkers universally know how to
|
||||
# "figure this out" so that we end up with only one copy of the code
|
||||
# and data.
|
||||
#
|
||||
# Note that building this common component statically and linking
|
||||
# against other dynamic components is *not* supported!
|
||||
|
||||
EXTRA_DIST = .windows
|
||||
|
||||
# Header files
|
||||
|
||||
headers = \
|
||||
common_coll_ops.h \
|
||||
common_netpatterns.h \
|
||||
ompi_common_netpatterns_macros.h
|
||||
|
||||
# Source files
|
||||
|
||||
sources = \
|
||||
common_allreduce.c \
|
||||
common_allgather.c \
|
||||
common_bcast.c
|
||||
|
||||
# As per above, we'll either have an installable or noinst result.
|
||||
# The installable one should follow the same MCA prefix naming rules
|
||||
# (i.e., libmca_<type>_<name>.la). The noinst one can be named
|
||||
# whatever it wants, although libmca_<type>_<name>_noinst.la is
|
||||
# recommended.
|
||||
|
||||
# To simplify components that link to this library, we will *always*
|
||||
# have an output libtool library named libmca_<type>_<name>.la -- even
|
||||
# for case 2) described above (i.e., so there's no conditional logic
|
||||
# necessary in component Makefile.am's that link to this library).
|
||||
# Hence, if we're creating a noinst version of this library (i.e.,
|
||||
# case 2), we sym link it to the libmca_<type>_<name>.la name
|
||||
# (libtool will do the Right Things under the covers). See the
|
||||
# all-local and clean-local rules, below, for how this is effected.
|
||||
|
||||
lib_LTLIBRARIES =
|
||||
noinst_LTLIBRARIES =
|
||||
comp_inst = libmca_common_commpatterns.la
|
||||
comp_noinst = libmca_common_commpatterns_noinst.la
|
||||
|
||||
if MCA_BUILD_ompi_common_commpatterns_DSO
|
||||
lib_LTLIBRARIES += $(comp_inst)
|
||||
else
|
||||
noinst_LTLIBRARIES += $(comp_noinst)
|
||||
endif
|
||||
|
||||
libmca_common_commpatterns_la_SOURCES = $(headers) $(sources)
|
||||
libmca_common_commpatterns_noinst_la_SOURCES = $(libmca_common_commpatterns_la_SOURCES)
|
||||
libmca_common_commpatterns_la_LIBADD = \
|
||||
$(top_ompi_builddir)/ompi/mca/common/netpatterns/libmca_common_netpatterns.la
|
||||
|
||||
# These two rules will sym link the "noinst" libtool library filename
|
||||
# to the installable libtool library filename in the case where we are
|
||||
# compiling this component statically (case 2), described above).
|
||||
|
||||
all-local:
|
||||
if test -z "$(lib_LTLIBRARIES)"; then \
|
||||
rm -f "$(comp_inst)"; \
|
||||
$(LN_S) "$(comp_noinst)" "$(comp_inst)"; \
|
||||
fi
|
||||
|
||||
clean-local:
|
||||
if test -z "$(lib_LTLIBRARIES)"; then \
|
||||
rm -f "$(comp_inst)"; \
|
||||
fi
|
||||
# The code below guaranty that the netpatterns will be build before commpatterns
|
||||
FORCE:
|
||||
|
||||
$(top_ompi_builddir)/ompi/mca/common/netpatterns/libmca_common_netpatterns.la: FORCE
|
||||
(cd $(top_ompi_builddir)/ompi/mca/common/netpatterns/ && $(MAKE) $(AM_MAKEFLAGS) libmca_common_netpatterns.la)
|
||||
|
||||
install-libmca_common_netpatterns: FORCE
|
||||
(cd $(top_ompi_builddir)/ompi/mca/common/netpatterns/ && $(MAKE) $(AM_MAKEFLAGS) install)
|
||||
|
||||
install: install-libmca_common_netpatterns install-am
|
||||
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef OMPI_COMMON_NETPATTERNS_MACROS_H
|
||||
#define OMPI_COMMON_NETPATTERNS_MACROS_H
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
/* function to decompose an interger into it's representation in base K */
|
||||
/*
|
||||
* input_value - value to translate (input)
|
||||
* base - base of representation (input)
|
||||
* highest_power - the highest power that may have a non-zero entry (input)
|
||||
* the assumption is that this will be called in the critical path
|
||||
* to compute communication patterns, so will precompute such values
|
||||
* and pass the in.
|
||||
* base_to_power_i - array of base to ith power (input)
|
||||
* cum_base_to_power_i - array of cummulative base to ith power (input)
|
||||
* base_k_rep - representation in base "base". Space is pre-allocated. (out)
|
||||
*/
|
||||
static inline __opal_attribute_always_inline__ void
|
||||
common_netpatterns_obtain_rep_base_k (int input_value, int base,
|
||||
int highest_power, int *base_to_power_i,
|
||||
int *base_k_rep
|
||||
)
|
||||
{
|
||||
/* local variables */
|
||||
int lvl, work_value;
|
||||
|
||||
/* loop over all possible powers */
|
||||
work_value=input_value;
|
||||
for( lvl=highest_power ; lvl >= 0 ; lvl-- ) {
|
||||
/* still need to compute the actual coefficient */
|
||||
base_k_rep[lvl]=work_value/base_to_power_i[lvl];
|
||||
work_value-=(base_k_rep[lvl]*base_to_power_i[lvl]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /* OMPI_COMMON_NETPATTERNS_MACROS_H */
|
@ -1,12 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2008-2012 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# Specific to this module
|
||||
exclude_list=common_allreduce.c
|
@ -1,94 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
# Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# A word of explanation...
|
||||
#
|
||||
# This library is linked against various MCA components because all
|
||||
# shared-memory based components (e.g., mpool, ptl, etc.) need to
|
||||
# share some common code and data. There's two cases:
|
||||
#
|
||||
# 1. libmca_common_netpatterns.la is a shared library. By linking that shared
|
||||
# library to all components that need it, the OS linker will
|
||||
# automatically load it into the process as necessary, and there will
|
||||
# only be one copy (i.e., all the components will share *one* copy of
|
||||
# the code and data).
|
||||
#
|
||||
# 2. libmca_common_netpatterns.la is a static library. In this case, it will
|
||||
# be rolled up into the top-level libmpi.la. It will also be rolled
|
||||
# into each component, but then the component will also be rolled up
|
||||
# into the upper-level libmpi.la. Linkers universally know how to
|
||||
# "figure this out" so that we end up with only one copy of the code
|
||||
# and data.
|
||||
#
|
||||
# Note that building this common component statically and linking
|
||||
# against other dynamic components is *not* supported!
|
||||
|
||||
EXTRA_DIST = .windows
|
||||
|
||||
# Header files
|
||||
|
||||
headers = \
|
||||
common_netpatterns.h \
|
||||
common_netpatterns_knomial_tree.h \
|
||||
common_coll_ops.h
|
||||
|
||||
# Source files
|
||||
|
||||
sources = \
|
||||
common_netpatterns_base.c \
|
||||
common_netpatterns_multinomial_tree.c \
|
||||
common_netpatterns_nary_tree.c \
|
||||
common_netpatterns_knomial_tree.c
|
||||
|
||||
# common_allreduce.c # the allredeace is broken
|
||||
|
||||
# As per above, we'll either have an installable or noinst result.
|
||||
# The installable one should follow the same MCA prefix naming rules
|
||||
# (i.e., libmca_<type>_<name>.la). The noinst one can be named
|
||||
# whatever it wants, although libmca_<type>_<name>_noinst.la is
|
||||
# recommended.
|
||||
|
||||
# To simplify components that link to this library, we will *always*
|
||||
# have an output libtool library named libmca_<type>_<name>.la -- even
|
||||
# for case 2) described above (i.e., so there's no conditional logic
|
||||
# necessary in component Makefile.am's that link to this library).
|
||||
# Hence, if we're creating a noinst version of this library (i.e.,
|
||||
# case 2), we sym link it to the libmca_<type>_<name>.la name
|
||||
# (libtool will do the Right Things under the covers). See the
|
||||
# all-local and clean-local rules, below, for how this is effected.
|
||||
|
||||
lib_LTLIBRARIES =
|
||||
noinst_LTLIBRARIES =
|
||||
comp_inst = libmca_common_netpatterns.la
|
||||
comp_noinst = libmca_common_netpatterns_noinst.la
|
||||
|
||||
if MCA_BUILD_ompi_common_netpatterns_DSO
|
||||
lib_LTLIBRARIES += $(comp_inst)
|
||||
else
|
||||
noinst_LTLIBRARIES += $(comp_noinst)
|
||||
endif
|
||||
|
||||
libmca_common_netpatterns_la_SOURCES = $(headers) $(sources)
|
||||
libmca_common_netpatterns_noinst_la_SOURCES = $(libmca_common_netpatterns_la_SOURCES)
|
||||
|
||||
# These two rules will sym link the "noinst" libtool library filename
|
||||
# to the installable libtool library filename in the case where we are
|
||||
# compiling this component statically (case 2), described above).
|
||||
|
||||
all-local:
|
||||
if test -z "$(lib_LTLIBRARIES)"; then \
|
||||
rm -f "$(comp_inst)"; \
|
||||
$(LN_S) "$(comp_noinst)" "$(comp_inst)"; \
|
||||
fi
|
||||
|
||||
clean-local:
|
||||
if test -z "$(lib_LTLIBRARIES)"; then \
|
||||
rm -f "$(comp_inst)"; \
|
||||
fi
|
@ -35,8 +35,7 @@ mcacomponentdir = $(pkglibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_sbgp_basesmsocket_la_SOURCES = $(sources)
|
||||
mca_sbgp_basesmsocket_la_LDFLAGS = -module -avoid-version
|
||||
mca_sbgp_basesmsocket_la_LIBADD = \
|
||||
$(top_ompi_builddir)/ompi/mca/common/commpatterns/libmca_common_commpatterns.la
|
||||
mca_sbgp_basesmsocket_la_LIBADD =
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_sbgp_basesmsocket_la_SOURCES =$(sources)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "sbgp_basesmsocket.h"
|
||||
|
||||
#include "ompi/mca/common/commpatterns/common_coll_ops.h"
|
||||
#include "ompi/patterns/comm/coll_ops.h"
|
||||
|
||||
|
||||
/*
|
||||
|
16
ompi/patterns/comm/Makefile.am
Обычный файл
16
ompi/patterns/comm/Makefile.am
Обычный файл
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2013 Oak Ridge National Laboratory. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
headers += \
|
||||
patterns/comm/coll_ops.h \
|
||||
patterns/comm/commpatterns.h
|
||||
|
||||
libmpi_la_SOURCES += \
|
||||
patterns/comm/allreduce.c \
|
||||
patterns/comm/allgather.c \
|
||||
patterns/comm/bcast.c
|
@ -18,9 +18,9 @@
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "opal/include/opal/sys/atomic.h"
|
||||
#include "common_coll_ops.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/mca/pml/pml.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
#include "coll_ops.h"
|
||||
|
||||
/**
|
||||
* All-reduce - subgroup in communicator
|
||||
@ -35,7 +35,7 @@ OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count,
|
||||
int proc_block,extra_start,extra_end,iovec_len;
|
||||
int remote_data_start_rank,remote_data_end_rank;
|
||||
int local_data_start_rank;
|
||||
mca_common_netpatterns_pair_exchange_node_t my_exchange_node;
|
||||
netpatterns_pair_exchange_node_t my_exchange_node;
|
||||
size_t message_extent,current_data_extent,current_data_count;
|
||||
size_t dt_size;
|
||||
OPAL_PTRDIFF_TYPE dt_extent;
|
||||
@ -73,7 +73,7 @@ OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count,
|
||||
}
|
||||
|
||||
/* get my reduction communication pattern */
|
||||
rc = mca_common_netpatterns_setup_recursive_doubling_tree_node(n_peers,
|
||||
rc = netpatterns_setup_recursive_doubling_tree_node(n_peers,
|
||||
my_rank_in_group, &my_exchange_node);
|
||||
if(OMPI_SUCCESS != rc){
|
||||
return rc;
|
@ -18,10 +18,10 @@
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "opal/include/opal/sys/atomic.h"
|
||||
#include "ompi/mca/common/commpatterns/common_netpatterns.h"
|
||||
#include "common_coll_ops.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/mca/pml/pml.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
#include "coll_ops.h"
|
||||
#include "commpatterns.h"
|
||||
|
||||
/**
|
||||
* All-reduce for contigous primitive types
|
||||
@ -34,7 +34,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count,
|
||||
/* local variables */
|
||||
int rc=OMPI_SUCCESS,n_dts_per_buffer,n_data_segments,stripe_number;
|
||||
int pair_rank,exchange,extra_rank;
|
||||
mca_common_netpatterns_pair_exchange_node_t my_exchange_node;
|
||||
netpatterns_pair_exchange_node_t my_exchange_node;
|
||||
int count_processed,count_this_stripe;
|
||||
size_t dt_size,dt_extent;
|
||||
char scratch_bufers[2][MAX_TMP_BUFFER];
|
||||
@ -76,7 +76,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count,
|
||||
n_data_segments=(count+n_dts_per_buffer -1 ) / n_dts_per_buffer ;
|
||||
|
||||
/* get my reduction communication pattern */
|
||||
rc = mca_common_netpatterns_setup_recursive_doubling_tree_node(n_peers,
|
||||
rc = netpatterns_setup_recursive_doubling_tree_node(n_peers,
|
||||
my_rank_in_group, &my_exchange_node);
|
||||
if(OMPI_SUCCESS != rc){
|
||||
return rc;
|
@ -18,9 +18,9 @@
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "ompi/communicator/communicator.h"
|
||||
#include "opal/include/opal/sys/atomic.h"
|
||||
#include "common_coll_ops.h"
|
||||
#include "ompi/mca/common/netpatterns/common_netpatterns.h"
|
||||
#include "ompi/mca/pml/pml.h"
|
||||
#include "ompi/patterns/net/netpatterns.h"
|
||||
#include "coll_ops.h"
|
||||
|
||||
/**
|
||||
* Bcast - subgroup in communicator
|
||||
@ -35,7 +35,7 @@ OMPI_DECLSPEC int comm_bcast_pml(void *buffer, int root, int count,
|
||||
int rc=OMPI_SUCCESS,msg_cnt,i;
|
||||
ompi_request_t *requests[2];
|
||||
int node_rank, peer_rank;
|
||||
mca_common_netpatterns_tree_node_t node_data;
|
||||
netpatterns_tree_node_t node_data;
|
||||
|
||||
/*
|
||||
* shift rank to root==0 tree
|
||||
@ -45,7 +45,7 @@ OMPI_DECLSPEC int comm_bcast_pml(void *buffer, int root, int count,
|
||||
/*
|
||||
* compute my communication pattern - binary tree
|
||||
*/
|
||||
rc=mca_common_netpatterns_setup_narray_tree(2, node_rank, n_peers,
|
||||
rc=netpatterns_setup_narray_tree(2, node_rank, n_peers,
|
||||
&node_data);
|
||||
if( OMPI_SUCCESS != rc ) {
|
||||
goto Error;
|
18
ompi/patterns/net/Makefile.am
Обычный файл
18
ompi/patterns/net/Makefile.am
Обычный файл
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2013 Oak Ridge National Laboratory. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
headers += \
|
||||
patterns/net/netpatterns.h \
|
||||
patterns/net/netpatterns_knomial_tree.h \
|
||||
patterns/net/coll_ops.h
|
||||
|
||||
libmpi_la_SOURCES += \
|
||||
patterns/net/netpatterns_base.c \
|
||||
patterns/net/netpatterns_multinomial_tree.c \
|
||||
patterns/net/netpatterns_nary_tree.c \
|
||||
patterns/net/netpatterns_knomial_tree.c
|
@ -83,7 +83,7 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype,
|
||||
int rc=OMPI_SUCCESS,n_dts_per_buffer,n_data_segments,stripe_number;
|
||||
int pair_rank,exchange,extra_rank;
|
||||
int index_read,index_write;
|
||||
mca_common_netpatterns_pair_exchange_node_t my_exchange_node;
|
||||
netpatterns_pair_exchange_node_t my_exchange_node;
|
||||
int my_rank,count_processed,count_this_stripe;
|
||||
size_t n_peers,message_extent,len_data_buffer;
|
||||
size_t dt_size;
|
||||
@ -152,7 +152,7 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype,
|
||||
}
|
||||
|
||||
/* get my reduction communication pattern */
|
||||
ret=mca_common_netpatterns_setup_recursive_doubling_tree_node(n_peers,my_rank,&my_exchange_node);
|
||||
ret=netpatterns_setup_recursive_doubling_tree_node(n_peers,my_rank,&my_exchange_node);
|
||||
if(OMPI_SUCCESS != ret){
|
||||
return ret;
|
||||
}
|
@ -16,25 +16,25 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mca/rte/rte.h"
|
||||
#include "common_netpatterns_knomial_tree.h"
|
||||
#include "netpatterns_knomial_tree.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
int ompi_common_netpatterns_base_err(const char* fmt, ...);
|
||||
int ompi_common_netpatterns_register_mca_params(void);
|
||||
int netpatterns_base_err(const char* fmt, ...);
|
||||
int netpatterns_register_mca_params(void);
|
||||
|
||||
#if OPAL_ENABLE_DEBUG
|
||||
extern int ompi_common_netpatterns_base_verbose; /* disabled by default */
|
||||
OMPI_DECLSPEC extern int ompi_common_netpatterns_base_err(const char*, ...) __opal_attribute_format__(__printf__, 1, 2);
|
||||
extern int netpatterns_base_verbose; /* disabled by default */
|
||||
OMPI_DECLSPEC extern int netpatterns_base_err(const char*, ...) __opal_attribute_format__(__printf__, 1, 2);
|
||||
#define NETPATTERNS_VERBOSE(args) \
|
||||
do { \
|
||||
if(ompi_common_netpatterns_base_verbose > 0) { \
|
||||
ompi_common_netpatterns_base_err("[%s]%s[%s:%d:%s] ",\
|
||||
if(netpatterns_base_verbose > 0) { \
|
||||
netpatterns_base_err("[%s]%s[%s:%d:%s] ",\
|
||||
ompi_process_info.nodename, \
|
||||
OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \
|
||||
__FILE__, __LINE__, __func__); \
|
||||
ompi_common_netpatterns_base_err args; \
|
||||
ompi_common_netpatterns_base_err("\n"); \
|
||||
netpatterns_base_err args; \
|
||||
netpatterns_base_err("\n"); \
|
||||
} \
|
||||
} while(0);
|
||||
#else
|
||||
@ -72,7 +72,7 @@ enum {
|
||||
/*
|
||||
* N-order tree node description
|
||||
*/
|
||||
struct mca_common_netpatterns_tree_node_t {
|
||||
struct netpatterns_tree_node_t {
|
||||
/* my rank within the group */
|
||||
int my_rank;
|
||||
/* my node type - root, leaf, or interior */
|
||||
@ -88,13 +88,13 @@ struct mca_common_netpatterns_tree_node_t {
|
||||
/* chidren ranks within the group */
|
||||
int *children_ranks;
|
||||
};
|
||||
typedef struct mca_common_netpatterns_tree_node_t mca_common_netpatterns_tree_node_t;
|
||||
typedef struct netpatterns_tree_node_t netpatterns_tree_node_t;
|
||||
|
||||
struct mca_common_netpatterns_k_exchange_node_t;
|
||||
struct netpatterns_k_exchange_node_t;
|
||||
/*
|
||||
* N-order + knominal tree node description
|
||||
*/
|
||||
struct mca_common_netpatterns_narray_knomial_tree_node_t {
|
||||
struct netpatterns_narray_knomial_tree_node_t {
|
||||
/* my rank within the group */
|
||||
int my_rank;
|
||||
/* my node type - root, leaf, or interior */
|
||||
@ -114,30 +114,30 @@ struct mca_common_netpatterns_narray_knomial_tree_node_t {
|
||||
/* Rank on this node inside of level */
|
||||
int rank_on_level;
|
||||
/* Knomial recursive gather information */
|
||||
struct mca_common_netpatterns_k_exchange_node_t k_node;
|
||||
struct netpatterns_k_exchange_node_t k_node;
|
||||
};
|
||||
typedef struct mca_common_netpatterns_narray_knomial_tree_node_t
|
||||
mca_common_netpatterns_narray_knomial_tree_node_t;
|
||||
typedef struct netpatterns_narray_knomial_tree_node_t
|
||||
netpatterns_narray_knomial_tree_node_t;
|
||||
|
||||
|
||||
/* Init code for common_netpatterns */
|
||||
OMPI_DECLSPEC int ompi_common_netpatterns_init(void);
|
||||
OMPI_DECLSPEC int netpatterns_init(void);
|
||||
|
||||
/* setup an n-array tree */
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_narray_tree(int tree_order, int my_rank, int num_nodes,
|
||||
mca_common_netpatterns_tree_node_t *my_node);
|
||||
OMPI_DECLSPEC int netpatterns_setup_narray_tree(int tree_order, int my_rank, int num_nodes,
|
||||
netpatterns_tree_node_t *my_node);
|
||||
/* setup an n-array tree with k-nomial levels */
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_narray_knomial_tree( int tree_order, int my_rank, int num_nodes,
|
||||
mca_common_netpatterns_narray_knomial_tree_node_t *my_node);
|
||||
OMPI_DECLSPEC int netpatterns_setup_narray_knomial_tree( int tree_order, int my_rank, int num_nodes,
|
||||
netpatterns_narray_knomial_tree_node_t *my_node);
|
||||
|
||||
/* setup an multi-nomial tree - for each node in the tree
|
||||
* this returns it's parent, and it's children
|
||||
*/
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_multinomial_tree(int tree_order, int num_nodes,
|
||||
mca_common_netpatterns_tree_node_t *tree_nodes);
|
||||
OMPI_DECLSPEC int netpatterns_setup_multinomial_tree(int tree_order, int num_nodes,
|
||||
netpatterns_tree_node_t *tree_nodes);
|
||||
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_narray_tree_contigous_ranks(int tree_order,
|
||||
int num_nodes, mca_common_netpatterns_tree_node_t **tree_nodes);
|
||||
OMPI_DECLSPEC int netpatterns_setup_narray_tree_contigous_ranks(int tree_order,
|
||||
int num_nodes, netpatterns_tree_node_t **tree_nodes);
|
||||
|
||||
/* calculate the nearest power of radix that is equal to or greater
|
||||
* than size, with the specified radix. The resulting tree is of
|
@ -10,23 +10,23 @@
|
||||
*/
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
#include "ompi/include/ompi/constants.h"
|
||||
#include "common_netpatterns.h"
|
||||
#include "netpatterns.h"
|
||||
|
||||
int ompi_common_netpatterns_base_verbose = 0; /* disabled by default */
|
||||
int netpatterns_base_verbose = 0; /* disabled by default */
|
||||
|
||||
int ompi_common_netpatterns_register_mca_params(void)
|
||||
int netpatterns_register_mca_params(void)
|
||||
{
|
||||
mca_base_param_reg_int_name("common",
|
||||
"netpatterns_base_verbose",
|
||||
"Verbosity level of the NETPATTERNS framework",
|
||||
false, false,
|
||||
0,
|
||||
&ompi_common_netpatterns_base_verbose);
|
||||
&netpatterns_base_verbose);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_common_netpatterns_base_err(const char* fmt, ...)
|
||||
int netpatterns_base_err(const char* fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
int ret;
|
||||
@ -37,16 +37,16 @@ int ompi_common_netpatterns_base_err(const char* fmt, ...)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ompi_common_netpatterns_init(void)
|
||||
int netpatterns_init(void)
|
||||
{
|
||||
/* There is no component for common_netpatterns so every component that uses it
|
||||
should call ompi_common_netpatterns_init, still we want to run it only once */
|
||||
should call netpatterns_init, still we want to run it only once */
|
||||
static int was_called = 0;
|
||||
|
||||
if (0 == was_called) {
|
||||
was_called = 1;
|
||||
|
||||
return ompi_common_netpatterns_register_mca_params();
|
||||
return netpatterns_register_mca_params();
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
@ -24,13 +24,13 @@
|
||||
|
||||
#include "ompi/mca/rte/rte.h"
|
||||
|
||||
#include "common_netpatterns.h"
|
||||
#include "netpatterns.h"
|
||||
|
||||
/* setup recursive doubleing tree node */
|
||||
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
int num_nodes, int node_rank, int tree_order, int *hier_ranks,
|
||||
mca_common_netpatterns_k_exchange_node_t *exchange_node)
|
||||
netpatterns_k_exchange_node_t *exchange_node)
|
||||
{
|
||||
/* local variables */
|
||||
int i, j, cnt, i_temp;
|
||||
@ -47,7 +47,7 @@ OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_knomial_allgather_tree_
|
||||
|
||||
|
||||
NETPATTERNS_VERBOSE(
|
||||
("Enter mca_common_netpatterns_setup_recursive_knomial_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)",
|
||||
("Enter netpatterns_setup_recursive_knomial_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)",
|
||||
num_nodes, node_rank, tree_order));
|
||||
|
||||
assert(num_nodes > 1);
|
||||
@ -195,13 +195,13 @@ OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_knomial_allgather_tree_
|
||||
}
|
||||
|
||||
|
||||
exchange_node->payload_info = (mca_common_netpatterns_payload_t **) malloc(sizeof(mca_common_netpatterns_payload_t *)*pow_k);
|
||||
exchange_node->payload_info = (netpatterns_payload_t **) malloc(sizeof(netpatterns_payload_t *)*pow_k);
|
||||
if( NULL == exchange_node->payload_info) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
for(i = 0; i < pow_k; i++){
|
||||
exchange_node->payload_info[i] = (mca_common_netpatterns_payload_t *) malloc(sizeof(mca_common_netpatterns_payload_t)*(tree_order-1));
|
||||
exchange_node->payload_info[i] = (netpatterns_payload_t *) malloc(sizeof(netpatterns_payload_t)*(tree_order-1));
|
||||
if( NULL == exchange_node->payload_info[i]) {
|
||||
goto Error;
|
||||
}
|
||||
@ -500,9 +500,9 @@ Error:
|
||||
}
|
||||
|
||||
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_knomial_tree_node(
|
||||
OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_tree_node(
|
||||
int num_nodes, int node_rank, int tree_order,
|
||||
mca_common_netpatterns_k_exchange_node_t *exchange_node)
|
||||
netpatterns_k_exchange_node_t *exchange_node)
|
||||
{
|
||||
/* local variables */
|
||||
int i, j, tmp, cnt;
|
||||
@ -510,7 +510,7 @@ OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_knomial_tree_node(
|
||||
int k_base, kpow_num, peer;
|
||||
|
||||
NETPATTERNS_VERBOSE(
|
||||
("Enter mca_common_netpatterns_setup_recursive_knomial_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)",
|
||||
("Enter netpatterns_setup_recursive_knomial_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)",
|
||||
num_nodes, node_rank, tree_order));
|
||||
|
||||
assert(num_nodes > 1);
|
||||
@ -656,15 +656,15 @@ Error:
|
||||
}
|
||||
|
||||
#if 1
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank, int tree_order,
|
||||
mca_common_netpatterns_pair_exchange_node_t *exchange_node)
|
||||
OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank, int tree_order,
|
||||
netpatterns_pair_exchange_node_t *exchange_node)
|
||||
{
|
||||
/* local variables */
|
||||
int i, tmp, cnt;
|
||||
int n_levels;
|
||||
int shift, mask;
|
||||
|
||||
NETPATTERNS_VERBOSE(("Enter mca_common_netpatterns_setup_recursive_doubling_n_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)", num_nodes, node_rank, tree_order));
|
||||
NETPATTERNS_VERBOSE(("Enter netpatterns_setup_recursive_doubling_n_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)", num_nodes, node_rank, tree_order));
|
||||
|
||||
assert(num_nodes > 1);
|
||||
while (tree_order > num_nodes) {
|
||||
@ -797,8 +797,8 @@ Error:
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
OMPI_DECLSPEC void mca_common_netpatterns_free_recursive_doubling_tree_node(
|
||||
mca_common_netpatterns_pair_exchange_node_t *exchange_node)
|
||||
OMPI_DECLSPEC void netpatterns_free_recursive_doubling_tree_node(
|
||||
netpatterns_pair_exchange_node_t *exchange_node)
|
||||
{
|
||||
NETPATTERNS_VERBOSE(("About to release rank_extra_sources_array and rank_exchanges"));
|
||||
if (exchange_node->rank_extra_sources_array != NULL) {
|
||||
@ -811,16 +811,16 @@ OMPI_DECLSPEC void mca_common_netpatterns_free_recursive_doubling_tree_node(
|
||||
}
|
||||
#endif
|
||||
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank,
|
||||
mca_common_netpatterns_pair_exchange_node_t *exchange_node)
|
||||
OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank,
|
||||
netpatterns_pair_exchange_node_t *exchange_node)
|
||||
{
|
||||
return mca_common_netpatterns_setup_recursive_doubling_n_tree_node(num_nodes, node_rank, 2, exchange_node);
|
||||
return netpatterns_setup_recursive_doubling_n_tree_node(num_nodes, node_rank, 2, exchange_node);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*OMPI_DECLSPEC int old_mca_common_netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank,*/
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank,int tree_order,
|
||||
mca_common_netpatterns_pair_exchange_node_t *exchange_node)
|
||||
/*OMPI_DECLSPEC int old_netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank,*/
|
||||
OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank,int tree_order,
|
||||
netpatterns_pair_exchange_node_t *exchange_node)
|
||||
{
|
||||
/* local variables */
|
||||
/*int tree_order;*/
|
@ -28,7 +28,7 @@ enum {
|
||||
EXTRA_NODE
|
||||
};
|
||||
|
||||
struct mca_common_netpatterns_pair_exchange_node_t {
|
||||
struct netpatterns_pair_exchange_node_t {
|
||||
|
||||
/* Order of a node in the tree - usually 2 */
|
||||
int tree_order;
|
||||
@ -62,17 +62,17 @@ struct mca_common_netpatterns_pair_exchange_node_t {
|
||||
int node_type;
|
||||
|
||||
};
|
||||
typedef struct mca_common_netpatterns_pair_exchange_node_t mca_common_netpatterns_pair_exchange_node_t;
|
||||
typedef struct netpatterns_pair_exchange_node_t netpatterns_pair_exchange_node_t;
|
||||
|
||||
struct mca_common_netpatterns_payload_t {
|
||||
struct netpatterns_payload_t {
|
||||
int s_len;
|
||||
int r_len;
|
||||
int s_offset;
|
||||
int r_offset;
|
||||
};
|
||||
typedef struct mca_common_netpatterns_payload_t mca_common_netpatterns_payload_t;
|
||||
typedef struct netpatterns_payload_t netpatterns_payload_t;
|
||||
|
||||
struct mca_common_netpatterns_k_exchange_node_t {
|
||||
struct netpatterns_k_exchange_node_t {
|
||||
/* Order of a node in the tree - usually 2 */
|
||||
int tree_order;
|
||||
/* number of nodes this node will exchange data with */
|
||||
@ -103,27 +103,27 @@ struct mca_common_netpatterns_k_exchange_node_t {
|
||||
/* reindexed node_rank */
|
||||
int reindex_myid;
|
||||
/* 2-d array that hold payload info for each level of recursive k-ing */
|
||||
mca_common_netpatterns_payload_t **payload_info;
|
||||
netpatterns_payload_t **payload_info;
|
||||
};
|
||||
typedef struct mca_common_netpatterns_k_exchange_node_t
|
||||
mca_common_netpatterns_k_exchange_node_t;
|
||||
typedef struct netpatterns_k_exchange_node_t
|
||||
netpatterns_k_exchange_node_t;
|
||||
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank, int tree_order,
|
||||
mca_common_netpatterns_pair_exchange_node_t *exchange_node);
|
||||
OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank, int tree_order,
|
||||
netpatterns_pair_exchange_node_t *exchange_node);
|
||||
|
||||
OMPI_DECLSPEC void mca_common_netpatterns_free_recursive_doubling_tree_node(
|
||||
mca_common_netpatterns_pair_exchange_node_t *exchange_node);
|
||||
OMPI_DECLSPEC void netpatterns_free_recursive_doubling_tree_node(
|
||||
netpatterns_pair_exchange_node_t *exchange_node);
|
||||
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank,
|
||||
mca_common_netpatterns_pair_exchange_node_t *exchange_node);
|
||||
OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank,
|
||||
netpatterns_pair_exchange_node_t *exchange_node);
|
||||
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_knomial_tree_node(
|
||||
OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_tree_node(
|
||||
int num_nodes, int node_rank, int tree_order,
|
||||
mca_common_netpatterns_k_exchange_node_t *exchange_node);
|
||||
netpatterns_k_exchange_node_t *exchange_node);
|
||||
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node(
|
||||
int num_nodes, int node_rank, int tree_order, int *hier_ranks,
|
||||
mca_common_netpatterns_k_exchange_node_t *exchange_node);
|
||||
netpatterns_k_exchange_node_t *exchange_node);
|
||||
|
||||
|
||||
/* Input: k_exchange_node structure
|
||||
@ -137,7 +137,7 @@ OMPI_DECLSPEC int mca_common_netpatterns_setup_recursive_knomial_allgather_tree_
|
||||
*/
|
||||
|
||||
static inline __opal_attribute_always_inline__
|
||||
int mca_common_netpatterns_get_knomial_level(
|
||||
int netpatterns_get_knomial_level(
|
||||
int my_rank, int src_rank,
|
||||
int radix, int size,
|
||||
int *k_level)
|
||||
@ -169,7 +169,7 @@ int mca_common_netpatterns_get_knomial_level(
|
||||
* Output: source of the data, offset in power of K
|
||||
*/
|
||||
static inline __opal_attribute_always_inline__
|
||||
int mca_common_netpatterns_get_knomial_data_source(
|
||||
int netpatterns_get_knomial_data_source(
|
||||
int my_rank, int root, int radix, int size,
|
||||
int *k_level, int *logk_level)
|
||||
{
|
||||
@ -189,11 +189,11 @@ int mca_common_netpatterns_get_knomial_data_source(
|
||||
}
|
||||
|
||||
/* Input: my_rank, radix,
|
||||
* k_level - that you get from mca_common_netpatterns_get_knomial_data_source
|
||||
* k_level - that you get from netpatterns_get_knomial_data_source
|
||||
* k_step - some integer
|
||||
* Output: peer - next children in the tree
|
||||
* Usage:
|
||||
* src = mca_common_netpatterns_get_knomial_data_source(
|
||||
* src = netpatterns_get_knomial_data_source(
|
||||
* my_rank, root, radix, size,
|
||||
* &k_level, &logk_level)
|
||||
* recv_from(src......);
|
||||
@ -206,11 +206,11 @@ int mca_common_netpatterns_get_knomial_data_source(
|
||||
* for more example please grep in ptpcoll bcol bcast files
|
||||
*/
|
||||
|
||||
typedef struct mca_common_netpatter_knomial_step_info_t {
|
||||
typedef struct netpatterns_knomial_step_info_t {
|
||||
int k_step;
|
||||
int k_level;
|
||||
int k_tmp_peer;
|
||||
} mca_common_netpatter_knomial_step_info_t;
|
||||
} netpatterns_knomial_step_info_t;
|
||||
|
||||
#define MCA_COMMON_NETPATTERNS_GET_NEXT_KNOMIAL_UPDATE_LEVEL_FOR_BCAST(step_info, radix)\
|
||||
do { \
|
@ -20,14 +20,14 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ompi/constants.h"
|
||||
#include "common_netpatterns.h"
|
||||
#include "netpatterns.h"
|
||||
|
||||
|
||||
/* setup an multi-nomial tree - for each node in the tree
|
||||
* this returns it's parent, and it's children */
|
||||
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_multinomial_tree(int tree_order, int num_nodes,
|
||||
mca_common_netpatterns_tree_node_t *tree_nodes)
|
||||
OMPI_DECLSPEC int netpatterns_setup_multinomial_tree(int tree_order, int num_nodes,
|
||||
netpatterns_tree_node_t *tree_nodes)
|
||||
{
|
||||
/* local variables */
|
||||
int i,result;
|
@ -21,7 +21,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ompi/constants.h"
|
||||
#include "common_netpatterns.h"
|
||||
#include "netpatterns.h"
|
||||
|
||||
/*
|
||||
* Create mmaped shared file
|
||||
@ -29,8 +29,8 @@
|
||||
|
||||
/* setup an n-array tree */
|
||||
|
||||
int mca_common_netpatterns_setup_narray_tree(int tree_order, int my_rank, int num_nodes,
|
||||
mca_common_netpatterns_tree_node_t *my_node)
|
||||
int netpatterns_setup_narray_tree(int tree_order, int my_rank, int num_nodes,
|
||||
netpatterns_tree_node_t *my_node)
|
||||
{
|
||||
/* local variables */
|
||||
int n_levels, result;
|
||||
@ -156,9 +156,9 @@ Error:
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
int mca_common_netpatterns_setup_narray_knomial_tree(
|
||||
int netpatterns_setup_narray_knomial_tree(
|
||||
int tree_order, int my_rank, int num_nodes,
|
||||
mca_common_netpatterns_narray_knomial_tree_node_t *my_node)
|
||||
netpatterns_narray_knomial_tree_node_t *my_node)
|
||||
{
|
||||
/* local variables */
|
||||
int n_levels, result;
|
||||
@ -216,7 +216,7 @@ int mca_common_netpatterns_setup_narray_knomial_tree(
|
||||
my_rank-cum_cnt;
|
||||
my_node->level_size = cnt;
|
||||
|
||||
rc = mca_common_netpatterns_setup_recursive_knomial_tree_node(
|
||||
rc = netpatterns_setup_recursive_knomial_tree_node(
|
||||
my_node->level_size, my_node->rank_on_level,
|
||||
tree_order, &my_node->k_node);
|
||||
if (OMPI_SUCCESS != rc) {
|
||||
@ -325,7 +325,7 @@ OMPI_DECLSPEC int roundup_to_power_radix ( int radix, int size, int *n_lvls )
|
||||
}
|
||||
|
||||
static int fill_in_node_data(int tree_order, int num_nodes, int my_node,
|
||||
mca_common_netpatterns_tree_node_t *nodes_data)
|
||||
netpatterns_tree_node_t *nodes_data)
|
||||
{
|
||||
/* local variables */
|
||||
int rc, num_ranks_per_child, num_children, n_extra;
|
||||
@ -415,16 +415,16 @@ error:
|
||||
* ranks may be rotated based on who the actual root is, to obtain the
|
||||
* appropriate communication pattern for such roots.
|
||||
*/
|
||||
OMPI_DECLSPEC int mca_common_netpatterns_setup_narray_tree_contigous_ranks(
|
||||
OMPI_DECLSPEC int netpatterns_setup_narray_tree_contigous_ranks(
|
||||
int tree_order, int num_nodes,
|
||||
mca_common_netpatterns_tree_node_t **tree_nodes)
|
||||
netpatterns_tree_node_t **tree_nodes)
|
||||
{
|
||||
/* local variables */
|
||||
int num_descendent_ranks=num_nodes-1;
|
||||
int rc=OMPI_SUCCESS;
|
||||
|
||||
*tree_nodes=(mca_common_netpatterns_tree_node_t *)malloc(
|
||||
sizeof(mca_common_netpatterns_tree_node_t)*
|
||||
*tree_nodes=(netpatterns_tree_node_t *)malloc(
|
||||
sizeof(netpatterns_tree_node_t)*
|
||||
num_nodes);
|
||||
if(!(*tree_nodes) ) {
|
||||
fprintf(stderr, "Cannot allocate memory for tree_nodes.\n");
|
Загрузка…
Ссылка в новой задаче
Block a user