/** * component open/close/init function */ static int orte_sensor_resusage_open(void) { mca_base_component_t *c = &mca_sensor_resusage_component.super.base_version; int tmp; /* lookup parameters */ mca_base_param_reg_int(c, "sample_rate", "Sample rate in seconds (default=10)", false, false, 0, &tmp); if (tmp < 0) { opal_output(0, "Illegal value %d - must be > 0", tmp); return ORTE_ERR_FATAL; } mca_sensor_resusage_component.sample_rate = tmp; mca_base_param_reg_int(c, "node_memory_limit", "Percentage of total memory that can be in-use", false, false, 0, &tmp); mca_sensor_resusage_component.node_memory_limit = (float)tmp/100.0; mca_base_param_reg_int(c, "proc_memory_limit", "Max virtual memory size in MBytes", false, false, 0, &tmp); mca_sensor_resusage_component.proc_memory_limit = (float)tmp; mca_base_param_reg_string(c, "node_stat_log", "Print the node stats to the indicated file (- => stdout, + => stderr)", false, false, NULL, &mca_sensor_resusage_component.nstat_log); mca_base_param_reg_string(c, "process_stat_log", "Print the process stats to the indicated file (- => stdout, + => stderr)", false, false, NULL, &mca_sensor_resusage_component.pstat_log); return ORTE_SUCCESS; }
/** orte_plm_poe_component_open - open component and register all parameters @return error number */ int orte_plm_poe_component_open(void) { char *param; mca_base_component_t *c = &mca_plm_poe_component.super.base_version; mca_base_param_reg_int(c, "mp_retry", "specifies the interval (in seconds) to wait before repeating the node request", true, false, 0, &mca_plm_poe_component.mp_retry); mca_base_param_reg_int(c, "mp_retrycount", "specifies the number of times the Partition Manager should make the request before returning", true, false, 0, &mca_plm_poe_component.mp_retrycount); mca_base_param_reg_int(c, "mp_infolevel", "specify the level of messages you want from POE (0-6)", true, false, 0, &mca_plm_poe_component.mp_infolevel); mca_base_param_reg_string(c, "mp_labelio", "Whether or not to label message output with task identifiers (yes or no)", true, false, "no", &mca_plm_poe_component.mp_labelio); mca_base_param_reg_string(c, "mp_stdoutmode", "standard output mode (ordered, unordered or taskID)", true, false, "unordered", &mca_plm_poe_component.mp_stdoutmode); mca_base_param_reg_int(c, "debug", "Whether or not to enable debugging output for the poe plm component (0 or 1)", false, false, 0, &mca_plm_poe_component.debug); mca_base_param_reg_int(c, "priority", "Priority of the poe plm component", false , false, 0, &mca_plm_poe_component.priority); mca_base_param_reg_string(c, "class", "class (interactive or batch)", true, false, "interactive", &mca_plm_poe_component.class); mca_base_param_reg_string(c, "resource_allocation", "resource_allocation mode (hostfile or automatic)", false, false, "hostfile", &mca_plm_poe_component.resource_allocation); mca_base_param_reg_string(c, "progenv", "The command name that setup environment", false, false, "env", &mca_plm_poe_component.env); mca_base_param_reg_string(c, "progpoe", "The POE command", false, false, "poe", ¶m); mca_plm_poe_component.argv = opal_argv_split(param, ' '); mca_plm_poe_component.argc = opal_argv_count(mca_plm_poe_component.argv); if (mca_plm_poe_component.argc > 0) { mca_plm_poe_component.path = strdup(mca_plm_poe_component.argv[0]); return ORTE_SUCCESS; } else { mca_plm_poe_component.path = NULL; return ORTE_ERR_BAD_PARAM; } return ORTE_SUCCESS; }
int orte_db_dbase_component_query(mca_base_module_t **module, int *priority) { /* we are the file module - we need to be selected * IFF we are requested */ bool is_required = false; mca_base_component_t *c = &mca_db_dbase_component.base_version; /* retrieve the name of the file to be used */ mca_base_param_reg_string(c, "dir", "Name of directory to be used for storing and recovering db information", false, false, NULL, &orte_db_dbase_directory); mca_base_is_component_required(&orte_db_base_components_available, &mca_db_dbase_component.base_version, true, &is_required); if (is_required && NULL != orte_db_dbase_directory) { *priority = 1000; *module = (mca_base_module_t*)&orte_db_dbase_module; return ORTE_SUCCESS; } *priority = 0; *module = NULL; return ORTE_ERROR; }
static int default_replicate(void) { #if 0 char *file, *cmd; int i, nreps=0; FILE *fp; /* backdoor access the fault group file */ mca_base_param_reg_string("rmaps_resilient", "fault_grp_file", "Filename that contains a description of fault groups for this system", false, false, NULL, &file); if (NULL == file || (NULL == (fp = fopen(file, "r")))) { /* just default to num nodes in system */ for (i=0; i < orte_node_pool->size; i++) { if (NULL == opal_pointer_array_get_item(orte_node_pool, i)) { continue; } nreps++; } return nreps; } /* count the number of fault groups */ while (NULL != (cmd = cm_getline(fp))) { nreps++; free(cmd); } fclose(fp); return nreps; #endif return -1; }
/* * utility routine for string parameter registration */ static int reg_string(const char* param_name, const char* deprecated_param_name, const char* param_desc, const char* default_value, char **out_value, int flags) { int index; char *value; index = mca_base_param_reg_string(&mca_btl_openib_component.super.btl_version, param_name, param_desc, false, false, default_value, &value); 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_string(index, &value); if (0 != (flags & REGSTR_EMPTY_OK) && 0 == strlen(value)) { opal_output(0, "Bad parameter value for parameter \"%s\"", param_name); return OMPI_ERR_BAD_PARAM; } *out_value = value; return OMPI_SUCCESS; }
/** * component open/close/init function */ static int orte_sensor_file_open(void) { mca_base_component_t *c = &mca_sensor_file_component.super.base_version; int tmp; /* lookup parameters */ mca_base_param_reg_string(c, "filename", "File to be monitored", false, false, NULL, &mca_sensor_file_component.file); mca_base_param_reg_int(c, "check_size", "Check the file size", false, false, false, &tmp); mca_sensor_file_component.check_size = OPAL_INT_TO_BOOL(tmp); mca_base_param_reg_int(c, "check_access", "Check access time", false, false, false, &tmp); mca_sensor_file_component.check_access = OPAL_INT_TO_BOOL(tmp); mca_base_param_reg_int(c, "check_mod", "Check modification time", false, false, false, &tmp); mca_sensor_file_component.check_mod = OPAL_INT_TO_BOOL(tmp); mca_base_param_reg_int(c, "limit", "Number of times the sensor can detect no motion before declaring error (default=3)", false, false, 3, &mca_sensor_file_component.limit); return ORTE_SUCCESS; }
/* ////////////////////////////////////////////////////////////////////////// */ static int mmap_open(void) { mca_base_param_reg_int( &mca_shmem_mmap_component.super.base_version, "priority", "Priority of the mmap shmem component", false, false, mca_shmem_mmap_component.priority, &mca_shmem_mmap_component.priority ); mca_base_param_reg_int( &mca_shmem_mmap_component.super.base_version, "relocate_backing_file", "Whether to change the default placement of backing files or not " "(Negative = try to relocate backing files to an area rooted at " "the path specified by " "shmem_mmap_opal_shmem_mmap_backing_file_base_dir, but continue " "with the default path if the relocation fails, 0 = do not relocate, " "Positive = same as the negative option, but will fail if the " "relocation fails.", false, false, 0, &opal_shmem_mmap_relocate_backing_file ); mca_base_param_reg_string( &mca_shmem_mmap_component.super.base_version, "backing_file_base_dir", "Specifies where backing files will be created when " "shmem_mmap_relocate_backing_file is in use.", false, false, "/dev/shm", &opal_shmem_mmap_backing_file_base_dir ); return OPAL_SUCCESS; }
/** * component open/close/init function */ static int mca_mpool_rdma_open(void) { int val; mca_base_param_reg_string(&mca_mpool_rdma_component.super.mpool_version, "rcache_name", "The name of the registration cache the mpool should use", false, false, "vma", &mca_mpool_rdma_component.rcache_name); mca_base_param_reg_int(&mca_mpool_rdma_component.super.mpool_version, "rcache_size_limit", "the maximum size of registration cache in bytes. " "0 is unlimited (default 0)", false, false, 0, &val); mca_mpool_rdma_component.rcache_size_limit = (size_t)val; mca_base_param_reg_int(&mca_mpool_rdma_component.super.mpool_version, "print_stats", "print pool usage statistics at the end of the run", false, false, 0, &val); mca_mpool_rdma_component.print_stats = val?true:false; return OMPI_SUCCESS; }
static inline void mca_btl_ud_param_reg_string(const char* param_name, const char* param_desc, const char* default_value, char** out_value) { mca_base_param_reg_string(&mca_btl_ofud_component.super.btl_version, param_name, param_desc, false, false, default_value, out_value); }
static inline char *mca_pml_v_param_register_string( const char* param_name, char *default_value ) { char *param_value = default_value; (void) mca_base_param_reg_string (&mca_pml_v_component.pmlm_version, param_name, NULL, false, false, default_value, ¶m_value); return param_value; }
static int mca_pml_csum_component_open(void) { int value; mca_allocator_base_component_t* allocator_component; value = mca_pml_csum_param_register_int("verbose", 0); mca_pml_csum_output = opal_output_open(NULL); opal_output_set_verbosity(mca_pml_csum_output, value); mca_pml_csum.free_list_num = mca_pml_csum_param_register_int("free_list_num", 4); mca_pml_csum.free_list_max = mca_pml_csum_param_register_int("free_list_max", -1); mca_pml_csum.free_list_inc = mca_pml_csum_param_register_int("free_list_inc", 64); mca_pml_csum.priority = mca_pml_csum_param_register_int("priority", 0); mca_pml_csum.send_pipeline_depth = mca_pml_csum_param_register_int("send_pipeline_depth", 3); mca_pml_csum.recv_pipeline_depth = mca_pml_csum_param_register_int("recv_pipeline_depth", 4); mca_pml_csum.rdma_put_retries_limit = mca_pml_csum_param_register_int("rdma_put_retries_limit", 5); mca_pml_csum.max_rdma_per_request = mca_pml_csum_param_register_int("max_rdma_per_request", 4); mca_pml_csum.max_send_per_range = mca_pml_csum_param_register_int("max_send_per_range", 4); mca_pml_csum.unexpected_limit = mca_pml_csum_param_register_int("unexpected_limit", 128); mca_base_param_reg_string(&mca_pml_csum_component.pmlm_version, "allocator", "Name of allocator component for unexpected messages", false, false, "bucket", &mca_pml_csum.allocator_name); allocator_component = mca_allocator_component_lookup( mca_pml_csum.allocator_name ); if(NULL == allocator_component) { opal_output(0, "mca_pml_csum_component_open: can't find allocator: %s\n", mca_pml_csum.allocator_name); return OMPI_ERROR; } mca_pml_csum.allocator = allocator_component->allocator_init(true, mca_pml_csum_seg_alloc, mca_pml_csum_seg_free, NULL); if(NULL == mca_pml_csum.allocator) { opal_output(0, "mca_pml_csum_component_open: unable to initialize allocator\n"); return OMPI_ERROR; } mca_pml_csum.enabled = false; return mca_bml_base_open(); }
static inline char* mca_btl_tcp_param_register_string( const char* param_name, const char* help_string, const char* default_value) { char *value; mca_base_param_reg_string(&mca_btl_tcp_component.super.btl_version, param_name, help_string, false, false, default_value, &value); return value; }
int ompi_common_portals_register_mca(void) { mca_base_param_reg_string(&portals_component, "ifname", "Interface name to use for communication", false, false, ptl_ifname, &ptl_ifname); return OMPI_SUCCESS; }
static int linux_register(void) { mca_base_param_reg_int(&mca_paffinity_linux_component.base_version, "priority", "Priority of the linux paffinity component", false, false, 10, NULL); mca_base_param_reg_string(&mca_paffinity_linux_component.base_version, "plpa_version", "Version of PLPA that is embedded in Open MPI", false, true, PAFFINITY_LINUX_PLPA_VERSION, NULL); return OPAL_SUCCESS; }
static int urm_slurm_open(void) { mca_base_param_reg_int(&mca_urm_slurm_component.super.base_version, "dyn_allocate_timeout", "Number of seconds to wait for Slurm dynamic allocation", false, false, 30, &mca_urm_slurm_component.timeout); mca_base_param_reg_string(&mca_urm_slurm_component.super.base_version, "config_file", "Path to Slurm configuration file", false, false, NULL, &mca_urm_slurm_component.config_file); return ORTE_SUCCESS; }
/** * component open/close/init function */ static int mca_mpool_sm_open(void) { int value = 0; char *size_str = NULL; default_min = 67108864; /* register SM component parameters */ mca_base_param_reg_string(&mca_mpool_sm_component.super.mpool_version, "allocator", "Name of allocator component to use with sm mpool", false, false, "bucket", &mca_mpool_sm_component.sm_allocator_name); /* register values as string instead of int. A string-converted * signed long int allows the min_size or the sm_size * to be set up to 2GB-1 for 32 bit and much greater for 64 bit. */ asprintf(&size_str, "%ld", default_min); mca_base_param_reg_string(&mca_mpool_sm_component.super.mpool_version, "min_size", "Minimum size of the sm mpool shared memory file", false, false, size_str, &min_size_param); free(size_str); mca_base_param_reg_int(&mca_mpool_sm_component.super.mpool_version, "verbose", "Enable verbose output for mpool sm component", false, false, 0, &value); if (value != 0) { mca_mpool_sm_component.verbose = opal_output_open(NULL); } else { mca_mpool_sm_component.verbose = -1; } return OMPI_SUCCESS; }
int orte_db_dbm_component_query(mca_base_module_t **module, int *priority) { mca_base_component_t *c = &mca_db_dbm_component.base_version; /* retrieve the name of the file to be used */ mca_base_param_reg_string(c, "dir", "Name of directory to be used for storing and recovering db information", false, false, NULL, &orte_db_dbm_directory); if (NULL != orte_db_dbm_directory) { *priority = 50; *module = (mca_base_module_t*)&orte_db_dbm_module; return ORTE_SUCCESS; } *priority = 0; *module = NULL; return ORTE_ERROR; }
int mca_btl_elan_component_open(void) { /* initialize state */ mca_btl_elan_component.elan_num_btls = 0; mca_btl_elan_component.elan_btls = NULL; mca_btl_elan_module.super.btl_exclusivity = MCA_BTL_EXCLUSIVITY_DEFAULT; mca_btl_elan_module.super.btl_eager_limit = 32*1024; mca_btl_elan_module.super.btl_rndv_eager_limit = mca_btl_elan_module.super.btl_eager_limit; mca_btl_elan_module.super.btl_max_send_size = 64*1024; /*64*1024;*/ mca_btl_elan_module.super.btl_rdma_pipeline_send_length = 512 * 1024; mca_btl_elan_module.super.btl_rdma_pipeline_frag_size = 128 * 1024; mca_btl_elan_module.super.btl_min_rdma_pipeline_size = 128 * 1024; mca_btl_elan_module.super.btl_flags = MCA_BTL_FLAGS_SEND_INPLACE | MCA_BTL_FLAGS_PUT | MCA_BTL_FLAGS_SEND; mca_btl_elan_module.super.btl_bandwidth = 1959; mca_btl_elan_module.super.btl_latency = 4; mca_btl_base_param_register(&mca_btl_elan_component.super.btl_version, &mca_btl_elan_module.super); mca_base_param_reg_string( (mca_base_component_t*)&mca_btl_elan_component, "elanidmap", "System-wide configuration file for the Quadrics network (elanidmap)", false, false, "/etc/elanidmap", &mca_btl_elan_component.elanidmap_file ); mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_elan_component, "max_posted_recv", "Number of received posted in advance. Increasing this number for" " communication bound application can lead to visible improvement" " in performances", false, false, 128, &mca_btl_elan_component.elan_max_posted_recv ); /* register Elan4 component parameters */ mca_btl_elan_component.elan_free_list_num = mca_btl_elan_param_register_int( "free_list_num", 8 ); mca_btl_elan_component.elan_free_list_max = mca_btl_elan_param_register_int( "free_list_max", (mca_btl_elan_component.elan_free_list_num + mca_btl_elan_component.elan_max_posted_recv) ); mca_btl_elan_component.elan_free_list_inc = mca_btl_elan_param_register_int( "free_list_inc", 32 ); return OMPI_SUCCESS; }
static int orte_notifier_ftb_register(void) { /* FTB client subscription style */ mca_base_param_reg_string(&mca_notifier_ftb_component.super.base_version, "subscription_style", "FTB client subscription style. " "Possible values are none, polling, notify and both (polling and notify).", false, false, mca_notifier_ftb_component.subscription_style, &mca_notifier_ftb_component.subscription_style); /* Priority */ mca_base_param_reg_int(&mca_notifier_ftb_component.super.base_version, "priority", "Priority of this component", false, false, mca_notifier_ftb_component.priority, &mca_notifier_ftb_component.priority); return ORTE_SUCCESS; }
static int ras_tm_open(void) { mca_base_component_t *c = &mca_ras_tm_component.super.ras_version; char *pbs_nodefile_env = NULL; char *default_nodefile_dir = NULL; bool free_default_nodefile_dir = false; param_priority = mca_base_param_reg_int(c, "priority", "Priority of the tm ras component", false, false, 100, NULL); /* try to detect the default directory */ pbs_nodefile_env = getenv("PBS_NODEFILE"); if ( NULL != pbs_nodefile_env ) { default_nodefile_dir = opal_dirname(pbs_nodefile_env); if ( NULL != default_nodefile_dir ) { free_default_nodefile_dir = true; } else { default_nodefile_dir = "/var/torque/aux"; } } else { default_nodefile_dir = "/var/torque/aux"; } mca_base_param_reg_string(c, "nodefile_dir", "The directory where the PBS nodefile can be found", false, false, default_nodefile_dir, &mca_ras_tm_component.nodefile_dir); if ( free_default_nodefile_dir ) { free(default_nodefile_dir); } return ORTE_SUCCESS; }
static int plm_alps_open(void) { mca_base_component_t *comp = &mca_plm_alps_component.super.base_version; mca_base_param_reg_int(comp, "debug", "Enable debugging of alps plm", false, false, 0, &mca_plm_alps_component.debug); if (mca_plm_alps_component.debug == 0) { mca_plm_alps_component.debug = orte_debug_flag; } mca_base_param_reg_int(comp, "priority", "Default selection priority", false, false, 75, &mca_plm_alps_component.priority); mca_plm_alps_component.timing = orte_timing; mca_base_param_reg_string(comp, "args", "Custom arguments to srun", false, false, NULL, &mca_plm_alps_component.custom_args); return ORTE_SUCCESS; }
static int open_component(void) { int param; param = mca_base_param_find ("io", NULL, "ompio_cycle_buffer_size"); if (param >= 0) { mca_base_param_lookup_int (param, &mca_io_ompio_cycle_buffer_size); } param = mca_base_param_find ("io", NULL, "ompio_bytes_per_agg"); if (param >= 0) { mca_base_param_lookup_int (param, &mca_io_ompio_bytes_per_agg); } priority_param = mca_base_param_reg_int(&mca_io_ompio_component.io_version, "priority", "Priority of the io ompio component", false, false, priority_param, NULL); delete_priority_param = mca_base_param_reg_int(&mca_io_ompio_component.io_version, "delete_priority", "Delete priority of the io ompio component", false, false, delete_priority_param, NULL); mca_base_param_reg_string(&mca_io_ompio_component.io_version, "version", "Version of OMPIO", false, true, NULL, NULL); mca_base_param_reg_int (&mca_io_ompio_component.io_version, "cycle_buffer_size", "Cycle Buffer Size of individual reads/writes", false, false, mca_io_ompio_cycle_buffer_size, &mca_io_ompio_cycle_buffer_size); mca_base_param_reg_int (&mca_io_ompio_component.io_version, "bytes_per_agg", "Bytes per aggregator process for automatic selection", false, false, mca_io_ompio_bytes_per_agg, &mca_io_ompio_bytes_per_agg); /* mca_base_param_reg_string(&mca_io_ompio_component.io_version, "user_configure_params", "User-specified command line parameters passed to OMPIO's configure script", false, true, MCA_io_ompio_USER_CONFIGURE_FLAGS, NULL); mca_base_param_reg_string(&mca_io_ompio_component.io_version, "complete_configure_params", "Complete set of command line parameters passed to OMPIO's configure script", false, true, MCA_io_ompio_COMPLETE_CONFIGURE_FLAGS, NULL); */ /* Create the mutex */ OBJ_CONSTRUCT(&mca_io_ompio_mutex, opal_mutex_t); /* Create the list of pending requests */ OBJ_CONSTRUCT(&mca_io_ompio_pending_requests, opal_list_t); return OMPI_SUCCESS; }
/* * Register MCA parameters */ int ompi_btl_openib_connect_base_register(void) { int i, j, save; char **temp = NULL, *string = NULL, *all_cpc_names = NULL; char *cpc_include = NULL, *cpc_exclude = NULL; /* Make an MCA parameter to select which connect module to use */ for (i = 0; NULL != all[i]; ++i) { /* The CPC name "empty" is reserved for "fake" CPC modules */ if (0 != strcmp(all[i]->cbc_name, "empty")) { opal_argv_append_nosize(&temp, all[i]->cbc_name); } } all_cpc_names = opal_argv_join(temp, ','); opal_argv_free(temp); asprintf(&string, "Method used to select OpenFabrics connections (valid values: %s)", all_cpc_names); mca_base_param_reg_string(&mca_btl_openib_component.super.btl_version, "cpc_include", string, false, false, NULL, &cpc_include); free(string); asprintf(&string, "Method used to exclude OpenFabrics connections (valid values: %s)", all_cpc_names); mca_base_param_reg_string(&mca_btl_openib_component.super.btl_version, "cpc_exclude", string, false, false, NULL, &cpc_exclude); free(string); /* Parse the if_[in|ex]clude paramters to come up with a list of CPCs that are available */ available = calloc(1, sizeof(all)); /* If we have an "include" list, then find all those CPCs and put them in available[] */ if (NULL != cpc_include) { mca_btl_openib_component.cpc_explicitly_defined = true; temp = opal_argv_split(cpc_include, ','); for (save = j = 0; NULL != temp[j]; ++j) { for (i = 0; NULL != all[i]; ++i) { if (0 == strcmp(temp[j], all[i]->cbc_name)) { opal_output(-1, "include: saving %s", all[i]->cbc_name); available[save++] = all[i]; ++num_available; break; } } if (NULL == all[i]) { orte_show_help("help-mpi-btl-openib-cpc-base.txt", "cpc name not found", true, "include", orte_process_info.nodename, "include", cpc_include, temp[j], all_cpc_names); opal_argv_free(temp); free(all_cpc_names); return OMPI_ERR_NOT_FOUND; } } opal_argv_free(temp); } /* Otherwise, if we have an "exclude" list, take all the CPCs that are not in that list and put them in available[] */ else if (NULL != cpc_exclude) { mca_btl_openib_component.cpc_explicitly_defined = true; temp = opal_argv_split(cpc_exclude, ','); /* First: error check -- ensure that all the names are valid */ for (j = 0; NULL != temp[j]; ++j) { for (i = 0; NULL != all[i]; ++i) { if (0 == strcmp(temp[j], all[i]->cbc_name)) { break; } } if (NULL == all[i]) { orte_show_help("help-mpi-btl-openib-cpc-base.txt", "cpc name not found", true, "exclude", orte_process_info.nodename, "exclude", cpc_exclude, temp[j], all_cpc_names); opal_argv_free(temp); free(all_cpc_names); return OMPI_ERR_NOT_FOUND; } } /* Now do the exclude */ for (save = i = 0; NULL != all[i]; ++i) { for (j = 0; NULL != temp[j]; ++j) { if (0 == strcmp(temp[j], all[i]->cbc_name)) { break; } } if (NULL == temp[j]) { opal_output(-1, "exclude: saving %s", all[i]->cbc_name); available[save++] = all[i]; ++num_available; } } opal_argv_free(temp); } /* If there's no include/exclude list, copy all[] into available[] */ else { opal_output(-1, "no include or exclude: saving all"); memcpy(available, all, sizeof(all)); num_available = (sizeof(all) / sizeof(ompi_btl_openib_connect_base_module_t *)) - 1; } /* Call the register function on all the CPCs so that they may setup any MCA params specific to the connection type */ for (i = 0; NULL != available[i]; ++i) { if (NULL != available[i]->cbc_register) { available[i]->cbc_register(); } } return OMPI_SUCCESS; }
static int tuned_open(void) { int rc; #if OMPI_ENABLE_DEBUG { int param; param = mca_base_param_find("coll", NULL, "base_verbose"); if (param >= 0) { int verbose; mca_base_param_lookup_int(param, &verbose); if (verbose > 0) { ompi_coll_tuned_stream = opal_output_open(NULL); } } } #endif /* OMPI_ENABLE_DEBUG */ /* Use a low priority, but allow other components to be lower */ mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version, "priority", "Priority of the tuned coll component", false, false, ompi_coll_tuned_priority, &ompi_coll_tuned_priority); /* parameter for pre-allocated memory requests etc */ mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version, "pre_allocate_memory_comm_size_limit", "Size of communicator were we stop pre-allocating memory for the fixed internal buffer used for message requests etc that is hung off the communicator data segment. I.e. if you have a 100'000 nodes you might not want to pre-allocate 200'000 request handle slots per communicator instance!", false, false, ompi_coll_tuned_preallocate_memory_comm_size_limit, &ompi_coll_tuned_preallocate_memory_comm_size_limit); /* some initial guesses at topology parameters */ mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version, "init_tree_fanout", "Inital fanout used in the tree topologies for each communicator. This is only an initial guess, if a tuned collective needs a different fanout for an operation, it build it dynamically. This parameter is only for the first guess and might save a little time", false, false, ompi_coll_tuned_init_tree_fanout, &ompi_coll_tuned_init_tree_fanout); mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version, "init_chain_fanout", "Inital fanout used in the chain (fanout followed by pipeline) topologies for each communicator. This is only an initial guess, if a tuned collective needs a different fanout for an operation, it build it dynamically. This parameter is only for the first guess and might save a little time", false, false, ompi_coll_tuned_init_chain_fanout, &ompi_coll_tuned_init_chain_fanout); /* now check that the user hasn't overrode any of the decision functions if dynamic rules are enabled */ /* the user can redo this before every comm dup/create if they like */ /* this is useful for benchmarking and user knows best tuning */ /* as this is the component we only lookup the indicies of the mca params */ /* the actual values are looked up during comm create via module init */ /* intra functions first */ /* if dynamic rules allowed then look up dynamic rules config filename, else we leave it an empty filename (NULL) */ /* by default DISABLE dynamic rules and instead use fixed [if based] rules */ mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version, "use_dynamic_rules", "Switch used to decide if we use static (compiled/if statements) or dynamic (built at runtime) decision function rules", false, false, ompi_coll_tuned_use_dynamic_rules, &ompi_coll_tuned_use_dynamic_rules); if (ompi_coll_tuned_use_dynamic_rules) { mca_base_param_reg_string(&mca_coll_tuned_component.super.collm_version, "dynamic_rules_filename", "Filename of configuration file that contains the dynamic (@runtime) decision function rules", false, false, ompi_coll_tuned_dynamic_rules_filename, &ompi_coll_tuned_dynamic_rules_filename); if( ompi_coll_tuned_dynamic_rules_filename ) { OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:component_open Reading collective rules file [%s]", ompi_coll_tuned_dynamic_rules_filename)); rc = ompi_coll_tuned_read_rules_config_file( ompi_coll_tuned_dynamic_rules_filename, &(mca_coll_tuned_component.all_base_rules), COLLCOUNT); if( rc >= 0 ) { OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:module_open Read %d valid rules\n", rc)); } else { OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:module_open Reading collective rules file failed\n")); mca_coll_tuned_component.all_base_rules = NULL; } } ompi_coll_tuned_allreduce_intra_check_forced_init(&ompi_coll_tuned_forced_params[ALLREDUCE]); ompi_coll_tuned_alltoall_intra_check_forced_init(&ompi_coll_tuned_forced_params[ALLTOALL]); ompi_coll_tuned_allgather_intra_check_forced_init(&ompi_coll_tuned_forced_params[ALLGATHER]); ompi_coll_tuned_allgatherv_intra_check_forced_init(&ompi_coll_tuned_forced_params[ALLGATHERV]); ompi_coll_tuned_alltoallv_intra_check_forced_init(&ompi_coll_tuned_forced_params[ALLTOALLV]); ompi_coll_tuned_barrier_intra_check_forced_init(&ompi_coll_tuned_forced_params[BARRIER]); ompi_coll_tuned_bcast_intra_check_forced_init(&ompi_coll_tuned_forced_params[BCAST]); ompi_coll_tuned_reduce_intra_check_forced_init(&ompi_coll_tuned_forced_params[REDUCE]); ompi_coll_tuned_reduce_scatter_intra_check_forced_init(&ompi_coll_tuned_forced_params[REDUCESCATTER]); ompi_coll_tuned_gather_intra_check_forced_init(&ompi_coll_tuned_forced_params[GATHER]); ompi_coll_tuned_scatter_intra_check_forced_init(&ompi_coll_tuned_forced_params[SCATTER]); } OPAL_OUTPUT((ompi_coll_tuned_stream, "coll:tuned:component_open: done!")); return OMPI_SUCCESS; }
static int smtp_register(void) { char version[256]; /* Server stuff */ mca_base_param_reg_string(&mca_notifier_smtp_component.super.base_version, "server", "SMTP server name or IP address", false, false, mca_notifier_smtp_component.server, &mca_notifier_smtp_component.server); mca_base_param_reg_int(&mca_notifier_smtp_component.super.base_version, "port", "SMTP server port", false, false, mca_notifier_smtp_component.port, &mca_notifier_smtp_component.port); /* Email stuff */ mca_base_param_reg_string(&mca_notifier_smtp_component.super.base_version, "to", "Comma-delimited list of email addresses to send to", false, false, mca_notifier_smtp_component.to, &mca_notifier_smtp_component.to); mca_base_param_reg_string(&mca_notifier_smtp_component.super.base_version, "from_addr", "Email address that messages will be from", false, false, mca_notifier_smtp_component.from_addr, &mca_notifier_smtp_component.from_addr); mca_base_param_reg_string(&mca_notifier_smtp_component.super.base_version, "from_name", "Email name that messages will be from", false, false, mca_notifier_smtp_component.from_name, &mca_notifier_smtp_component.from_name); mca_base_param_reg_string(&mca_notifier_smtp_component.super.base_version, "subject", "Email subject", false, false, mca_notifier_smtp_component.subject, &mca_notifier_smtp_component.subject); /* Mail body prefix and suffix */ mca_base_param_reg_string(&mca_notifier_smtp_component.super.base_version, "body_prefix", "Text to put at the beginning of the mail message", false, false, mca_notifier_smtp_component.body_prefix, &mca_notifier_smtp_component.body_prefix); mca_base_param_reg_string(&mca_notifier_smtp_component.super.base_version, "body_suffix", "Text to put at the beginning of the mail message", false, false, mca_notifier_smtp_component.body_suffix, &mca_notifier_smtp_component.body_suffix); /* Priority */ mca_base_param_reg_int(&mca_notifier_smtp_component.super.base_version, "priority", "Priority of this component", false, false, mca_notifier_smtp_component.priority, &mca_notifier_smtp_component.priority); /* Libesmtp version */ smtp_version(version, sizeof(version), 0); version[sizeof(version) - 1] = '\0'; mca_base_param_reg_string(&mca_notifier_smtp_component.super.base_version, "libesmtp_version", "Version of libesmtp that this component is linked against", false, true, version, NULL); return ORTE_SUCCESS; }
static int ompi_mtl_psm_component_register(void) { int value; char *service_id = NULL; char *path_res = NULL; mca_base_param_reg_int(&mca_mtl_psm_component.super.mtl_version, "connect_timeout", "PSM connection timeout value in seconds", false, false, 180, &ompi_mtl_psm.connect_timeout); mca_base_param_reg_int(&mca_mtl_psm_component.super.mtl_version, "debug", "PSM debug level", false, false, 1, &value); ompi_mtl_psm.debug_level = value; mca_base_param_reg_int(&mca_mtl_psm_component.super.mtl_version, "ib_unit", "Truescale unit to use", false, false, -1, &ompi_mtl_psm.ib_unit); mca_base_param_reg_int(&mca_mtl_psm_component.super.mtl_version, "ib_port", "Truescale port on unit to use", false, false, 0, &ompi_mtl_psm.ib_port); mca_base_param_reg_int(&mca_mtl_psm_component.super.mtl_version, "ib_service_level", "Infiniband service level" "(0 <= SL <= 15)", false, false, 0, &ompi_mtl_psm.ib_service_level); ompi_mtl_psm.ib_pkey = 0x7fffUL; mca_base_param_reg_int(&mca_mtl_psm_component.super.mtl_version, "ib_pkey", "Infiniband partition key", false, false, 0x7fffUL, &value); ompi_mtl_psm.ib_pkey = value; #if PSM_VERNO >= 0x010d mca_base_param_reg_string(&mca_mtl_psm_component.super.mtl_version, "ib_service_id", "Infiniband service ID to use for application (default is 0)", false, false, "0x1000117500000000", &service_id); ompi_mtl_psm.ib_service_id = (uint64_t) strtoull(service_id, NULL, 0); mca_base_param_reg_string(&mca_mtl_psm_component.super.mtl_version, "path_query", "Path record query mechanisms (valid values: opp, none)", false, false, NULL, &path_res); if ((NULL != path_res) && strcasecmp(path_res, "none")) { if (!strcasecmp(path_res, "opp")) ompi_mtl_psm.path_res_type = PSM_PATH_RES_OPP; else { orte_show_help("help-mtl-psm.txt", "path query mechanism unknown", true, path_res, "OfedPlus (opp) | Static Routes (none)"); return OMPI_ERR_NOT_FOUND; } } else { /* Default is "static/none" path record queries */ ompi_mtl_psm.path_res_type = PSM_PATH_RES_NONE; } #endif if (ompi_mtl_psm.ib_service_level < 0) { ompi_mtl_psm.ib_service_level = 0; } else if (ompi_mtl_psm.ib_service_level > 15) { ompi_mtl_psm.ib_service_level = 15; } return OMPI_SUCCESS; }
static int filem_rsh_open(void) { mca_base_param_reg_int(&mca_filem_rsh_component.super.base_version, "priority", "Priority of the FILEM rsh component", false, false, mca_filem_rsh_component.super.priority, &mca_filem_rsh_component.super.priority); mca_base_param_reg_int(&mca_filem_rsh_component.super.base_version, "verbose", "Verbose level for the FILEM rsh component", false, false, mca_filem_rsh_component.super.verbose, &mca_filem_rsh_component.super.verbose); /* If there is a custom verbose level for this component than use it * otherwise take our parents level and output channel */ if ( 0 != mca_filem_rsh_component.super.verbose) { mca_filem_rsh_component.super.output_handle = opal_output_open(NULL); opal_output_set_verbosity(mca_filem_rsh_component.super.output_handle, mca_filem_rsh_component.super.verbose); } else { mca_filem_rsh_component.super.output_handle = orte_filem_base_output; } mca_base_param_reg_string(&mca_filem_rsh_component.super.base_version, "rcp", "The rsh cp command for the FILEM rsh component", false, false, "scp", &mca_filem_rsh_component.cp_command); mca_base_param_reg_string(&mca_filem_rsh_component.super.base_version, "cp", "The Unix cp command for the FILEM rsh component", false, false, "cp", &mca_filem_rsh_component.cp_local_command); mca_base_param_reg_string(&mca_filem_rsh_component.super.base_version, "rsh", "The remote shell command for the FILEM rsh component", false, false, "ssh", &mca_filem_rsh_component.remote_sh_command); mca_base_param_reg_int(&mca_filem_rsh_component.super.base_version, "max_incomming", "Maximum number of incomming connections (0 = any)", false, false, orte_filem_rsh_max_incomming, &orte_filem_rsh_max_incomming); if( orte_filem_rsh_max_incomming < 0 ) { orte_filem_rsh_max_incomming = 1; } mca_base_param_reg_int(&mca_filem_rsh_component.super.base_version, "max_outgoing", "Maximum number of out going connections (0 = any)", false, false, orte_filem_rsh_max_outgoing, &orte_filem_rsh_max_outgoing); if( orte_filem_rsh_max_outgoing < 0 ) { orte_filem_rsh_max_outgoing = 1; } mca_base_param_reg_int(&mca_filem_rsh_component.super.base_version, "progress_meter", "Display Progress every X percentage done. [Default = 0/off]", false, false, 0, &orte_filem_rsh_progress_meter); orte_filem_rsh_progress_meter = (orte_filem_rsh_progress_meter % 101); /* * Debug Output */ opal_output_verbose(10, mca_filem_rsh_component.super.output_handle, "filem:rsh: open()"); opal_output_verbose(20, mca_filem_rsh_component.super.output_handle, "filem:rsh: open: priority = %d", mca_filem_rsh_component.super.priority); opal_output_verbose(20, mca_filem_rsh_component.super.output_handle, "filem:rsh: open: verbosity = %d", mca_filem_rsh_component.super.verbose); opal_output_verbose(20, mca_filem_rsh_component.super.output_handle, "filem:rsh: open: cp command = %s", mca_filem_rsh_component.cp_command); opal_output_verbose(20, mca_filem_rsh_component.super.output_handle, "filem:rsh: open: cp local command = %s", mca_filem_rsh_component.cp_local_command); opal_output_verbose(20, mca_filem_rsh_component.super.output_handle, "filem:rsh: open: rsh command = %s", mca_filem_rsh_component.remote_sh_command); return ORTE_SUCCESS; }