static int pvfs2_register(void) { int param; param = mca_base_param_find ("fs", NULL, "pvfs2_stripe_size"); if (param >= 0) { mca_base_param_lookup_int (param, &mca_fs_pvfs2_stripe_size); } param = mca_base_param_find ("fs", NULL, "pvfs2_stripe_width"); if (param >= 0) { mca_base_param_lookup_int (param, &mca_fs_pvfs2_stripe_width); } mca_base_param_reg_int (&mca_fs_pvfs2_component.fsm_version, "priority", "Priority of the pvfs2 fs component", false, false, mca_fs_pvfs2_priority, &mca_fs_pvfs2_priority); mca_base_param_reg_int (&mca_fs_pvfs2_component.fsm_version, "stripe_size", "stripe size of a file over pvfs2", false, false, mca_fs_pvfs2_stripe_size, &mca_fs_pvfs2_stripe_size); mca_base_param_reg_int (&mca_fs_pvfs2_component.fsm_version, "stripe_width", "stripe width of a file over pvfs2", false, false, mca_fs_pvfs2_stripe_width, &mca_fs_pvfs2_stripe_width); return OMPI_SUCCESS; }
int ompi_coll_tuned_forced_getvalues (coll_tuned_force_algorithm_mca_param_indices_t mca_params, coll_tuned_force_algorithm_params_t *forced_values) { mca_base_param_lookup_int (mca_params.algorithm_param_index, &(forced_values->algorithm)); mca_base_param_lookup_int (mca_params.segsize_param_index, &(forced_values->segsize)); mca_base_param_lookup_int (mca_params.tree_fanout_param_index, &(forced_values->tree_fanout)); mca_base_param_lookup_int (mca_params.chain_fanout_param_index, &(forced_values->chain_fanout)); return (MPI_SUCCESS); }
/* * Setup the freelist of IO requests. This does not need to be * protected with a lock because it's called during MPI_INIT. */ int mca_io_base_request_create_freelist(void) { opal_list_item_t *p; const mca_base_component_t *component; const mca_io_base_component_2_0_0_t *v200; size_t size = 0; int i, init, incr; /* Find the maximum additional number of bytes required by all io components for requests and make that the request size */ for (p = opal_list_get_first(&mca_io_base_components_available); p != opal_list_get_end(&mca_io_base_components_available); p = opal_list_get_next(p)) { component = ((mca_base_component_priority_list_item_t *) p)->super.cli_component; /* Only know how to handle v2.0.0 components for now */ if (component->mca_type_major_version == 2 && component->mca_type_minor_version == 0 && component->mca_type_release_version == 0) { v200 = (mca_io_base_component_2_0_0_t *) component; if (v200->io_request_bytes > size) { size = v200->io_request_bytes; } } } /* Construct and initialized the freelist of IO requests. */ OBJ_CONSTRUCT(&mca_io_base_requests, ompi_free_list_t); mca_io_base_requests_valid = true; i = mca_base_param_find("io", NULL, "base_freelist_initial_size"); mca_base_param_lookup_int(i, &init); i = mca_base_param_find("io", NULL, "base_freelist_increment"); mca_base_param_lookup_int(i, &incr); ompi_free_list_init_new(&mca_io_base_requests, sizeof(mca_io_base_request_t) + size, CACHE_LINE_SIZE, OBJ_CLASS(mca_io_base_request_t), 0,CACHE_LINE_SIZE, init, -1, incr, NULL); /* All done */ return OMPI_SUCCESS; }
static int dynamic_register(void) { int param; param = mca_base_param_find ("fcoll", NULL, "dynamic_priority"); if (param >= 0) { mca_base_param_lookup_int (param, &mca_fcoll_dynamic_priority); } param = mca_base_param_find ("fcoll", NULL, "dynamic_num_io_procs"); if (param >= 0) { mca_base_param_lookup_int (param, &mca_fcoll_dynamic_num_io_procs); } param = mca_base_param_find ("fcoll", NULL, "dynamic_constant_cbs"); if (param >= 0) { mca_base_param_lookup_int (param, &mca_fcoll_dynamic_constant_cbs); } param = mca_base_param_find ("fcoll", NULL, "dynamic_cycle_buffer_size"); if (param >= 0) { mca_base_param_lookup_int (param, &mca_fcoll_dynamic_cycle_buffer_size); } mca_base_param_reg_int (&mca_fcoll_dynamic_component.fcollm_version, "priority", "Priority of the dynamic fcoll component", false, false, mca_fcoll_dynamic_priority, &mca_fcoll_dynamic_priority); mca_base_param_reg_int (&mca_fcoll_dynamic_component.fcollm_version, "num_io_procs", "Number of writers in the dynamic fcoll component", false, false, mca_fcoll_dynamic_num_io_procs, &mca_fcoll_dynamic_num_io_procs); mca_base_param_reg_int (&mca_fcoll_dynamic_component.fcollm_version, "constant_cbs", "wether we are using constant or scaling cycle buffer size in the dynamic fcoll component", false, false, mca_fcoll_dynamic_constant_cbs, &mca_fcoll_dynamic_constant_cbs); mca_base_param_reg_int (&mca_fcoll_dynamic_component.fcollm_version, "cycle_buffer_size", "Cycle Buffer Size of the dynamic fcoll component", false, false, mca_fcoll_dynamic_cycle_buffer_size, &mca_fcoll_dynamic_cycle_buffer_size); return OMPI_SUCCESS; }
int mca_bml_base_open(void) { /* See if we've already been here */ if (++mca_bml_base_already_opened > 1) { return OMPI_SUCCESS; } if(OMPI_SUCCESS != mca_base_components_open("bml", 0, mca_bml_base_static_components, &mca_bml_base_components_available, true)) { return OMPI_ERROR; } #if OPAL_ENABLE_DEBUG_RELIABILITY do { int param, value; mca_base_param_register_int("bml", NULL, "error_rate_floor", "error_rate_floor", 0); param = mca_base_param_find("bml", NULL, "error_rate_floor"); mca_base_param_lookup_int(param, &value); mca_bml_base_error_rate_floor = value; mca_base_param_register_int("bml", NULL, "error_rate_ceiling", "error_rate_ceiling", 0); param = mca_base_param_find("bml", NULL, "error_rate_ceiling"); mca_base_param_lookup_int(param, &value); mca_bml_base_error_rate_ceiling = value; mca_base_param_register_int("bml", NULL, "srand", "srand", 1); param = mca_base_param_find("bml", NULL, "srand"); mca_base_param_lookup_int(param, &value); /* seed random number generator */ if(value) { struct timeval tv; gettimeofday(&tv, NULL); srand(getpid() * tv.tv_usec); } /* initialize count */ if(mca_bml_base_error_rate_ceiling > 0 && mca_bml_base_error_rate_floor <= mca_bml_base_error_rate_ceiling) { mca_bml_base_error_count = (int) ((mca_bml_base_error_rate_ceiling * rand())/(RAND_MAX+1.0)); } } while (0); #endif return mca_btl_base_open(); }
/* * 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) { int max_alg = 2, requested_alg; ompi_coll_tuned_forced_max_algorithms[ALLTOALLV] = max_alg; mca_base_param_reg_int (&mca_coll_tuned_component.super.collm_version, "alltoallv_algorithm_count", "Number of alltoallv algorithms available", false, true, max_alg, NULL); mca_param_indices->algorithm_param_index = mca_base_param_reg_int(&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.", false, false, 0, NULL); mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg)); if (requested_alg > max_alg) { if (0 == ompi_comm_rank( MPI_COMM_WORLD)) { opal_output(0, "Alltoallv algorithm #%d is not available (range [0..%d]). " "Switching back to ignore(0)\n", requested_alg, max_alg ); } mca_base_param_set_int(mca_param_indices->algorithm_param_index, 0); } return (MPI_SUCCESS); }
static const struct mca_io_base_module_2_0_0_t * file_query(struct ompi_file_t *file, struct mca_io_base_file_t **private_data, int *priority) { mca_io_ompio_data_t *data; /* Lookup our priority */ if (OMPI_SUCCESS != mca_base_param_lookup_int(priority_param, priority)) { return NULL; } /* Allocate a space for this module to hang private data (e.g., the OMPIO file handle) */ data = malloc(sizeof(mca_io_ompio_data_t)); if (NULL == data) { return NULL; } *private_data = (struct mca_io_base_file_t*) data; /* All done */ return &mca_io_ompio_module; }
int orte_ras_alps_get_appinfo_attempts( int *attempts ) { mca_base_param_lookup_int(param_read_attempts, attempts); opal_output_verbose(1, orte_ras_base.ras_output, "ras:alps:orte_ras_alps_get_appinfo_attempts: %d", *attempts); return ORTE_SUCCESS; }
/* * utility routine for integer parameter registration */ static int reg_int(const char* param_name, const char* deprecated_param_name, const char* param_desc, int default_value, int *out_value, int flags) { int index, value; index = mca_base_param_reg_int(&mca_btl_openib_component.super.btl_version, param_name, param_desc, false, false, default_value, NULL); if (NULL != deprecated_param_name) { mca_base_param_reg_syn(index, &mca_btl_openib_component.super.btl_version, deprecated_param_name, true); } mca_base_param_lookup_int(index, &value); if (0 != (flags & REGINT_NEG_ONE_OK) && -1 == value) { *out_value = value; return OMPI_SUCCESS; } if ((0 != (flags & REGINT_GE_ZERO) && value < 0) || (0 != (flags & REGINT_GE_ONE) && value < 1) || (0 != (flags & REGINT_NONZERO) && 0 == value)) { opal_output(0, "Bad parameter value for parameter \"%s\"", param_name); return OMPI_ERR_BAD_PARAM; } *out_value = value; return OMPI_SUCCESS; }
int orte_sds_singleton_set_name(void) { int rc, id, flag; orte_vpid_t vpid; if (ORTE_SUCCESS != (rc = orte_ns.create_my_name())) { ORTE_ERROR_LOG(rc); return rc; } vpid = ORTE_PROC_MY_NAME->vpid; orte_process_info.num_procs = 1; orte_process_info.vpid_start = vpid; /* only set the singleton flag is we are NOT infrastructure, and it has not been previously set. */ id = mca_base_param_find("orte", NULL, "infrastructure"); mca_base_param_lookup_int(id, &flag); if (!flag) { orte_process_info.singleton = true; } return ORTE_SUCCESS; }
/* special version of above just for barrier which only has one option available (at the moment...) */ int ompi_coll_tuned_forced_getvalues_barrier (coll_tuned_force_algorithm_mca_param_indices_t mca_params, coll_tuned_force_algorithm_params_t *forced_values) { mca_base_param_lookup_int (mca_params.algorithm_param_index, &(forced_values->algorithm)); return (MPI_SUCCESS); }
/* init the progress engine - called from orte_init */ int opal_progress_init(void) { #if OPAL_ENABLE_DEBUG int param, value; #endif /* reentrant issues */ #if OPAL_HAVE_THREAD_SUPPORT opal_atomic_init(&progress_lock, OPAL_ATOMIC_UNLOCKED); #endif /* OPAL_HAVE_THREAD_SUPPORT */ /* set the event tick rate */ opal_progress_set_event_poll_rate(10000); #if OPAL_ENABLE_DEBUG param = mca_base_param_find("opal", NULL, "progress_debug"); mca_base_param_lookup_int(param, &value); if (value) { debug_output = opal_output_open(NULL); } #endif OPAL_OUTPUT((debug_output, "progress: initialized event flag to: %x", opal_progress_event_flag)); OPAL_OUTPUT((debug_output, "progress: initialized yield_when_idle to: %s", call_yield == 0 ? "false" : "true")); OPAL_OUTPUT((debug_output, "progress: initialized num users to: %d", num_event_users)); OPAL_OUTPUT((debug_output, "progress: initialized poll rate to: %ld", (long) event_progress_delta)); return OPAL_SUCCESS; }
/******************************************************************************* * utilities */ static inline int mca_pml_v_param_register_int( const char* param_name, int default_value ) { int id = mca_base_param_register_int("pml", "v", param_name, NULL, default_value); int param_value = default_value; mca_base_param_lookup_int(id, ¶m_value); return param_value; }
static inline int mca_btl_vader_param_register_int(const char *param_name, int value) { int id = mca_base_param_register_int("btl", "vader", param_name, NULL, value); mca_base_param_lookup_int(id, &value); return value; }
static inline int mca_sbgp_basesmsocket_param_register_int( const char* param_name, int default_value) { int id = mca_base_param_register_int("sbgp", "basesmsocket", param_name,NULL,default_value); int param_value = default_value; mca_base_param_lookup_int(id,¶m_value); return param_value; }
int ompi_common_mx_initialize(void) { mx_return_t mx_return; struct mca_mpool_base_resources_t mpool_resources; int index, value; ompi_common_mx_initialize_ref_cnt++; if(ompi_common_mx_initialize_ref_cnt == 1) { /* set the MX error handle to always return. This function is the * only MX function allowed to be called before mx_init in order * to make sure that if the MX is not up and running the MX * library does not exit the application. */ mx_set_error_handler(MX_ERRORS_RETURN); /* If we have a memory manager available, and mpi_leave_pinned == -1, then set mpi_leave_pinned to 1. We have a memory manager if: - we have both FREE and MUNMAP support - we have MUNMAP support and the linux mallopt */ value = opal_mem_hooks_support_level(); if ((value & (OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT)) == (OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT)) { index = mca_base_param_find("mpi", NULL, "leave_pinned"); if (index >= 0) if ((mca_base_param_lookup_int(index, &value) == OPAL_SUCCESS) && (value == -1)) { ompi_mpi_leave_pinned = 1; setenv("MX_RCACHE", "2", 1); mpool_resources.regcache_clean = mx__regcache_clean; ompi_common_mx_fake_mpool = mca_mpool_base_module_create("fake", NULL, &mpool_resources); if (!ompi_common_mx_fake_mpool) { ompi_mpi_leave_pinned = 0; setenv("MX_RCACHE", "0", 1); opal_output(0, "Error creating fake mpool (error %s)\n", strerror(errno)); } } } /* initialize the mx library */ mx_return = mx_init(); if(MX_SUCCESS != mx_return) { opal_output(0, "Error in mx_init (error %s)\n", mx_strerror(mx_return)); return OMPI_ERR_NOT_AVAILABLE; } } return OMPI_SUCCESS; }
int opal_carto_auto_detect_component_query(mca_base_module_t **module, int *priority) { int param; param = mca_base_param_find("carto", "auto_detect", "priority"); mca_base_param_lookup_int(param, priority); *module = (mca_base_module_t *)&loc_module; return OPAL_SUCCESS; }
int opal_paffinity_solaris_component_query(mca_base_module_t **module, int *priority) { int param; param = mca_base_param_find("paffinity", "solaris", "priority"); mca_base_param_lookup_int(param, priority); *module = (mca_base_module_t *)&loc_module; return OPAL_SUCCESS; }
int ompi_coll_tuned_bcast_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices) { int rc, max_alg = 6, requested_alg; ompi_coll_tuned_forced_max_algorithms[BCAST] = max_alg; rc = mca_base_param_reg_int (&mca_coll_tuned_component.super.collm_version, "bcast_algorithm_count", "Number of bcast algorithms available", false, true, max_alg, NULL); mca_param_indices->algorithm_param_index = mca_base_param_reg_int(&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.", false, false, 0, NULL); if (mca_param_indices->algorithm_param_index < 0) { return mca_param_indices->algorithm_param_index; } mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg)); if( 0 > requested_alg || requested_alg > max_alg ) { if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) { opal_output( 0, "Broadcast algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n", requested_alg, max_alg ); } mca_base_param_set_int( mca_param_indices->algorithm_param_index, 0); } mca_param_indices->segsize_param_index = mca_base_param_reg_int(&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.", false, false, 0, NULL); mca_param_indices->tree_fanout_param_index = mca_base_param_reg_int(&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.", false, false, ompi_coll_tuned_init_tree_fanout, /* get system wide default */ NULL); mca_param_indices->chain_fanout_param_index = mca_base_param_reg_int(&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.", false, false, ompi_coll_tuned_init_chain_fanout, /* get system wide default */ NULL); return (MPI_SUCCESS); }
/* * Register some paffinity-wide MCA params */ int opal_paffinity_base_register_params(void) { int value, id; static int been_here = 0; /* We may get called twice; be harmless in that case. */ if (1 == been_here) { return OPAL_SUCCESS; } been_here = 1; /* Debugging / verbose output */ mca_base_param_reg_int_name("paffinity", "base_verbose", "Verbosity level of the paffinity framework", false, false, 0, &value); if (0 != value) { opal_paffinity_base_output = opal_output_open(NULL); } else { opal_paffinity_base_output = -1; } id = mca_base_param_reg_int_name("opal", "paffinity_alone", "If nonzero, assume that this job is the only (set of) process(es) running on each node and bind processes to processors, starting with processor ID 0", false, false, 0, NULL); /* register the historical mpi_paffinity_alone synonym, but don't * declare it deprecated so we don't scare the users. * * Yes, this breaks the abstraction barrier, but as indicated * on the developer list....live with it. :-) */ mca_base_param_reg_syn_name(id, "mpi", "paffinity_alone", false); mca_base_param_lookup_int(id, &value); opal_paffinity_alone = OPAL_INT_TO_BOOL(value); mca_base_param_reg_int_name("paffinity", "base_bound", "Process affinity was set by an external entity", true, false, false, &value); opal_paffinity_base_bound = OPAL_INT_TO_BOOL(value); mca_base_param_reg_string_name("paffinity", "base_applied_binding", "Process affinity was set by an external entity", true, false, NULL, &opal_paffinity_base_applied_binding); return OPAL_SUCCESS; }
/* * Open the component */ int orte_gpr_proxy_open(void) { int id, tmp; id = mca_base_param_register_int("gpr", "proxy", "debug", NULL, 0); mca_base_param_lookup_int(id, &tmp); if (tmp) { orte_gpr_proxy_globals.debug = true; } else { orte_gpr_proxy_globals.debug = false; } return ORTE_SUCCESS; }
int orte_proc_info(void) { int id, tmp; /* all other params are set elsewhere */ id = mca_base_param_register_int("seed", NULL, NULL, NULL, orte_process_info.seed); mca_base_param_lookup_int(id, &tmp); orte_process_info.seed = OPAL_INT_TO_BOOL(tmp); /* if we are a seed, then make sure the daemon flag is NOT set so that * framework components are properly selected */ if (orte_process_info.seed) { orte_process_info.daemon = false; } id = mca_base_param_register_int("orte", "app", "num", NULL, -1); mca_base_param_lookup_int(id, &tmp); orte_process_info.app_num = tmp; id = mca_base_param_register_string("gpr", "replica", "uri", NULL, orte_process_info.gpr_replica_uri); mca_base_param_lookup_string(id, &(orte_process_info.gpr_replica_uri)); mca_base_param_set_internal(id, true); id = mca_base_param_register_string("ns", "replica", "uri", NULL, orte_process_info.ns_replica_uri); mca_base_param_lookup_string(id, &(orte_process_info.ns_replica_uri)); mca_base_param_set_internal(id, true); id = mca_base_param_register_string("tmpdir", "base", NULL, NULL, orte_process_info.tmpdir_base); mca_base_param_lookup_string(id, &(orte_process_info.tmpdir_base)); /* get the process id */ orte_process_info.pid = getpid(); return ORTE_SUCCESS; }
int ompi_coll_tuned_alltoall_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices) { int rc, max_alg = 4, requested_alg; ompi_coll_tuned_forced_max_algorithms[ALLTOALL] = max_alg; rc = mca_base_param_reg_int (&mca_coll_tuned_component.super.collm_version, "alltoall_algorithm_count", "Number of alltoall algorithms available", false, true, max_alg, NULL); mca_param_indices->algorithm_param_index = mca_base_param_reg_int(&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: two proc only.", false, false, 0, NULL); mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg)); if( requested_alg > max_alg ) { if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) { opal_output( 0, "Alltoall algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n", requested_alg, max_alg ); } mca_base_param_set_int( mca_param_indices->algorithm_param_index, 0); } mca_param_indices->segsize_param_index = mca_base_param_reg_int(&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.", false, false, 0, NULL); mca_param_indices->tree_fanout_param_index = mca_base_param_reg_int(&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.", false, false, ompi_coll_tuned_init_tree_fanout, /* get system wide default */ NULL); mca_param_indices->chain_fanout_param_index = mca_base_param_reg_int(&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.", false, false, ompi_coll_tuned_init_chain_fanout, /* get system wide default */ NULL); return (MPI_SUCCESS); }
static int delete_query(char *filename, struct ompi_info_t *info, struct mca_io_base_delete_t **private_data, bool *usable, int *priority) { /* Lookup our priority */ if (OMPI_SUCCESS != mca_base_param_lookup_int(delete_priority_param, priority)) { return OMPI_ERROR; } *usable = true; *private_data = NULL; return OMPI_SUCCESS; }
static int lookup_set(char *a, char *b, char *c, int default_val, char *token, int *argc, char ***argv) { int id, rc; id = mca_base_param_find(a, b, c); if (id < 0) { id = mca_base_param_register_int(a, b, c, NULL, default_val); } mca_base_param_lookup_int(id, &rc); if (rc) { opal_argv_append(argc, argv, token); } return ORTE_SUCCESS; }
void ompi_common_verbs_mca_register(mca_base_component_t *component) { int ival; if (!registered) { register_internal(); } /* Make synonyms for the common_verbs MCA params. Need to look up the value again, because a new/different value may have been set by the new synonym name. */ mca_base_param_reg_syn(warn_nonexistent_if_index, component, "warn_nonexistent_if", false); mca_base_param_lookup_int(warn_nonexistent_if_index, &ival); ompi_common_verbs_warn_nonexistent_if = (bool) ival; }
/* * Invoked when there's a new communicator that has been created. * Look at the communicator and decide which set of functions and * priority we want to return. */ mca_coll_base_module_t * mca_coll_self_comm_query(struct ompi_communicator_t *comm, int *priority) { mca_coll_self_module_t *module; /* We only work on intracommunicators of size 1 */ if (!OMPI_COMM_IS_INTER(comm) && 1 == ompi_comm_size(comm)) { if (OMPI_SUCCESS != mca_base_param_lookup_int(mca_coll_self_priority_param, priority)) { return NULL; } module = OBJ_NEW(mca_coll_self_module_t); if (NULL == module) return NULL; module->super.coll_module_enable = mca_coll_self_module_enable; module->super.ft_event = mca_coll_self_ft_event; module->super.coll_allgather = mca_coll_self_allgather_intra; module->super.coll_allgatherv = mca_coll_self_allgatherv_intra; module->super.coll_allreduce = mca_coll_self_allreduce_intra; module->super.coll_alltoall = mca_coll_self_alltoall_intra; module->super.coll_alltoallv = mca_coll_self_alltoallv_intra; module->super.coll_alltoallw = mca_coll_self_alltoallw_intra; module->super.coll_barrier = mca_coll_self_barrier_intra; module->super.coll_bcast = mca_coll_self_bcast_intra; module->super.coll_exscan = mca_coll_self_exscan_intra; module->super.coll_gather = mca_coll_self_gather_intra; module->super.coll_gatherv = mca_coll_self_gatherv_intra; module->super.coll_reduce = mca_coll_self_reduce_intra; module->super.coll_reduce_scatter = mca_coll_self_reduce_scatter_intra; module->super.coll_scan = mca_coll_self_scan_intra; module->super.coll_scatter = mca_coll_self_scatter_intra; module->super.coll_scatterv = mca_coll_self_scatterv_intra; return &(module->super); } return NULL; }
/* * Function to find as many components of a given type as possible. This * includes statically-linked in components as well as opening up a * directory and looking for shared-library MCA components of the * appropriate type (load them if available). * * Return one consolidated array of (mca_base_component_t*) pointing to all * available components. */ int mca_base_component_find(const char *directory, const char *type, const mca_base_component_t *static_components[], opal_list_t *found_components, bool open_dso_components) { int i; mca_base_component_list_item_t *cli; /* Find all the components that were statically linked in */ OBJ_CONSTRUCT(found_components, opal_list_t); for (i = 0; NULL != static_components[i]; ++i) { cli = OBJ_NEW(mca_base_component_list_item_t); if (NULL == cli) { return OPAL_ERR_OUT_OF_RESOURCE; } cli->cli_component = static_components[i]; opal_list_append(found_components, (opal_list_item_t *) cli); } #if OMPI_WANT_LIBLTDL /* Find any available dynamic components in the specified directory */ if (open_dso_components) { int param, param_disable_dlopen; param = mca_base_param_find("mca", NULL, "component_disable_dlopen"); mca_base_param_lookup_int(param, ¶m_disable_dlopen); if (0 == param_disable_dlopen) { find_dyn_components(directory, type, NULL, found_components); } } else { opal_output_verbose(40, 0, "mca: base: component_find: dso loading for %s MCA components disabled", type); } #endif /* All done */ return OPAL_SUCCESS; }
static orte_ras_base_module_t *ras_tm_init(int* priority) { /* if we are not an HNP, then we must not be selected */ if (!orte_process_info.seed) { return NULL; } /* Are we running under a TM job? */ if (NULL != getenv("PBS_ENVIRONMENT") && NULL != getenv("PBS_JOBID")) { mca_base_param_lookup_int(param_priority, priority); opal_output(orte_ras_base.ras_output, "ras:tm: available for selection"); return &orte_ras_tm_module; } /* Sadly, no */ opal_output(orte_ras_base.ras_output, "ras:tm: NOT available for selection"); return NULL; }
static int orte_ras_slurm_component_query(mca_base_module_t **module, int *priority) { /* Are we running under a SLURM job? */ if (NULL != getenv("SLURM_JOBID")) { mca_base_param_lookup_int(param_priority, priority); OPAL_OUTPUT_VERBOSE((1, orte_ras_base.ras_output, "%s ras:slurm: available for selection", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); *module = (mca_base_module_t *) &orte_ras_slurm_module; return ORTE_SUCCESS; } /* Sadly, no */ OPAL_OUTPUT_VERBOSE((1, orte_ras_base.ras_output, "%s ras:slurm: NOT available for selection", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); *module = NULL; return ORTE_ERROR; }