int orcm_cfgi_base_open(void) { /* Debugging / verbose output. Always have stream open, with verbose set by the mca open system... */ orcm_cfgi_base.output = opal_output_open(NULL); /* init the globals */ OBJ_CONSTRUCT(&orcm_cfgi_base.ctl, orte_thread_ctl_t); orcm_cfgi_base.num_active_apps = 0; orcm_cfgi_base.daemons = NULL; OBJ_CONSTRUCT(&orcm_cfgi_components_available, opal_list_t); OBJ_CONSTRUCT(&orcm_cfgi_selected_modules, opal_list_t); OBJ_CONSTRUCT(&orcm_cfgi_base.installed_apps, opal_pointer_array_t); opal_pointer_array_init(&orcm_cfgi_base.installed_apps, 16, INT_MAX, 16); OBJ_CONSTRUCT(&orcm_cfgi_base.confgd_apps, opal_pointer_array_t); opal_pointer_array_init(&orcm_cfgi_base.confgd_apps, 16, INT_MAX, 16); orcm_cfgi_base.launch_pipe[0] = -1; orcm_cfgi_base.launch_pipe[1] = -1; /* Open up all available components */ if (ORCM_SUCCESS != mca_base_components_open("orcm_cfgi", orcm_cfgi_base.output, NULL, &orcm_cfgi_components_available, true)) { return ORCM_ERROR; } /* All done */ return ORCM_SUCCESS; }
int orte_rml_base_open(void) { int ret; /* Initialize globals */ OBJ_CONSTRUCT(&orte_rml_base_components, opal_list_t); OBJ_CONSTRUCT(&orte_rml_base_subscriptions, opal_list_t); /* * Which RML Wrapper component to use, if any * - NULL or "" = No wrapper * - ow. select that specific wrapper component */ mca_base_param_reg_string_name("rml", "wrapper", "Use a Wrapper component around the selected RML component", false, false, NULL, NULL); /* register parameters */ orte_rml_base_output = opal_output_open(NULL); /* Open up all available components */ ret = mca_base_components_open("rml", orte_rml_base_output, mca_rml_base_static_components, &orte_rml_base_components, true); component_open_called = true; return ret; }
/** * Function for finding and opening either all MCA components, * or the one that was specifically requested via a MCA parameter. */ int ompi_crcp_base_open(void) { char *str_value = NULL; ompi_crcp_base_output = opal_output_open(NULL); /* * Which CRCP component to open * - NULL or "" = auto-select * - "none" = Empty component * - ow. select that specific component * Note: Set the default to NULL here so ompi_info will work correctly, * The 'real' default is set in base_select.c */ mca_base_param_reg_string_name("crcp", NULL, "Which CRCP component to use (empty = auto-select)", false, false, NULL, &str_value); if( NULL != str_value ) { free(str_value); } /* Open up all available components */ if (OPAL_SUCCESS != mca_base_components_open("crcp", ompi_crcp_base_output, mca_crcp_base_static_components, &ompi_crcp_base_components_available, true)) { return OMPI_ERROR; } return OMPI_SUCCESS; }
/* * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int opal_carto_base_open(void) { int value; /* Debugging / verbose output */ mca_base_param_reg_int_name("carto", "base_verbose", "Verbosity level of the carto framework", false, false, 0, &value); if (0 != value) { opal_carto_base_output = opal_output_open(NULL); } else { opal_carto_base_output = -1; } opal_carto_base_components_opened_valid = false; /* Open up all available components */ if (OPAL_SUCCESS != mca_base_components_open("carto", opal_carto_base_output, mca_carto_base_static_components, &opal_carto_base_components_opened, true)) { return OPAL_ERROR; } opal_carto_base_components_opened_valid = true; /* All done */ return OPAL_SUCCESS; }
/** * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int mca_oob_base_open(void) { /* Sanity check. This may be able to be removed when the rml/oob interface is re-worked (the current infrastructure may invoke this function twice: once as a standalone, and once via the rml oob component). */ if (orte_oob_base_already_opened) { return ORTE_SUCCESS; } /* register parameters */ mca_oob_base_output = opal_output_open(NULL); /* Open up all available components */ OBJ_CONSTRUCT(&mca_oob_base_components, opal_list_t); OBJ_CONSTRUCT(&mca_oob_base_modules, opal_list_t); if (ORTE_SUCCESS != mca_base_components_open("oob", mca_oob_base_output, mca_oob_base_static_components, &mca_oob_base_components, true)) { return ORTE_ERROR; } /* All done */ orte_oob_base_already_opened = true; return ORTE_SUCCESS; }
/** * Function for finding and opening either all MCA components, * or the one that was specifically requested via a MCA parameter. */ int orte_filem_base_open(void) { char *str_value = NULL; orte_filem_base_output = opal_output_open(NULL); /* * Which FileM component to open * - NULL or "" = auto-select * - "none" = Empty component * - ow. select that specific component */ mca_base_param_reg_string_name("filem", NULL, "Which Filem component to use (empty = auto-select)", false, false, NULL, &str_value); if( NULL != str_value ) { free(str_value); } /* Open up all available components */ if (OPAL_SUCCESS != mca_base_components_open("filem", orte_filem_base_output, mca_filem_base_static_components, &orte_filem_base_components_available, true)) { return ORTE_ERROR; } return ORTE_SUCCESS; }
/** * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int mca_allocator_base_open(void) { /* Open up all available components */ return mca_base_components_open("allocator", 0, mca_allocator_base_static_components, &mca_allocator_base_components, true); }
/** * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int mca_pml_base_open(void) { char* default_pml = NULL; /* Open up all available components */ if (OMPI_SUCCESS != mca_base_components_open("pml", 0, mca_pml_base_static_components, &mca_pml_base_components_available, !MCA_pml_DIRECT_CALL)) { return OMPI_ERROR; } /* Set a sentinel in case we don't select any components (e.g., ompi_info) */ mca_pml_base_selected_component.pmlm_finalize = NULL; /** * Right now our selection of BTLs is completely broken. If we have * multiple PMLs that use BTLs than we will open all BTLs several times, leading to * undefined behaviors. The simplest solution, at least until we * figure out the correct way to do it, is to force a default PML that * uses BTLs and any other PMLs that do not in the mca_pml_base_pml array. */ OBJ_CONSTRUCT(&mca_pml_base_pml, ompi_pointer_array_t); #if MCA_pml_DIRECT_CALL ompi_pointer_array_add(&mca_pml_base_pml, stringify(MCA_pml_DIRECT_CALL_COMPONENT)); #else mca_base_param_reg_string_name("pml", NULL, "Specify a specific PML to use", false, false, "", &default_pml); if(0 == strlen(default_pml)){ ompi_pointer_array_add(&mca_pml_base_pml, strdup("ob1")); ompi_pointer_array_add(&mca_pml_base_pml, strdup("cm")); } else { ompi_pointer_array_add(&mca_pml_base_pml, strdup(default_pml)); } #endif /** * Construct the send and receive request queues. There are 2 reasons to do it * here. First, as they are globals it's better to construct them in one common * place. Second, in order to be able to allow the external debuggers to show * their content, they should get constructed as soon as possible once the MPI * process is started. */ OBJ_CONSTRUCT(&mca_pml_base_send_requests, ompi_free_list_t); OBJ_CONSTRUCT(&mca_pml_base_recv_requests, ompi_free_list_t); return OMPI_SUCCESS; }
/** * Function for finding and opening either all MCA components, * or the one that was specifically requested via a MCA parameter. */ int opal_compress_base_open(void) { int ret, exit_status = OPAL_SUCCESS; int value; char *str_value = NULL; /* Debugging/Verbose output */ mca_base_param_reg_int_name("compress", "base_verbose", "Verbosity level of the COMPRESS framework", false, false, 0, &value); if(0 != value) { opal_compress_base_output = opal_output_open(NULL); } else { opal_compress_base_output = -1; } opal_output_set_verbosity(opal_compress_base_output, value); /* * Which COMPRESS component to open * - NULL or "" = auto-select * - "none" = Empty component * - ow. select that specific component */ mca_base_param_reg_string_name("compress", NULL, "Which COMPRESS component to use (empty = auto-select)", false, false, NULL, &str_value); /* Compression currently only used with C/R */ if( !opal_cr_is_enabled ) { opal_output_verbose(10, opal_compress_base_output, "compress:open: FT is not enabled, skipping!"); return OPAL_SUCCESS; } /* Open up all available components */ if (OPAL_SUCCESS != (ret = mca_base_components_open("compress", opal_compress_base_output, mca_compress_base_static_components, &opal_compress_base_components_available, true)) ) { if( OPAL_ERR_NOT_FOUND == ret && NULL != str_value && 0 == strncmp(str_value, "none", strlen("none")) ) { exit_status = OPAL_SUCCESS; } else { exit_status = OPAL_ERROR; } } if( NULL != str_value ) { free(str_value); } return exit_status; }
/* Load any vprotocol MCA component and call open function of all those * components. * * Also fill the mca_vprotocol_base_include_list with components that exists */ int mca_vprotocol_base_open(char *vprotocol_include_list) { OBJ_CONSTRUCT(&mca_vprotocol_base_components_available, opal_list_t); mca_vprotocol_base_include_list = vprotocol_include_list; if(mca_vprotocol_base_include_list[0] == 0) return OMPI_SUCCESS; return mca_base_components_open("vprotocol", 0, mca_vprotocol_base_static_components, &mca_vprotocol_base_components_available, true); }
/** * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int mca_btl_base_open(void) { int i; if( ++mca_btl_base_already_opened > 1 ) return OMPI_SUCCESS; /* Verbose output */ mca_base_param_reg_int_name("btl", "base_verbose", "Verbosity level of the BTL framework", false, false, 0, &mca_btl_base_verbose); mca_btl_base_output = opal_output_open(NULL); opal_output_set_verbosity(mca_btl_base_output, mca_btl_base_verbose); /* Override the per-BTL "don't run if THREAD_MULTIPLE selected" embargo? */ mca_base_param_reg_int_name("btl", "base_thread_multiple_override", "Enable BTLs that are not normally enabled when MPI_THREAD_MULTIPLE is enabled (THIS IS FOR DEVELOPERS ONLY! SHOULD NOT BE USED BY END USERS!)", true, false, 0, &i); mca_btl_base_thread_multiple_override = OPAL_INT_TO_BOOL(i); /* Open up all available components */ if (OMPI_SUCCESS != mca_base_components_open("btl", mca_btl_base_output, mca_btl_base_static_components, &mca_btl_base_components_opened, true)) { return OMPI_ERROR; } /* Initialize the list so that in mca_btl_base_close(), we can iterate over it (even if it's empty, as in the case of ompi_info) */ OBJ_CONSTRUCT(&mca_btl_base_modules_initialized, opal_list_t); /* register parameters */ mca_base_param_lookup_string( mca_base_param_register_string("btl","base","include",NULL,NULL), &mca_btl_base_include); mca_base_param_lookup_string( mca_base_param_register_string("btl","base","exclude",NULL,NULL), &mca_btl_base_exclude); mca_base_param_reg_int_name("btl", "base_warn_component_unused", "This parameter is used to turn on warning messages when certain NICs are not used", false, false, 1, &mca_btl_base_warn_component_unused); /* All done */ 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(); }
/* * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int opal_timer_base_open(void) { OBJ_CONSTRUCT( &opal_timer_base_components_opened, opal_list_t ); /* Open up all available components */ if (OPAL_SUCCESS != mca_base_components_open("timer", 0, mca_timer_base_static_components, &opal_timer_base_components_opened, true)) { return OPAL_ERROR; } /* All done */ return OPAL_SUCCESS; }
int orte_db_base_open(void) { orte_db_base.output = opal_output_open(NULL); OBJ_CONSTRUCT(&orte_db_base.available_components, opal_list_t); OBJ_CONSTRUCT(&orte_db_base.active_modules, opal_list_t); /* Open up all available components */ if (ORTE_SUCCESS != mca_base_components_open("db", orte_db_base.output, mca_db_base_static_components, &orte_db_base.available_components, true)) { return ORTE_ERROR; } return ORTE_SUCCESS; }
/** * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int mca_bcol_base_open(void) { int value, ret; /*_bcol_base_components_available * Register some MCA parameters */ /* Debugging/Verbose output */ mca_base_param_reg_int_name("bcol", "base_verbose", "Verbosity level of BCOL framework", false, false, 0, &value); /* get fraemwork id */ mca_bcol_base_output = opal_output_open(NULL); opal_output_set_verbosity(mca_bcol_base_output, value); /* Open up all available components */ if (OMPI_SUCCESS != mca_base_components_open("bcol", mca_bcol_base_output, mca_bcol_base_static_components, &mca_bcol_base_components_opened, true)) { return OMPI_ERROR; } /* figure out which bcol and sbgp components will actually be used */ /* get list of sub-grouping functions to use */ mca_base_param_reg_string_name("bcol","base_string", "Default set of basic collective components to use ", false, false, "basesmuma,basesmuma,iboffload,ptpcoll,ugni", &ompi_bcol_bcols_string); ret = mca_bcol_base_set_components_to_use(&mca_bcol_base_components_opened, &mca_bcol_base_components_in_use); /* memory registration compatibilities */ bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_SHARED_MEMORY_UMA]=1; bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_SHARED_MEMORY_SOCKET]=1; bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_POINT_TO_POINT]=1; bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_IB_OFFLOAD]=1; bcol_mpool_compatibility[BCOL_SHARED_MEMORY_SOCKET][BCOL_SHARED_MEMORY_UMA]=1; bcol_mpool_compatibility[BCOL_POINT_TO_POINT] [BCOL_SHARED_MEMORY_UMA]=1; bcol_mpool_compatibility[BCOL_IB_OFFLOAD] [BCOL_SHARED_MEMORY_UMA]=1; return OMPI_SUCCESS; }
int orte_ess_base_open(void) { orte_ess_base_output = opal_output_open(NULL); OBJ_CONSTRUCT(&orte_ess_base_components_available, opal_list_t); /* Open up all available components */ if (ORTE_SUCCESS != mca_base_components_open("ess", orte_ess_base_output, mca_ess_base_static_components, &orte_ess_base_components_available, true)) { return ORTE_ERROR; } return ORTE_SUCCESS; }
/** * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int orte_grpcomm_base_open(void) { /* Debugging / verbose output. Always have stream open, with verbose set by the mca open system... */ orte_grpcomm_base_output = opal_output_open(NULL); /* Open up all available components */ if (ORTE_SUCCESS != mca_base_components_open("grpcomm", orte_grpcomm_base_output, mca_grpcomm_base_static_components, &mca_grpcomm_base_components_available, true)) { return ORTE_ERROR; } /* All done */ return ORTE_SUCCESS; }
/** * Function for finding and opening either all MCA modules, or the one * that was specifically requested via a MCA parameter. */ int orte_plm_base_open(void) { /* Debugging / verbose output. Always have stream open, with verbose set by the mca open system... */ orte_plm_globals.output = opal_output_open(NULL); /* init selected to be false */ orte_plm_base.selected = false; /* initialize the condition variables for orted comm */ OBJ_CONSTRUCT(&orte_plm_globals.orted_cmd_lock, opal_mutex_t); OBJ_CONSTRUCT(&orte_plm_globals.orted_cmd_cond, opal_condition_t); /* initialize the condition variables for spawn */ OBJ_CONSTRUCT(&orte_plm_globals.spawn_lock, opal_mutex_t); OBJ_CONSTRUCT(&orte_plm_globals.spawn_cond, opal_condition_t); OBJ_CONSTRUCT(&orte_plm_globals.spawn_in_progress_cond, opal_condition_t); orte_plm_globals.spawn_complete = false; orte_plm_globals.spawn_in_progress = false; /* init the next jobid */ orte_plm_globals.next_jobid = 1; /* init the rsh support */ orte_plm_globals.rsh_agent_argv = NULL; orte_plm_globals.rsh_agent_path = NULL; orte_plm_globals.local_slaves = 0; OBJ_CONSTRUCT(&orte_plm_globals.slave_files, opal_list_t); /* Open up all the components that we can find */ if (ORTE_SUCCESS != mca_base_components_open("plm", orte_plm_globals.output, mca_plm_base_static_components, &orte_plm_base.available_components, true)) { return ORTE_ERROR; } /* All done */ return ORTE_SUCCESS; }
int orte_routed_base_open(void) { int ret; /* setup the output stream */ orte_routed_base_output = opal_output_open(NULL); /* Initialize globals */ OBJ_CONSTRUCT(&orte_routed_base_components, opal_list_t); /* Open up all available components */ ret = mca_base_components_open("routed", orte_routed_base_output, mca_routed_base_static_components, &orte_routed_base_components, true); component_open_called = true; return ret; }
/* * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int mca_fcache_base_open(void) { /* Open an output stream for this framework */ mca_fcache_base_output = opal_output_open(NULL); /* Open up all available components */ if (OMPI_SUCCESS != mca_base_components_open("fcache", mca_fcache_base_output, mca_fcache_base_static_components, &mca_fcache_base_components_opened, true)) { return OMPI_ERROR; } mca_fcache_base_components_opened_valid = true; /* Find the index of the MCA "fcache" param for selection */ mca_fcache_base_param = mca_base_param_find("fcache", "base", NULL); return OMPI_SUCCESS; }
/* * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int ompi_mtl_base_open(void) { /* setup the output stream */ ompi_mtl_base_output = opal_output_open(NULL); /* Open up all available components */ if (OMPI_SUCCESS != mca_base_components_open("mtl", ompi_mtl_base_output, mca_mtl_base_static_components, &ompi_mtl_base_components_opened, !MCA_mtl_DIRECT_CALL)) { return OMPI_ERROR; } /* Set a sentinel in case we don't select any components (e.g., ompi_info) */ ompi_mtl = NULL; return OMPI_SUCCESS; }
/** * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int orte_debugger_base_open(void) { int value; /* Debugging / verbose output. Always have stream open, with verbose set by the mca open system... */ orte_debugger_base.output = opal_output_open(NULL); mca_base_param_reg_int_name("orte", "output_debugger_proctable", "Whether or not to output the debugger proctable after launch (default: false)", true, false, 0, &value); orte_debugger_base.dump_proctable = OPAL_INT_TO_BOOL(value); mca_base_param_reg_string_name("orte", "debugger_test_daemon", "Name of the executable to be used to simulate a debugger colaunch (relative or absolute path)", false, false, NULL, &orte_debugger_base.test_daemon); mca_base_param_reg_int_name("orte", "debugger_test_attach", "Test debugger colaunch after debugger attachment", false, false, 0, &value); orte_debugger_base.test_attach = OPAL_INT_TO_BOOL(value); /* Open up all available components */ if (ORTE_SUCCESS != mca_base_components_open("debugger", orte_debugger_base.output, mca_debugger_base_static_components, &orte_debugger_base_components_available, true)) { return ORTE_ERROR; } /* All done */ return ORTE_SUCCESS; }
/* * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int opal_paffinity_base_open(void) { opal_paffinity_base_components_opened_valid = false; mca_base_param_reg_string_name("opal", "paffinity_base_slot_list", "Used to set list of processor IDs to bind MPI processes to (e.g., used in conjunction with rank files)", true, false, NULL, &opal_paffinity_base_slot_list); /* Open up all available components */ if (OPAL_SUCCESS != mca_base_components_open("paffinity", opal_paffinity_base_output, mca_paffinity_base_static_components, &opal_paffinity_base_components_opened, true)) { return OPAL_ERROR; } opal_paffinity_base_components_opened_valid = true; /* All done */ return OPAL_SUCCESS; }
/** * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int ompi_osc_base_open(void) { int ret; /* setup the output stream */ ompi_osc_base_output = opal_output_open(NULL); /* initialize the base code */ OBJ_CONSTRUCT(&ompi_osc_base_open_components, opal_list_t); OBJ_CONSTRUCT(&ompi_osc_base_avail_components, opal_list_t); /* Open up all available components */ if (OMPI_SUCCESS != (ret = mca_base_components_open("osc", ompi_osc_base_output, mca_osc_base_static_components, &ompi_osc_base_open_components, true))) { return ret; } /* All done */ return OMPI_SUCCESS; }
/** * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int orte_ns_base_open(void) { int param, value, rc; orte_data_type_t tmp; opal_output_stream_t kill_prefix; /* Debugging / verbose output */ /** setup the structure to kill the blasted prefix that opal_output * now defaults to including so the output can be legible again! */ OBJ_CONSTRUCT(&kill_prefix, opal_output_stream_t); kill_prefix.lds_want_stderr = true; kill_prefix.lds_prefix = NULL; param = mca_base_param_reg_int_name("ns", "base_verbose", "Verbosity level for the ns framework", false, false, 0, &value); if (value != 0) { kill_prefix.lds_verbose_level = value; } mca_ns_base_output = opal_output_open(&kill_prefix); /* register the base system types with the DPS */ tmp = ORTE_NAME; if (ORTE_SUCCESS != (rc = orte_dss.register_type(orte_ns_base_pack_name, orte_ns_base_unpack_name, (orte_dss_copy_fn_t)orte_ns_base_copy_name, (orte_dss_compare_fn_t)orte_ns_base_compare_name, (orte_dss_size_fn_t)orte_ns_base_std_size, (orte_dss_print_fn_t)orte_ns_base_print_name, (orte_dss_release_fn_t)orte_ns_base_std_release, ORTE_DSS_UNSTRUCTURED, "ORTE_NAME", &tmp))) { ORTE_ERROR_LOG(rc); return rc; } tmp = ORTE_VPID; if (ORTE_SUCCESS != (rc = orte_dss.register_type(orte_ns_base_pack_vpid, orte_ns_base_unpack_vpid, (orte_dss_copy_fn_t)orte_ns_base_copy_vpid, (orte_dss_compare_fn_t)orte_ns_base_compare_vpid, (orte_dss_size_fn_t)orte_ns_base_std_size, (orte_dss_print_fn_t)orte_ns_base_std_print, (orte_dss_release_fn_t)orte_ns_base_std_release, ORTE_DSS_UNSTRUCTURED, "ORTE_VPID", &tmp))) { ORTE_ERROR_LOG(rc); return rc; } tmp = ORTE_JOBID; if (ORTE_SUCCESS != (rc = orte_dss.register_type(orte_ns_base_pack_jobid, orte_ns_base_unpack_jobid, (orte_dss_copy_fn_t)orte_ns_base_copy_jobid, (orte_dss_compare_fn_t)orte_ns_base_compare_jobid, (orte_dss_size_fn_t)orte_ns_base_std_size, (orte_dss_print_fn_t)orte_ns_base_std_print, (orte_dss_release_fn_t)orte_ns_base_std_release, ORTE_DSS_UNSTRUCTURED, "ORTE_JOBID", &tmp))) { ORTE_ERROR_LOG(rc); return rc; } tmp = ORTE_CELLID; if (ORTE_SUCCESS != (rc = orte_dss.register_type(orte_ns_base_pack_cellid, orte_ns_base_unpack_cellid, (orte_dss_copy_fn_t)orte_ns_base_copy_cellid, (orte_dss_compare_fn_t)orte_ns_base_compare_cellid, (orte_dss_size_fn_t)orte_ns_base_std_size, (orte_dss_print_fn_t)orte_ns_base_std_print, (orte_dss_release_fn_t)orte_ns_base_std_release, ORTE_DSS_UNSTRUCTURED, "ORTE_CELLID", &tmp))) { ORTE_ERROR_LOG(rc); return rc; } /* Open up all available components */ if (ORTE_SUCCESS != mca_base_components_open("ns", mca_ns_base_output, mca_ns_base_static_components, &mca_ns_base_components_available, true)) { return ORTE_ERROR; } /* All done */ return ORTE_SUCCESS; }
/** * Function for finding and opening either all MCA components, or the one * that was specifically requested via a MCA parameter. */ int orte_ras_base_open(void) { int value, rc, param; orte_data_type_t tmp; char *requested; /* Debugging / verbose output */ orte_ras_base.ras_output = opal_output_open(NULL); mca_base_param_reg_int_name("ras", "base_verbose", "Enable debugging for the RAS framework (nonzero = enabled)", false, false, 0, &value); if (value != 0) { orte_ras_base.ras_output = opal_output_open(NULL); } else { orte_ras_base.ras_output = -1; } /* Defaults */ orte_ras_base.ras_opened_valid = false; orte_ras_base.ras_using_proxy = false; orte_ras_base.ras_available_valid = false; /** register the base system types with the DSS */ tmp = ORTE_RAS_NODE; if (ORTE_SUCCESS != (rc = orte_dss.register_type(orte_ras_base_pack_node, orte_ras_base_unpack_node, (orte_dss_copy_fn_t)orte_ras_base_copy_node, (orte_dss_compare_fn_t)orte_ras_base_compare_node, (orte_dss_size_fn_t)orte_ras_base_size_node, (orte_dss_print_fn_t)orte_ras_base_print_node, (orte_dss_release_fn_t)orte_ras_base_std_obj_release, ORTE_DSS_STRUCTURED, "ORTE_RAS_NODE", &tmp))) { ORTE_ERROR_LOG(rc); return rc; } /* Some systems do not want any RAS support. In those cases, * memory consumption is also an issue. For those systems, we * avoid opening the RAS components by checking for a directive * to use the "null" component. */ param = mca_base_param_reg_string_name("ras", NULL, NULL, false, false, NULL, NULL); if (ORTE_ERROR == mca_base_param_lookup_string(param, &requested)) { return ORTE_ERROR; } if (NULL != requested && 0 == strcmp(requested, "null")) { /* the user has specifically requested that we use the "null" * component. In this case, that means we do NOT open any * components, and we simply use the default module we have * already defined above */ orte_ras_base.ras_opened_valid = false; orte_ras = orte_ras_no_op; /* use the no_op module */ return ORTE_SUCCESS; } /* check for timing tests */ param = mca_base_param_reg_int_name("orte", "timing", "Request that critical timing loops be measured", false, false, 0, &value); if (value != 0) { orte_ras_base.timing = true; } else { orte_ras_base.timing = false; } /* Open up all available components */ if (ORTE_SUCCESS != mca_base_components_open("ras", orte_ras_base.ras_output, mca_ras_base_static_components, &orte_ras_base.ras_opened, true)) { return ORTE_ERROR; } /* if we are not on a HNP, select the proxy 'module' */ if (!orte_process_info.seed) { orte_ras = orte_ras_base_proxy_module; /* initialize the module */ orte_ras_base_proxy_init(&rc); orte_ras_base.ras_using_proxy = true; return ORTE_SUCCESS; } /* All done */ orte_ras_base.ras_opened_valid = true; return ORTE_SUCCESS; }