int ompi_coll_tuned_barrier_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices) { mca_base_var_enum_t *new_enum; ompi_coll_tuned_forced_max_algorithms[BARRIER] = coll_tuned_barrier_algorithm_count; (void) mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "barrier_algorithm_count", "Number of barrier algorithms available", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_DEFAULT_ONLY, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_CONSTANT, &coll_tuned_barrier_algorithm_count); /* MPI_T: This variable should eventually be bound to a communicator */ coll_tuned_barrier_forced_algorithm = 0; (void) mca_base_var_enum_create("coll_tuned_barrier_algorithms", barrier_algorithms, &new_enum); mca_param_indices->algorithm_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "barrier_algorithm", "Which barrier algorithm is used. Can be locked down to choice of: 0 ignore, 1 linear, 2 double ring, 3: recursive doubling 4: bruck, 5: two proc only, 6: tree", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_barrier_forced_algorithm); OBJ_RELEASE(new_enum); if (mca_param_indices->algorithm_param_index < 0) { return mca_param_indices->algorithm_param_index; } return (MPI_SUCCESS); }
int ompi_win_init(void) { int ret; assert (sizeof (ompi_predefined_win_t) >= sizeof (ompi_win_t)); /* setup window Fortran array */ OBJ_CONSTRUCT(&ompi_mpi_windows, opal_pointer_array_t); if( OPAL_SUCCESS != opal_pointer_array_init(&ompi_mpi_windows, 4, OMPI_FORTRAN_HANDLE_MAX, 16) ) { return OMPI_ERROR; } /* Setup MPI_WIN_NULL */ OBJ_CONSTRUCT(&ompi_mpi_win_null.win, ompi_win_t); ompi_mpi_win_null.win.w_flags = OMPI_WIN_INVALID; ompi_mpi_win_null.win.w_group = &ompi_mpi_group_null.group; OBJ_RETAIN(&ompi_mpi_group_null); ompi_win_set_name(&ompi_mpi_win_null.win, "MPI_WIN_NULL"); opal_pointer_array_set_item(&ompi_mpi_windows, 0, &ompi_mpi_win_null.win); ret = mca_base_var_enum_create ("accumulate_ops", accumulate_ops_values, &ompi_win_accumulate_ops); if (OPAL_SUCCESS != ret) { return ret; } ret = mca_base_var_enum_create_flag ("accumulate_order", accumulate_order_flags, &ompi_win_accumulate_order); if (OPAL_SUCCESS != ret) { return ret; } return OMPI_SUCCESS; }
int opal_dss_register_vars (void) { mca_base_var_enum_t *new_enum; char *enviro_val; int ret; enviro_val = getenv("OPAL_dss_debug"); if (NULL != enviro_val) { /* debug requested */ opal_dss_verbose = 0; } opal_dss_group_id = mca_base_var_group_register ("opal", "dss", NULL, NULL); /** set the default buffer type. If we are in debug mode, then we default * to fully described buffers. Otherwise, we default to non-described for brevity * and performance */ #if OPAL_ENABLE_DEBUG default_buf_type = OPAL_DSS_BUFFER_FULLY_DESC; #else default_buf_type = OPAL_DSS_BUFFER_NON_DESC; #endif ret = mca_base_var_enum_create ("buffer types", buffer_type_values, &new_enum); if (OPAL_SUCCESS != ret) { fprintf (stderr, "Fail A\n"); return ret; } ret = mca_base_var_register ("opal", "dss", NULL, "buffer_type", "Set the default mode for OpenRTE buffers (0=non-described, 1=described)", MCA_BASE_VAR_TYPE_INT, new_enum, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_8, MCA_BASE_VAR_SCOPE_ALL_EQ, &default_buf_type); OBJ_RELEASE(new_enum); if (0 > ret) { return ret; } /* setup the initial size of the buffer. */ opal_dss_initial_size = OPAL_DSS_DEFAULT_INITIAL_SIZE; ret = mca_base_var_register ("opal", "dss", NULL, "buffer_initial_size", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_8, MCA_BASE_VAR_SCOPE_ALL_EQ, &opal_dss_initial_size); if (0 > ret) { return ret; } /* the threshold as to where to stop doubling the size of the buffer * allocated memory and start doing additive increases */ opal_dss_threshold_size = OPAL_DSS_DEFAULT_THRESHOLD_SIZE; ret = mca_base_var_register ("opal", "dss", NULL, "buffer_threshold_size", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_8, MCA_BASE_VAR_SCOPE_ALL_EQ, &opal_dss_threshold_size); return (0 > ret) ? ret : OPAL_SUCCESS; }
static int orte_ess_base_register(mca_base_register_flag_t flags) { mca_base_var_enum_t *new_enum; int ret; orte_ess_base_std_buffering = -1; (void) mca_base_var_enum_create("ess_base_stream_buffering", stream_buffering_values, &new_enum); (void) mca_base_var_register("orte", "ess", "base", "stream_buffering", "Adjust buffering for stdout/stderr " "[-1 system default] [0 unbuffered] [1 line buffered] [2 fully buffered] " "(Default: -1)", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &orte_ess_base_std_buffering); OBJ_RELEASE(new_enum); orte_ess_base_jobid = NULL; ret = mca_base_var_register("orte", "ess", "base", "jobid", "Process jobid", MCA_BASE_VAR_TYPE_STRING, NULL, 0, MCA_BASE_VAR_FLAG_INTERNAL, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &orte_ess_base_jobid); mca_base_var_register_synonym(ret, "orte", "orte", "ess", "jobid", 0); orte_ess_base_vpid = NULL; ret = mca_base_var_register("orte", "ess", "base", "vpid", "Process vpid", MCA_BASE_VAR_TYPE_STRING, NULL, 0, MCA_BASE_VAR_FLAG_INTERNAL, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &orte_ess_base_vpid); mca_base_var_register_synonym(ret, "orte", "orte", "ess", "vpid", 0); orte_ess_base_num_procs = -1; ret = mca_base_var_register("orte", "ess", "base", "num_procs", "Used to discover the number of procs in the job", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_INTERNAL, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &orte_ess_base_num_procs); mca_base_var_register_synonym(ret, "orte", "orte", "ess", "num_procs", 0); return ORTE_SUCCESS; }
/* * The following are used by dynamic and forced rules. Publish * details of each algorithm and if its forced/fixed/locked in as you add * methods/algorithms you must update this and the query/map routines. * This routine is called by the component only. This makes sure that * the mca parameters are set to their initial values and perms. * Module does not call this. They call the forced_getvalues routine * instead. */ int ompi_coll_tuned_alltoallv_intra_check_forced_init(coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices) { mca_base_var_enum_t *new_enum; int cnt; for( cnt = 0; NULL != alltoallv_algorithms[cnt].string; cnt++ ); ompi_coll_tuned_forced_max_algorithms[ALLTOALLV] = cnt; (void) mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "alltoallv_algorithm_count", "Number of alltoallv algorithms available", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_DEFAULT_ONLY, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_CONSTANT, &cnt); /* MPI_T: This variable should eventually be bound to a communicator */ coll_tuned_alltoallv_forced_algorithm = 0; (void) mca_base_var_enum_create("coll_tuned_alltoallv_algorithms", alltoallv_algorithms, &new_enum); mca_param_indices->algorithm_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "alltoallv_algorithm", "Which alltoallv algorithm is used. " "Can be locked down to choice of: 0 ignore, " "1 basic linear, 2 pairwise.", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_alltoallv_forced_algorithm); OBJ_RELEASE(new_enum); if (mca_param_indices->algorithm_param_index < 0) { return mca_param_indices->algorithm_param_index; } return (MPI_SUCCESS); }
/* * Setup the usnic_X device enumeration pvar */ static void setup_mpit_pvars_enum(void) { int i; int rc __opal_attribute_unused__; mca_base_var_enum_value_t *devices; static mca_base_var_enum_t *devices_enum; opal_btl_usnic_module_t *m; unsigned char *c; struct sockaddr_in *sin; devices = calloc(mca_btl_usnic_component.num_modules + 1, sizeof(*devices)); assert(devices != NULL); for (i = 0; i < mca_btl_usnic_component.num_modules; ++i) { char *str; m = mca_btl_usnic_component.usnic_active_modules[i]; sin = m->fabric_info->src_addr; c = (unsigned char*) &sin->sin_addr.s_addr; devices[i].value = i; rc = asprintf(&str, "%s,%hhu.%hhu.%hhu.%hhu/%" PRIu32, m->fabric_info->fabric_attr->name, c[0], c[1], c[2], c[3], usnic_netmask_to_cidrlen(sin->sin_addr.s_addr)); assert(rc > 0); devices[i].string = str; } devices[i].string = NULL; rc = mca_base_var_enum_create("btl_usnic", devices, &devices_enum); assert(OPAL_SUCCESS == rc); rc = mca_base_component_pvar_register(&mca_btl_usnic_component.super.btl_version, "devices", "Enumeration representing which slot in btl_usnic_* MPI_T pvar value arrays correspond to which usnic_X Linux device", OPAL_INFO_LVL_5, MCA_BASE_PVAR_CLASS_STATE, MCA_BASE_VAR_TYPE_INT, devices_enum, MCA_BASE_VAR_BIND_NO_OBJECT, (MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_CONTINUOUS), usnic_pvar_enum_read, NULL, /* write function */ usnic_pvar_notify, NULL /* context */); assert(rc >= 0); /* Free the strings (mca_base_var_enum_create() strdup()'ed them into private storage, so we don't need them any more) */ for (int i = 0; i < mca_btl_usnic_component.num_modules; ++i) { free((char*) devices[i].string); } free(devices); /* The devices_enum has been RETAIN'ed by the pvar, so we can RELEASE it here, and the enum will be destroyed when the pvar is destroyed. */ OBJ_RELEASE(devices_enum); }
int ompi_coll_tuned_scatter_intra_check_forced_init(coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices) { mca_base_var_enum_t *new_enum; int cnt; for( cnt = 0; NULL != scatter_algorithms[cnt].string; cnt++ ); ompi_coll_tuned_forced_max_algorithms[SCATTER] = cnt; (void) mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "scatter_algorithm_count", "Number of scatter algorithms available", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_DEFAULT_ONLY, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_CONSTANT, &cnt); /* MPI_T: This variable should eventually be bound to a communicator */ coll_tuned_scatter_forced_algorithm = 0; (void) mca_base_var_enum_create("coll_tuned_scatter_algorithms", scatter_algorithms, &new_enum); mca_param_indices->algorithm_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "scatter_algorithm", "Which scatter algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 binomial.", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_scatter_forced_algorithm); OBJ_RELEASE(new_enum); if (mca_param_indices->algorithm_param_index < 0) { return mca_param_indices->algorithm_param_index; } coll_tuned_scatter_segment_size = 0; mca_param_indices->segsize_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "scatter_algorithm_segmentsize", "Segment size in bytes used by default for scatter algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation. Currently, available algorithms do not support segmentation.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_scatter_segment_size); coll_tuned_scatter_tree_fanout = ompi_coll_tuned_init_tree_fanout; /* get system wide default */ mca_param_indices->tree_fanout_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "scatter_algorithm_tree_fanout", "Fanout for n-tree used for scatter algorithms. Only has meaning if algorithm is forced and supports n-tree topo based operation. Currently, available algorithms do not support n-tree topologies.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_scatter_tree_fanout); coll_tuned_scatter_chain_fanout = ompi_coll_tuned_init_chain_fanout; /* get system wide default */ mca_param_indices->chain_fanout_param_index= mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "scatter_algorithm_chain_fanout", "Fanout for chains used for scatter algorithms. Only has meaning if algorithm is forced and supports chain topo based operation. Currently, available algorithms do not support chain topologies.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_scatter_chain_fanout); return (MPI_SUCCESS); }
static int ompi_mtl_ofi_component_register(void) { int ret; mca_base_var_enum_t *new_enum = NULL; param_priority = 25; /* for now give a lower priority than the psm mtl */ mca_base_component_var_register(&mca_mtl_ofi_component.super.mtl_version, "priority", "Priority of the OFI MTL component", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, ¶m_priority); prov_include = "psm,psm2,gni"; mca_base_component_var_register(&mca_mtl_ofi_component.super.mtl_version, "provider_include", "Comma-delimited list of OFI providers that are considered for use (e.g., \"psm,psm2\"; an empty value means that all providers will be considered). Mutually exclusive with mtl_ofi_provider_exclude.", MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, OPAL_INFO_LVL_1, MCA_BASE_VAR_SCOPE_READONLY, &prov_include); prov_exclude = NULL; mca_base_component_var_register(&mca_mtl_ofi_component.super.mtl_version, "provider_exclude", "Comma-delimited list of OFI providers that are not considered for use (default: \"sockets,mxm\"; empty value means that all providers will be considered). Mutually exclusive with mtl_ofi_provider_include.", MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, OPAL_INFO_LVL_1, MCA_BASE_VAR_SCOPE_READONLY, &prov_exclude); ret = mca_base_var_enum_create ("control_prog_type", control_prog_type, &new_enum); if (OPAL_SUCCESS != ret) { return ret; } control_progress = MTL_OFI_PROG_MANUAL; mca_base_component_var_register (&mca_mtl_ofi_component.super.mtl_version, "control_progress", "Specify control progress model (default: manual). Set to auto for auto progress.", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_READONLY, &control_progress); OBJ_RELEASE(new_enum); ret = mca_base_var_enum_create ("data_prog_type", data_prog_type, &new_enum); if (OPAL_SUCCESS != ret) { return ret; } data_progress = MTL_OFI_PROG_AUTO; mca_base_component_var_register(&mca_mtl_ofi_component.super.mtl_version, "data_progress", "Specify data progress model (default: auto). Set to manual for manual progress.", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_READONLY, &data_progress); OBJ_RELEASE(new_enum); ret = mca_base_var_enum_create ("av_type", av_table_type, &new_enum); if (OPAL_SUCCESS != ret) { return ret; } av_type = MTL_OFI_AV_MAP; mca_base_component_var_register (&mca_mtl_ofi_component.super.mtl_version, "av", "Specify AV type to use (default: map). Set to table for FI_AV_TABLE AV type.", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_READONLY, &av_type); OBJ_RELEASE(new_enum); return OMPI_SUCCESS; }
static int btl_ugni_component_register(void) { mca_base_var_enum_t *new_enum; gni_nic_device_t device_type; int rc; (void) mca_base_var_group_component_register(&mca_btl_ugni_component.super.btl_version, "uGNI byte transport layer"); mca_btl_ugni_component.ugni_free_list_num = 8; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "free_list_num", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_free_list_num); mca_btl_ugni_component.ugni_free_list_max = 4096; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "free_list_max", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_free_list_max); mca_btl_ugni_component.ugni_free_list_inc = 64; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "free_list_inc", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_free_list_inc); mca_btl_ugni_component.ugni_eager_num = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "eager_num", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_eager_num); mca_btl_ugni_component.ugni_eager_max = 128; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "eager_max", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_eager_max); mca_btl_ugni_component.ugni_eager_inc = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "eager_inc", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_eager_inc); mca_btl_ugni_component.remote_cq_size = 40000; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "remote_cq_size", "Remote SMSG completion queue " "size (default 40000)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.remote_cq_size); mca_btl_ugni_component.local_cq_size = 8192; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "local_cq_size", "Local completion queue size " "(default 8192)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.local_cq_size); mca_btl_ugni_component.ugni_smsg_limit = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_limit", "Maximum size message that " "will be sent using the SMSG/MSGQ protocol " "(0 - autoselect(default), 16k max)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_smsg_limit); mca_btl_ugni_component.smsg_max_credits = 32; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_max_credits", "Maximum number of " "outstanding SMSG/MSGQ message (default 32)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.smsg_max_credits); mca_btl_ugni_component.ugni_fma_limit = 1024; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "fma_limit", "Maximum size message that " "will be sent using the FMA (Fast Memory " "Access) protocol (default 1024, 64k max)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_fma_limit); mca_btl_ugni_component.rdma_max_retries = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "rdma_max_retries", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.rdma_max_retries); mca_btl_ugni_component.smsg_max_retries = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_max_retries", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.smsg_max_retries); mca_btl_ugni_component.max_mem_reg = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "max_mem_reg", "Maximum number of " "memory registrations a process can " "hold (0 - autoselect, -1 - unlimited)" " (default 0)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.max_mem_reg); mca_btl_ugni_component.mbox_increment = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "mbox_inc", "Number of SMSG mailboxes to " "allocate in each block (0 - autoselect(default))", MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.mbox_increment); mca_btl_ugni_component.smsg_page_size = 2 << 20; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_page_size", "Page size to use for SMSG " "mailbox allocation (default 2M)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.smsg_page_size); mca_btl_ugni_component.progress_thread_requested = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "request_progress_thread", "Enable to request ugni btl progress thread - requires MPI_THREAD_MULTIPLE support", MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.progress_thread_requested); /* performance variables */ mca_btl_ugni_progress_thread_wakeups = 0; (void) mca_base_component_pvar_register(&mca_btl_ugni_component.super.btl_version, "progress_thread_wakeups", "Number of times the progress thread " "has been woken", OPAL_INFO_LVL_9, MCA_BASE_PVAR_CLASS_COUNTER, MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, MCA_BASE_VAR_BIND_NO_OBJECT, MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_CONTINUOUS, NULL, NULL, NULL, &mca_btl_ugni_progress_thread_wakeups); /* btl/ugni can only support only a fixed set of mpools (these mpools have compatible resource * structures) */ rc = mca_base_var_enum_create ("btl_ugni_mpool", mpool_values, &new_enum); if (OPAL_SUCCESS != rc) { return rc; } mca_btl_ugni_component.mpool_type = MCA_BTL_UGNI_MPOOL_UDREG; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "mpool", "mpool to use", MCA_BASE_VAR_TYPE_INT, new_enum, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.mpool_type); OBJ_RELEASE(new_enum); /* ensure we loose send exclusivity to sm and vader if they are enabled */ mca_btl_ugni_module.super.btl_exclusivity = MCA_BTL_EXCLUSIVITY_HIGH - 2; /* smsg threshold */ mca_btl_ugni_module.super.btl_eager_limit = 8 * 1024; mca_btl_ugni_module.super.btl_rndv_eager_limit = 8 * 1024; mca_btl_ugni_module.super.btl_rdma_pipeline_frag_size = 4 * 1024 * 1024; mca_btl_ugni_module.super.btl_max_send_size = 8 * 1024; mca_btl_ugni_module.super.btl_rdma_pipeline_send_length = 8 * 1024; mca_btl_ugni_module.super.btl_get_limit = 1 * 1024 * 1024; /* determine if there are get alignment restrictions */ GNI_GetDeviceType (&device_type); /* * see def. of ALIGNMENT_MASK to figure this one out */ /* both gemini and aries have a 4-byte alignment requirement on remote addresses */ mca_btl_ugni_module.super.btl_get_alignment = 4; /* threshold for put */ mca_btl_ugni_module.super.btl_min_rdma_pipeline_size = 8 * 1024; mca_btl_ugni_module.super.btl_flags = MCA_BTL_FLAGS_SEND | MCA_BTL_FLAGS_RDMA | MCA_BTL_FLAGS_SEND_INPLACE | MCA_BTL_FLAGS_ATOMIC_OPS | MCA_BTL_FLAGS_ATOMIC_FOPS; mca_btl_ugni_module.super.btl_atomic_flags = MCA_BTL_ATOMIC_SUPPORTS_ADD | MCA_BTL_ATOMIC_SUPPORTS_AND | MCA_BTL_ATOMIC_SUPPORTS_OR | MCA_BTL_ATOMIC_SUPPORTS_XOR | MCA_BTL_ATOMIC_SUPPORTS_CSWAP; mca_btl_ugni_module.super.btl_registration_handle_size = sizeof (mca_btl_base_registration_handle_t); mca_btl_ugni_module.super.btl_bandwidth = 40000; /* Mbs */ mca_btl_ugni_module.super.btl_latency = 2; /* Microsecs */ mca_btl_ugni_module.super.btl_get_local_registration_threshold = 0; mca_btl_ugni_module.super.btl_put_local_registration_threshold = mca_btl_ugni_component.ugni_fma_limit; /* Call the BTL based to register its MCA params */ mca_btl_base_param_register(&mca_btl_ugni_component.super.btl_version, &mca_btl_ugni_module.super); return OPAL_SUCCESS; }
int ompi_coll_tuned_alltoall_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices) { mca_base_var_enum_t*new_enum; ompi_coll_tuned_forced_max_algorithms[ALLTOALL] = coll_tuned_alltoall_algorithm_count; (void) mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "alltoall_algorithm_count", "Number of alltoall algorithms available", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_DEFAULT_ONLY, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_CONSTANT, &coll_tuned_alltoall_algorithm_count); /* MPI_T: This variable should eventually be bound to a communicator */ coll_tuned_alltoall_forced_algorithm = 0; (void) mca_base_var_enum_create("coll_tuned_alltoall_algorithms", alltoall_algorithms, &new_enum); mca_param_indices->algorithm_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "alltoall_algorithm", "Which alltoall algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 pairwise, 3: modified bruck, 4: linear with sync, 5:two proc only.", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_alltoall_forced_algorithm); OBJ_RELEASE(new_enum); if (mca_param_indices->algorithm_param_index < 0) { return mca_param_indices->algorithm_param_index; } coll_tuned_alltoall_segment_size = 0; mca_param_indices->segsize_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "alltoall_algorithm_segmentsize", "Segment size in bytes used by default for alltoall algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_alltoall_segment_size); coll_tuned_alltoall_tree_fanout = ompi_coll_tuned_init_tree_fanout; /* get system wide default */ mca_param_indices->tree_fanout_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "alltoall_algorithm_tree_fanout", "Fanout for n-tree used for alltoall algorithms. Only has meaning if algorithm is forced and supports n-tree topo based operation.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_alltoall_tree_fanout); coll_tuned_alltoall_chain_fanout = ompi_coll_tuned_init_chain_fanout; /* get system wide default */ mca_param_indices->chain_fanout_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "alltoall_algorithm_chain_fanout", "Fanout for chains used for alltoall algorithms. Only has meaning if algorithm is forced and supports chain topo based operation.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_alltoall_chain_fanout); coll_tuned_alltoall_max_requests = 0; /* no limit for alltoall by default */ mca_param_indices->max_requests_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "alltoall_algorithm_max_requests", "Maximum number of outstanding send or recv requests. Only has meaning for synchronized algorithms.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_alltoall_max_requests); if (mca_param_indices->max_requests_param_index < 0) { return mca_param_indices->max_requests_param_index; } if (coll_tuned_alltoall_max_requests < 0) { if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) { opal_output( 0, "Maximum outstanding requests must be positive number greater than 1. Switching to system level default %d \n", ompi_coll_tuned_init_max_requests ); } coll_tuned_alltoall_max_requests = 0; } return (MPI_SUCCESS); }
static int ompi_mtl_psm_component_register(void) { #if PSM_VERNO >= 0x010d mca_base_var_enum_t *new_enum; #endif /* set priority high enough to beat ob1's default */ param_priority = 30; (void) mca_base_component_var_register (&mca_mtl_psm_component.super.mtl_version, "priority", "Priority of the PSM MTL component", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, ¶m_priority); ompi_mtl_psm.connect_timeout = 180; (void) mca_base_component_var_register(&mca_mtl_psm_component.super.mtl_version, "connect_timeout", "PSM connection timeout value in seconds", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm.connect_timeout); ompi_mtl_psm.debug_level = 1; (void) mca_base_component_var_register(&mca_mtl_psm_component.super.mtl_version, "debug", "PSM debug level", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm.debug_level); ompi_mtl_psm.ib_unit = -1; (void) mca_base_component_var_register(&mca_mtl_psm_component.super.mtl_version, "ib_unit", "Truescale unit to use", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm.ib_unit); ompi_mtl_psm.ib_port = 0; (void) mca_base_component_var_register(&mca_mtl_psm_component.super.mtl_version, "ib_port", "Truescale port on unit to use", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm.ib_port); ompi_mtl_psm.ib_service_level = 0; (void) mca_base_component_var_register(&mca_mtl_psm_component.super.mtl_version, "ib_service_level", "Infiniband service level" "(0 <= SL <= 15)", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm.ib_service_level); ompi_mtl_psm.ib_pkey = 0x7fffUL; (void) mca_base_component_var_register(&mca_mtl_psm_component.super.mtl_version, "ib_pkey", "Infiniband partition key", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm.ib_pkey); #if PSM_VERNO >= 0x010d ompi_mtl_psm.ib_service_id = 0x1000117500000000ull; (void) mca_base_component_var_register(&mca_mtl_psm_component.super.mtl_version, "ib_service_id", "Infiniband service ID to use for application (default is 0)", MCA_BASE_VAR_TYPE_UNSIGNED_LONG_LONG, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm.ib_service_id); ompi_mtl_psm.path_res_type = PSM_PATH_RES_NONE; mca_base_var_enum_create("mtl_psm_path_query", path_query_values, &new_enum); (void) mca_base_component_var_register(&mca_mtl_psm_component.super.mtl_version, "path_query", "Path record query mechanisms", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm.path_res_type); OBJ_RELEASE(new_enum); #endif return OMPI_SUCCESS; }
static int btl_ugni_component_register(void) { mca_base_var_enum_t *new_enum; gni_nic_device_t device_type; char *mpool_hints_tmp = NULL; int rc; (void) mca_base_var_group_component_register(&mca_btl_ugni_component.super.btl_version, "uGNI byte transport layer"); mca_btl_ugni_component.ugni_free_list_num = 8; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "free_list_num", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_free_list_num); mca_btl_ugni_component.ugni_free_list_max = 4096; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "free_list_max", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_free_list_max); mca_btl_ugni_component.ugni_free_list_inc = 64; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "free_list_inc", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_free_list_inc); mca_btl_ugni_component.ugni_eager_num = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "eager_num", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_eager_num); mca_btl_ugni_component.ugni_eager_max = 128; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "eager_max", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_eager_max); mca_btl_ugni_component.ugni_eager_inc = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "eager_inc", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_eager_inc); mca_btl_ugni_component.remote_cq_size = 40000; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "remote_cq_size", "Remote SMSG completion queue " "size (default 40000)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.remote_cq_size); mca_btl_ugni_component.local_cq_size = 8192; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "local_cq_size", "Local completion queue size " "(default 8192)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.local_cq_size); mca_btl_ugni_component.ugni_smsg_limit = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_limit", "Maximum size message that " "will be sent using the SMSG/MSGQ protocol " "(0 - autoselect(default), 16k max)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_smsg_limit); mca_btl_ugni_component.smsg_max_credits = 32; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_max_credits", "Maximum number of " "outstanding SMSG/MSGQ message (default 32)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.smsg_max_credits); mca_btl_ugni_component.ugni_fma_limit = 1024; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "fma_limit", "Maximum size message that " "will be sent using the FMA (Fast Memory " "Access) protocol (default 1024, 64k max)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_fma_limit); mca_btl_ugni_component.rdma_max_retries = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "rdma_max_retries", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.rdma_max_retries); mca_btl_ugni_component.smsg_max_retries = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_max_retries", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.smsg_max_retries); mca_btl_ugni_component.max_mem_reg = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "max_mem_reg", "Maximum number of " "memory registrations a process can " "hold (0 - autoselect, -1 - unlimited)" " (default 0)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.max_mem_reg); mca_btl_ugni_component.mbox_increment = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "mbox_inc", "Number of SMSG mailboxes to " "allocate in each block (0 - autoselect(default))", MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.mbox_increment); /* communication domain flags */ rc = mca_base_var_enum_create_flag ("btl_ugni_cdm_flags", cdm_flags, (mca_base_var_enum_flag_t **) &new_enum); if (OPAL_SUCCESS != rc) { return rc; } mca_btl_ugni_component.cdm_flags = GNI_CDM_MODE_FORK_PARTCOPY | GNI_CDM_MODE_ERR_NO_KILL | GNI_CDM_MODE_FAST_DATAGRAM_POLL | GNI_CDM_MODE_MDD_SHARED | GNI_CDM_MODE_FMA_SHARED | GNI_CDM_MODE_FMA_SMALL_WINDOW; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "cdm_flags", "Flags to set when creating a communication domain " " (default: fork-fullcopy,cached-amo-enabled,err-no-kill,fast-datagram-poll," "fma-shared,fma-small-window)", MCA_BASE_VAR_TYPE_UNSIGNED_INT, new_enum, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.cdm_flags); OBJ_RELEASE(new_enum); mca_btl_ugni_component.virtual_device_count = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "virtual_device_count", "Number of virtual devices to create. Higher numbers may " "result in better performance when using threads. (default: auto, max: 8)", MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.virtual_device_count); /* determine if there are get alignment restrictions */ GNI_GetDeviceType (&device_type); mca_btl_ugni_component.smsg_page_size = 2 << 20; if (GNI_DEVICE_GEMINI == device_type) { if (access ("/sys/class/gemini/ghal0/mrt", R_OK)) { int fd = open ("/sys/class/gemini/ghal0/mrt", O_RDONLY); char buffer[10]; if (0 <= fd) { memset (buffer, 0, sizeof (buffer)); read (fd, buffer, sizeof (buffer) - 1); close (fd); mca_btl_ugni_ugni_page_size = strtol (buffer, NULL, 10) * 1024; mca_btl_ugni_component.smsg_page_size = mca_btl_ugni_ugni_page_size; } } } (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_page_size", "Page size to use for SMSG mailbox allocation (default: detect)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.smsg_page_size); mca_btl_ugni_component.progress_thread_requested = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "request_progress_thread", "Enable to request ugni btl progress thread - requires MPI_THREAD_MULTIPLE support", MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.progress_thread_requested); /* performance variables */ mca_btl_ugni_progress_thread_wakeups = 0; (void) mca_base_component_pvar_register(&mca_btl_ugni_component.super.btl_version, "progress_thread_wakeups", "Number of times the progress thread " "has been woken", OPAL_INFO_LVL_9, MCA_BASE_PVAR_CLASS_COUNTER, MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, MCA_BASE_VAR_BIND_NO_OBJECT, MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_CONTINUOUS, NULL, NULL, NULL, &mca_btl_ugni_progress_thread_wakeups); /* register network statistics as performance variables */ for (int i = 0 ; i < GNI_NUM_STATS ; ++i) { char name[128], desc[128]; size_t str_len = strlen (gni_statistic_str[i]); assert (str_len < sizeof (name)); /* we can get an all-caps string for the variable from gni_statistic_str. need to make it lowercase * to match ompi standards */ for (size_t j = 0 ; j < str_len ; ++j) { name[j] = tolower (gni_statistic_str[i][j]); desc[j] = ('_' == name[j]) ? ' ' : name[j]; } name[str_len] = '\0'; desc[str_len] = '\0'; (void) mca_base_component_pvar_register (&mca_btl_ugni_component.super.btl_version, name, desc, OPAL_INFO_LVL_4, MCA_BASE_PVAR_CLASS_COUNTER, MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, MCA_BASE_VAR_BIND_NO_OBJECT, MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_CONTINUOUS, mca_btl_ugni_get_stat, NULL, mca_btl_ugni_notify_stat, (void *) (intptr_t) i); } /* btl/ugni can only support only a fixed set of rcache components (these rcache components have compatible resource * structures) */ rc = mca_base_var_enum_create ("btl_ugni_rcache", rcache_values, &new_enum); if (OPAL_SUCCESS != rc) { return rc; } /* NTH: there are known *serious* performance issues with udreg. if they are ever resolved it is the preferred rcache */ mca_btl_ugni_component.rcache_type = MCA_BTL_UGNI_RCACHE_GRDMA; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "rcache", "registration cache to use (default: grdma)", MCA_BASE_VAR_TYPE_INT, new_enum, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.rcache_type); OBJ_RELEASE(new_enum); if (mca_btl_ugni_ugni_page_size) { rc = asprintf (&mpool_hints_tmp, "page_size=%lu", mca_btl_ugni_ugni_page_size); if (rc < 0) { return OPAL_ERR_OUT_OF_RESOURCE; } mca_btl_ugni_component.mpool_hints = mpool_hints_tmp; } else { mca_btl_ugni_component.mpool_hints = "page_size=2M"; } (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "mpool_hints", "hints to use when selecting a memory pool (default: " "\"page_size=2M\")", MCA_BASE_VAR_TYPE_STRING, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.mpool_hints); free (mpool_hints_tmp); /* ensure we loose send exclusivity to sm and vader if they are enabled */ mca_btl_ugni_module.super.btl_exclusivity = MCA_BTL_EXCLUSIVITY_HIGH - 2; /* smsg threshold */ mca_btl_ugni_module.super.btl_eager_limit = 8 * 1024; mca_btl_ugni_module.super.btl_rndv_eager_limit = 8 * 1024; mca_btl_ugni_module.super.btl_rdma_pipeline_frag_size = 4 * 1024 * 1024; mca_btl_ugni_module.super.btl_max_send_size = 8 * 1024; mca_btl_ugni_module.super.btl_rdma_pipeline_send_length = 8 * 1024; mca_btl_ugni_module.super.btl_get_limit = 1 * 1024 * 1024; /* * see def. of ALIGNMENT_MASK to figure this one out */ /* both gemini and aries have a 4-byte alignment requirement on remote addresses */ mca_btl_ugni_module.super.btl_get_alignment = 4; /* threshold for put */ mca_btl_ugni_module.super.btl_min_rdma_pipeline_size = 8 * 1024; mca_btl_ugni_module.super.btl_flags = MCA_BTL_FLAGS_SEND | MCA_BTL_FLAGS_RDMA | MCA_BTL_FLAGS_SEND_INPLACE | MCA_BTL_FLAGS_ATOMIC_OPS | MCA_BTL_FLAGS_ATOMIC_FOPS; mca_btl_ugni_module.super.btl_atomic_flags = MCA_BTL_ATOMIC_SUPPORTS_ADD | MCA_BTL_ATOMIC_SUPPORTS_AND | MCA_BTL_ATOMIC_SUPPORTS_OR | MCA_BTL_ATOMIC_SUPPORTS_XOR | MCA_BTL_ATOMIC_SUPPORTS_CSWAP; if (GNI_DEVICE_ARIES == device_type) { /* aries supports additional atomic operations */ mca_btl_ugni_module.super.btl_atomic_flags |= MCA_BTL_ATOMIC_SUPPORTS_MIN | MCA_BTL_ATOMIC_SUPPORTS_MAX | MCA_BTL_ATOMIC_SUPPORTS_LAND | MCA_BTL_ATOMIC_SUPPORTS_LOR | MCA_BTL_ATOMIC_SUPPORTS_LXOR | MCA_BTL_ATOMIC_SUPPORTS_32BIT | MCA_BTL_ATOMIC_SUPPORTS_FLOAT; } mca_btl_ugni_module.super.btl_registration_handle_size = sizeof (mca_btl_base_registration_handle_t); mca_btl_ugni_module.super.btl_bandwidth = 40000; /* Mbs */ mca_btl_ugni_module.super.btl_latency = 2; /* Microsecs */ mca_btl_ugni_module.super.btl_get_local_registration_threshold = 0; mca_btl_ugni_module.super.btl_put_local_registration_threshold = mca_btl_ugni_component.ugni_fma_limit; /* Call the BTL based to register its MCA params */ mca_btl_base_param_register(&mca_btl_ugni_component.super.btl_version, &mca_btl_ugni_module.super); return OPAL_SUCCESS; }
int mca_bcol_iboffload_register_params(void) { mca_base_var_enum_t *new_enum; char *msg; int ret = OMPI_SUCCESS, tmp; #define CHECK(expr) do { \ tmp = (expr); \ if (OMPI_SUCCESS != tmp) ret = tmp; \ } while (0) /* register openib component parameters */ CHECK(reg_int("k_nomial_radix", NULL, "The radix of the K-nomial tree for scatther-gather type algorithms" "(starts from 2)", 2, &mca_bcol_iboffload_component.k_nomial_radix, REGINT_GE_ONE)); CHECK(reg_int("priority", NULL, "IB offload component priority" "(from 0(low) to 90 (high))", 90, &mca_bcol_iboffload_component.super.priority, 0)); CHECK(reg_int("verbose", NULL, "Output some verbose IB offload BTL information " "(0 = no output, nonzero = output)", 0, &mca_bcol_iboffload_component.verbose, 0)); CHECK(reg_bool("warn_default_gid_prefix", NULL, "Warn when there is more than one active ports and at least one of them connected to the network with only default GID prefix configured (0 = do not warn; any other value = warn)", true, &mca_bcol_iboffload_component.warn_default_gid_prefix)); CHECK(reg_bool("warn_nonexistent_if", NULL, "Warn if non-existent devices and/or ports are specified in the bcol_iboffla_if_[in|ex]clude MCA parameters (0 = do not warn; any other value = warn)", true, &mca_bcol_iboffload_component.warn_nonexistent_if)); CHECK(reg_int("max_pipeline_depth", NULL, "The maximal number of fragments of the same collective request that can be transferred in parallel", 3, (int *) &mca_bcol_iboffload_component.max_pipeline_depth, 0)); CHECK(reg_int("max_mqe_tasks", NULL, "Maximum number of MQEs for each iboffload module", 1024, &mca_bcol_iboffload_component.max_mqe_tasks, 0)); CHECK(reg_int("max_mq_size", NULL, "Maximum size of each MQ for each iboffload module", 1024, &mca_bcol_iboffload_component.max_mq_size, 0)); CHECK(reg_int("free_list_num", NULL, "Intial size of free lists (must be >= 1)", 256, &mca_bcol_iboffload_component.free_list_num, REGINT_GE_ONE)); CHECK(reg_int("free_list_max", NULL, "Maximum size of free lists " "(-1 = infinite, otherwise must be >= 0)", -1, &mca_bcol_iboffload_component.free_list_max, REGINT_NEG_ONE_OK | REGINT_GE_ONE)); CHECK(reg_int("free_list_inc", NULL, "Increment size of free lists (must be >= 1)", 32, &mca_bcol_iboffload_component.free_list_inc, REGINT_GE_ONE)); CHECK(reg_string("mpool", NULL, "Name of the memory pool to be used (it is unlikely that you will ever want to change this", "rdma", &mca_bcol_iboffload_component.mpool_name, 0)); CHECK(reg_int("cq_size", "cq_size", "Size of the OpenFabrics completion " "queue (will automatically be set to a minimum of " "(2 * number_of_peers * bcol_iboffload_rd_num))", 1024, &mca_bcol_iboffload_component.cq_size, REGINT_GE_ONE)); CHECK(reg_int("exchange_tree_order", NULL, "The order of the exchange tree. " "Must be power of two.", 2, &mca_bcol_iboffload_component.exchange_tree_order, REGINT_GE_ONE)); CHECK(reg_int("knomial_tree_order", NULL, "The order of the knomial exchange tree. ", 3, &mca_bcol_iboffload_component.knomial_tree_order, REGINT_GE_ONE)); CHECK(reg_int("max_inline_data", "max_inline_data", "Maximum size of inline data segment " "(-1 = run-time probe to discover max value, " "otherwise must be >= 0). " "If not explicitly set, use max_inline_data from " "the INI file containing device-specific parameters", 128, (int *) &mca_bcol_iboffload_component.max_inline_data, REGINT_NEG_ONE_OK | REGINT_GE_ZERO)); #if 0 CHECK(reg_string("pkey", "ib_pkey_val", "OpenFabrics partition key (pkey) value. " "Unsigned integer decimal or hex values are allowed (e.g., \"3\" or \"0x3f\") and will be masked against the maximum allowable IB paritition key value (0x7fff)", "0", &pkey, 0)); /* Pasha mca_bcol_iboffload_component.pkey_val = ompi_btl_openib_ini_intify(pkey) & MCA_BTL_IB_PKEY_MASK; free(pkey); */ #endif CHECK(reg_string("receive_queues", NULL, "Colon-delimited, comma delimited list of receive queues: P,4096,8,6,4:P,32768,8,6,4", "P,512,256,192,128", &mca_bcol_iboffload_component.receive_queues, 0)); CHECK(reg_int("qp_ous_rd_atom", NULL, "InfiniBand outstanding atomic reads (must be >= 0)", 4, (int *) &mca_bcol_iboffload_component.qp_ous_rd_atom, REGINT_GE_ZERO)); asprintf(&msg, "OpenFabrics MTU, in bytes (if not specified in INI files). Valid values are: %d=256 bytes, %d=512 bytes, %d=1024 bytes, %d=2048 bytes, %d=4096 bytes", IBV_MTU_256, IBV_MTU_512, IBV_MTU_1024, IBV_MTU_2048, IBV_MTU_4096); if (NULL == msg) { /* Don't try to recover from this */ return OMPI_ERR_OUT_OF_RESOURCE; } CHECK(mca_base_var_enum_create("infiniband mtu", mtu_values, &new_enum)); mca_bcol_iboffload_component.mtu = IBV_MTU_1024; tmp = mca_base_component_var_register(&mca_bcol_iboffload_component.super.bcol_version, "mtu", msg, MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &mca_bcol_iboffload_component.mtu); OBJ_RELEASE(new_enum); free(msg); if (0 > tmp) ret = tmp; tmp = mca_base_var_register_synonym(tmp, "ompi", "bcol", "iboffload", "ib_mtu", MCA_BASE_VAR_SYN_FLAG_DEPRECATED); if (0 > tmp) ret = tmp; CHECK(reg_int("ib_min_rnr_timer", NULL, "InfiniBand minimum " "\"receiver not ready\" timer, in seconds " "(must be >= 0 and <= 31)", 1 , &mca_bcol_iboffload_component.min_rnr_timer, 0)); CHECK(reg_int("ib_timeout", NULL, "InfiniBand transmit timeout, plugged into formula: 4.096 microseconds * " "(2^bcol_iboffload_ib_timeout) (must be >= 0 and <= 31)", 20, &mca_bcol_iboffload_component.timeout, 0)); CHECK(reg_int("ib_retry_count", NULL, "InfiniBand transmit retry count " "(must be >= 0 and <= 7)", 7, &mca_bcol_iboffload_component.retry_count, 0)); CHECK(reg_int("ib_rnr_retry", NULL, "InfiniBand \"receiver not ready\" " "retry count; applies *only* to SRQ/XRC queues. PP queues " "use RNR retry values of 0 because Open MPI performs " "software flow control to guarantee that RNRs never occur " "(must be >= 0 and <= 7; 7 = \"infinite\")", 7, &mca_bcol_iboffload_component.rnr_retry, 0)); CHECK(reg_int("ib_max_rdma_dst_ops", NULL, "InfiniBand maximum pending RDMA " "destination operations " "(must be >= 0)", 4, &mca_bcol_iboffload_component.max_rdma_dst_ops, REGINT_GE_ZERO)); CHECK(reg_int("ib_service_level", NULL, "InfiniBand service level " "(must be >= 0 and <= 15)", 0, &mca_bcol_iboffload_component.service_level, 0)); CHECK(reg_int("buffer_alignment", NULL, "Prefered communication buffer alignment, in bytes " "(must be > 0 and power of two)", 64, &mca_bcol_iboffload_component.buffer_alignment, REGINT_GE_ZERO)); /* register parmeters controlling message fragementation */ CHECK(reg_int("min_frag_size", NULL, "Minimum fragment size", getpagesize(), &mca_bcol_iboffload_component.super.min_frag_size, REGINT_GE_ONE)); CHECK(reg_int("max_frag_size", NULL, "Maximum fragment size", FRAG_SIZE_NO_LIMIT, &mca_bcol_iboffload_component.super.max_frag_size, REGINT_NONZERO)); CHECK(reg_bool("can_use_user_buffers", NULL, "User memory can be used by the collective algorithms", true, &mca_bcol_iboffload_component.super.can_use_user_buffers)); CHECK(reg_int("barrier_mode", NULL, "Barrier mode: 0 - Recursive doubling; 1 - Recursive K-ing", 0, &mca_bcol_iboffload_component.barrier_mode, REGINT_GE_ZERO)); CHECK(reg_int("max_progress_pull", NULL, "Max number of progress pull checks", 8, &mca_bcol_iboffload_component.max_progress_pull, REGINT_GE_ZERO)); CHECK(reg_int("use_brucks_smsg_alltoall_rdma", NULL, "Use brucks algorithm for smsg alltoall and RDMA semantics 1 = No Temp buffer recycling" "1 = Alg with no Temp Buffer Recycling (faster), 2 = Alg with temp Buffer Recycling (slower)", 0, &mca_bcol_iboffload_component.use_brucks_smsg_alltoall_rdma, 0)); CHECK(reg_int("use_brucks_smsg_alltoall_sr", NULL, "Use brucks algorithm for smsg alltoall and Send/Recv semantics " "1 = Alg with RTR (faster), 2 = Alg with RNR (slower)", 0, &mca_bcol_iboffload_component.use_brucks_smsg_alltoall_sr, 0)); CHECK(reg_int("alltoall_bruck_radix", NULL, "Radix for Bruck algorithm for smsg alltoall", 3, &mca_bcol_iboffload_component.k_alltoall_bruck_radix, 0)); CHECK(reg_int("k_alltoall_bruck_radix", NULL, "Temp Buffer alignment for Bruck algorithm for smsg alltoall", 64, &mca_bcol_iboffload_component.tmp_buf_alignment, 0)); /* CHECK(reg_string("if_include", NULL, "Comma-delimited list of devices/ports to be used (e.g. \"mthca0,mthca1:2\"; empty value means to use all ports found). Mutually exclusive with bcol_iboffload_if_exclude.", NULL, &mca_bcol_iboffload_component.if_include, 0)); CHECK(reg_string("if_exclude", NULL, "Comma-delimited list of device/ports to be excluded (empty value means to not exclude any ports). Mutually exclusive with bcol_iboffload_if_include.", NULL, &mca_bcol_iboffload_component.if_exclude, 0)); */ CHECK(mca_bcol_iboffload_verify_params()); /* Register any MCA params for the connect pseudo-components */ if (OMPI_SUCCESS == ret) { ret = ompi_common_ofacm_base_register(&mca_bcol_iboffload_component.super.bcol_version); } return ret; }
static int btl_ugni_component_register(void) { mca_base_var_enum_t *new_enum; int rc; (void) mca_base_var_group_component_register(&mca_btl_ugni_component.super.btl_version, "Gemini byte transport layer"); mca_btl_ugni_component.ugni_free_list_num = 8; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "free_list_num", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_free_list_num); mca_btl_ugni_component.ugni_free_list_max = 16384; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "free_list_max", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_free_list_max); mca_btl_ugni_component.ugni_free_list_inc = 64; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "free_list_inc", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_free_list_inc); mca_btl_ugni_component.ugni_eager_num = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "eager_num", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_eager_num); mca_btl_ugni_component.ugni_eager_max = 128; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "eager_max", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_eager_max); mca_btl_ugni_component.ugni_eager_inc = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "eager_inc", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_eager_inc); mca_btl_ugni_component.remote_cq_size = 40000; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "remote_cq_size", "Remote SMSG completion queue " "size (default 40000)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.remote_cq_size); mca_btl_ugni_component.local_cq_size = 8192; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "local_cq_size", "Local completion queue size " "(default 8192)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.local_cq_size); mca_btl_ugni_component.ugni_smsg_limit = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_limit", "Maximum size message that " "will be sent using the SMSG/MSGQ protocol " "(0 - autoselect(default), 16k max)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_smsg_limit); mca_btl_ugni_component.smsg_max_credits = 32; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_max_credits", "Maximum number of " "outstanding SMSG/MSGQ message (default 32)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.smsg_max_credits); mca_btl_ugni_component.ugni_fma_limit = 1024; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "fma_limit", "Maximum size message that " "will be sent using the FMA (Fast Memory " "Access) protocol (default 1024, 64k max)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_fma_limit); mca_btl_ugni_component.ugni_get_limit = 1 * 1024 * 1024; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "get_limit", "Maximum size message that " "will be sent using a get protocol " "(default 1M)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.ugni_get_limit); mca_btl_ugni_component.rdma_max_retries = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "rdma_max_retries", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.rdma_max_retries); mca_btl_ugni_component.smsg_max_retries = 16; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_max_retries", NULL, MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.smsg_max_retries); mca_btl_ugni_component.max_mem_reg = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "max_mem_reg", "Maximum number of " "memory registrations a process can " "hold (0 - autoselect, -1 - unlimited)" " (default 0)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.max_mem_reg); mca_btl_ugni_component.mbox_increment = 0; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "mbox_inc", "Number of SMSG mailboxes to " "allocate in each block (0 - autoselect(default))", MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.mbox_increment); mca_btl_ugni_component.smsg_page_size = 2 << 20; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "smsg_page_size", "Page size to use for SMSG " "mailbox allocation (default 2M)", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.smsg_page_size); /* btl/ugni can only support only a fixed set of mpools (these mpools have compatible resource * structures) */ rc = mca_base_var_enum_create ("btl_ugni_mpool", mpool_values, &new_enum); if (OPAL_SUCCESS != rc) { return rc; } mca_btl_ugni_component.mpool_type = MCA_BTL_UGNI_MPOOL_UDREG; (void) mca_base_component_var_register(&mca_btl_ugni_component.super.btl_version, "mpool", "mpool to use", MCA_BASE_VAR_TYPE_INT, new_enum, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, &mca_btl_ugni_component.mpool_type); OBJ_RELEASE(new_enum); mca_btl_ugni_module.super.btl_exclusivity = MCA_BTL_EXCLUSIVITY_HIGH; /* smsg threshold */ mca_btl_ugni_module.super.btl_eager_limit = 8 * 1024; mca_btl_ugni_module.super.btl_rndv_eager_limit = 8 * 1024; mca_btl_ugni_module.super.btl_rdma_pipeline_frag_size = 4 * 1024 * 1024; mca_btl_ugni_module.super.btl_max_send_size = 8 * 1024; mca_btl_ugni_module.super.btl_rdma_pipeline_send_length = 8 * 1024; /* threshold for put */ mca_btl_ugni_module.super.btl_min_rdma_pipeline_size = 8 * 1024; mca_btl_ugni_module.super.btl_flags = MCA_BTL_FLAGS_SEND | MCA_BTL_FLAGS_RDMA | MCA_BTL_FLAGS_SEND_INPLACE; mca_btl_ugni_module.super.btl_seg_size = sizeof (mca_btl_ugni_segment_t); mca_btl_ugni_module.super.btl_bandwidth = 40000; /* Mbs */ mca_btl_ugni_module.super.btl_latency = 2; /* Microsecs */ /* Call the BTL based to register its MCA params */ mca_btl_base_param_register(&mca_btl_ugni_component.super.btl_version, &mca_btl_ugni_module.super); return OMPI_SUCCESS; }
int ompi_coll_tuned_reduce_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices) { mca_base_var_enum_t*new_enum; ompi_coll_tuned_forced_max_algorithms[REDUCE] = coll_tuned_reduce_algorithm_count; (void) mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "reduce_algorithm_count", "Number of reduce algorithms available", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_DEFAULT_ONLY, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_CONSTANT, &coll_tuned_reduce_algorithm_count); /* MPI_T: This variable should eventually be bound to a communicator */ coll_tuned_reduce_forced_algorithm = 0; (void) mca_base_var_enum_create("coll_tuned_reduce_algorithms", reduce_algorithms, &new_enum); mca_param_indices->algorithm_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "reduce_algorithm", "Which reduce algorithm is used. Can be locked down to choice of: 0 ignore, 1 linear, 2 chain, 3 pipeline, 4 binary, 5 binomial, 6 in-order binary", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_reduce_forced_algorithm); OBJ_RELEASE(new_enum); if (mca_param_indices->algorithm_param_index < 0) { return mca_param_indices->algorithm_param_index; } coll_tuned_reduce_segment_size = 0; mca_param_indices->segsize_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "reduce_algorithm_segmentsize", "Segment size in bytes used by default for reduce algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_reduce_segment_size); coll_tuned_reduce_tree_fanout = ompi_coll_tuned_init_tree_fanout; /* get system wide default */ mca_param_indices->tree_fanout_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "reduce_algorithm_tree_fanout", "Fanout for n-tree used for reduce algorithms. Only has meaning if algorithm is forced and supports n-tree topo based operation.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_reduce_tree_fanout); coll_tuned_reduce_chain_fanout = ompi_coll_tuned_init_chain_fanout; /* get system wide default */ mca_param_indices->chain_fanout_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "reduce_algorithm_chain_fanout", "Fanout for chains used for reduce algorithms. Only has meaning if algorithm is forced and supports chain topo based operation.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_reduce_chain_fanout); coll_tuned_reduce_max_requests = 0; /* no limit for reduce by default */ mca_param_indices->max_requests_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "reduce_algorithm_max_requests", "Maximum number of outstanding send requests on leaf nodes. 0 means no limit.", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY, &coll_tuned_reduce_max_requests); if (mca_param_indices->max_requests_param_index < 0) { return mca_param_indices->max_requests_param_index; } if (coll_tuned_reduce_max_requests < 0) { if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) { opal_output( 0, "Maximum outstanding requests must be positive number or 0. Initializing to 0 (no limit).\n" ); } coll_tuned_reduce_max_requests = 0; } return (MPI_SUCCESS); }
static int opal_hwloc_base_register(mca_base_register_flag_t flags) { #if OPAL_HAVE_HWLOC mca_base_var_enum_t *new_enum; int ret; /* hwloc_base_mbind_policy */ opal_hwloc_base_map = OPAL_HWLOC_BASE_MAP_NONE; mca_base_var_enum_create("hwloc memory allocation policy", hwloc_base_map, &new_enum); ret = mca_base_var_register("opal", "hwloc", "base", "mem_alloc_policy", "General memory allocations placement policy (this is not memory binding). " "\"none\" means that no memory policy is applied. \"local_only\" means that a process' memory allocations will be restricted to its local NUMA node. " "If using direct launch, this policy will not be in effect until after MPI_INIT. " "Note that operating system paging policies are unaffected by this setting. For example, if \"local_only\" is used and local NUMA node memory is exhausted, a new memory allocation may cause paging.", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_base_map); OBJ_RELEASE(new_enum); if (0 > ret) { return ret; } /* hwloc_base_bind_failure_action */ opal_hwloc_base_mbfa = OPAL_HWLOC_BASE_MBFA_WARN; mca_base_var_enum_create("hwloc memory bind failure action", hwloc_failure_action, &new_enum); ret = mca_base_var_register("opal", "hwloc", "base", "mem_bind_failure_action", "What Open MPI will do if it explicitly tries to bind memory to a specific NUMA location, and fails. Note that this is a different case than the general allocation policy described by hwloc_base_alloc_policy. A value of \"silent\" means that Open MPI will proceed without comment. A value of \"warn\" means that Open MPI will warn the first time this happens, but allow the job to continue (possibly with degraded performance). A value of \"error\" means that Open MPI will abort the job if this happens.", MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_base_mbfa); OBJ_RELEASE(new_enum); if (0 > ret) { return ret; } opal_hwloc_base_binding_policy = NULL; (void) mca_base_var_register("opal", "hwloc", "base", "binding_policy", "Policy for binding processes. Allowed values: none, hwthread, core, l1cache, l2cache, " "l3cache, socket, numa, board (\"none\" is the default when oversubscribed, \"core\" is " "the default when np<=2, and \"socket\" is the default when np>2). Allowed qualifiers: " "overload-allowed, if-supported", MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_base_binding_policy); /* backward compatibility */ opal_hwloc_base_bind_to_core = false; (void) mca_base_var_register("opal", "hwloc", "base", "bind_to_core", "Bind processes to cores", MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_base_bind_to_core); opal_hwloc_base_bind_to_socket = false; (void) mca_base_var_register("opal", "hwloc", "base", "bind_to_socket", "Bind processes to sockets", MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_base_bind_to_socket); opal_hwloc_report_bindings = false; (void) mca_base_var_register("opal", "hwloc", "base", "report_bindings", "Report bindings to stderr", MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_report_bindings); opal_hwloc_base_slot_list = NULL; (void) mca_base_var_register("opal", "hwloc", "base", "slot_list", "List of processor IDs to bind processes to [default=NULL]", MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_base_slot_list); opal_hwloc_base_cpu_set = NULL; (void) mca_base_var_register("opal", "hwloc", "base", "cpu_set", "Comma-separated list of ranges specifying logical cpus allocated to this job [default: none]", MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_base_cpu_set); /* declare hwthreads as independent cpus */ opal_hwloc_use_hwthreads_as_cpus = false; (void) mca_base_var_register("opal", "hwloc", "base", "use_hwthreads_as_cpus", "Use hardware threads as independent cpus", MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_use_hwthreads_as_cpus); opal_hwloc_base_topo_file = NULL; (void) mca_base_var_register("opal", "hwloc", "base", "topo_file", "Read local topology from file instead of directly sensing it", MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_base_topo_file); #endif /* register parameters */ return OPAL_SUCCESS; }
int ompi_coll_tuned_bcast_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices) { mca_base_var_enum_t *new_enum; int cnt; for( cnt = 0; NULL != bcast_algorithms[cnt].string; cnt++ ); ompi_coll_tuned_forced_max_algorithms[BCAST] = cnt; (void) mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "bcast_algorithm_count", "Number of bcast algorithms available", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_DEFAULT_ONLY, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_CONSTANT, &ompi_coll_tuned_forced_max_algorithms[BCAST]); /* MPI_T: This variable should eventually be bound to a communicator */ coll_tuned_bcast_forced_algorithm = 0; (void) mca_base_var_enum_create("coll_tuned_bcast_algorithms", bcast_algorithms, &new_enum); mca_param_indices->algorithm_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "bcast_algorithm", "Which bcast algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 chain, 3: pipeline, 4: split binary tree, 5: binary tree, 6: binomial tree, 7: knomial tree, 8: scatter_allgather, 9: scatter_allgather_ring.", MCA_BASE_VAR_TYPE_INT, new_enum, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_ALL, &coll_tuned_bcast_forced_algorithm); OBJ_RELEASE(new_enum); if (mca_param_indices->algorithm_param_index < 0) { return mca_param_indices->algorithm_param_index; } coll_tuned_bcast_segment_size = 0; mca_param_indices->segsize_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "bcast_algorithm_segmentsize", "Segment size in bytes used by default for bcast algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation.", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_ALL, &coll_tuned_bcast_segment_size); coll_tuned_bcast_tree_fanout = ompi_coll_tuned_init_tree_fanout; /* get system wide default */ mca_param_indices->tree_fanout_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "bcast_algorithm_tree_fanout", "Fanout for n-tree used for bcast algorithms. Only has meaning if algorithm is forced and supports n-tree topo based operation.", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_ALL, &coll_tuned_bcast_tree_fanout); coll_tuned_bcast_chain_fanout = ompi_coll_tuned_init_chain_fanout; /* get system wide default */ mca_param_indices->chain_fanout_param_index = mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "bcast_algorithm_chain_fanout", "Fanout for chains used for bcast algorithms. Only has meaning if algorithm is forced and supports chain topo based operation.", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_ALL, &coll_tuned_bcast_chain_fanout); coll_tuned_bcast_knomial_radix = 4; mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version, "bcast_algorithm_knomial_radix", "k-nomial tree radix for the bcast algorithm (radix > 1).", MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_ALL, &coll_tuned_bcast_knomial_radix); return (MPI_SUCCESS); }