/** * 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 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; }
static int crs_blcr_open(void) { /* If there is a custom verbose level for this component than use it * otherwise take our parents level and output channel */ if ( 0 != mca_crs_blcr_component.super.verbose) { mca_crs_blcr_component.super.output_handle = opal_output_open(NULL); opal_output_set_verbosity(mca_crs_blcr_component.super.output_handle, mca_crs_blcr_component.super.verbose); } else { mca_crs_blcr_component.super.output_handle = opal_crs_base_framework.framework_output; } /* * Debug output */ opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, "crs:blcr: open()"); opal_output_verbose(20, mca_crs_blcr_component.super.output_handle, "crs:blcr: open: priority = %d", mca_crs_blcr_component.super.priority); opal_output_verbose(20, mca_crs_blcr_component.super.output_handle, "crs:blcr: open: verbosity = %d", mca_crs_blcr_component.super.verbose); opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, "crs:blcr: open: dev_null = %s", (opal_crs_blcr_dev_null == true ? "True" : "False")); return OPAL_SUCCESS; }
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; }
/* * CR Init */ int ompi_cr_init(void) { int val; /* * Register some MCA parameters */ mca_base_param_reg_int_name("ompi_cr", "verbose", "Verbose output for the OMPI Checkpoint/Restart functionality", false, false, 0, &val); if(0 != val) { ompi_cr_output = opal_output_open(NULL); opal_output_set_verbosity(ompi_cr_output, val); } else { ompi_cr_output = opal_cr_output; } /* Typically this is not needed. Individual BTLs will set this as needed */ ompi_cr_continue_like_restart = false; opal_output_verbose(10, ompi_cr_output, "ompi_cr: init: ompi_cr_init()"); /* Register the OMPI interlevel coordination callback */ opal_cr_reg_coord_callback(ompi_cr_coord, &prev_coord_callback); return OMPI_SUCCESS; }
/** * This function gets called once to check if the program is running in a cuda * environment. */ static void opal_cuda_support_init(void) { int id; CUresult res; CUcontext cuContext; if (initialized) { return; } /* Set different levels of verbosity in the cuda related code. */ id = mca_base_param_reg_int_name("opal", "cuda_verbose", "Set level of opal cuda verbosity", false, false, 0, &opal_cuda_verbose); opal_cuda_output = opal_output_open(NULL); opal_output_set_verbosity(opal_cuda_output, opal_cuda_verbose); /* Check to see if this process is running in a CUDA context. If so, * all is good. Currently, just print out a message in verbose mode * to help with debugging. */ res = cuCtxGetCurrent(&cuContext); if (CUDA_SUCCESS != res) { opal_output_verbose(10, opal_cuda_output, "CUDA: cuCtxGetCurrent failed, CUDA device pointers will not work"); } else { opal_output_verbose(10, opal_cuda_output, "CUDA: cuCtxGetCurrent succeeded, CUDA device pointers will work"); } initialized = true; }
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; }
/** * component open/close/init function */ static int rgpusm_open(void) { mca_mpool_rgpusm_component.output = opal_output_open(NULL); opal_output_set_verbosity(mca_mpool_rgpusm_component.output, ompi_mpool_rgpusm_verbose); return OMPI_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; }
/* * 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; }
static int orcm_osub_init(int argc, char *argv[]) { int ret; /* * Make sure to init util before parse_args * to ensure installdirs is setup properly * before calling mca_base_open(); */ if( ORTE_SUCCESS != (ret = opal_init_util(&argc, &argv)) ) { return ret; } /* * Parse Command Line Arguments */ if (ORTE_SUCCESS != (ret = parse_args(argc, argv))) { return ret; } /* * Setup OPAL Output handle from the verbose argument */ if( orcm_osub_globals.verbose ) { orcm_osub_globals.output = opal_output_open(NULL); opal_output_set_verbosity(orcm_osub_globals.output, 10); } else { orcm_osub_globals.output = 0; /* Default=STDERR */ } ret = orcm_init(ORCM_TOOL); return ret; }
int mca_pml_crcpw_component_open(void) { opal_output_verbose( 10, mca_pml_crcpw_component.output_handle, "pml:crcpw: component_open: Open"); mca_pml_crcpw_component.output_handle = opal_output_open(NULL); if ( 0 != mca_pml_crcpw_component.verbose) { opal_output_set_verbosity(mca_pml_crcpw_component.output_handle, mca_pml_crcpw_component.verbose); } /* * Debug Output */ opal_output_verbose(10, mca_pml_crcpw_component.output_handle, "pml:crcpw: open()"); opal_output_verbose(20, mca_pml_crcpw_component.output_handle, "pml:crcpw: open: priority = %d", mca_pml_crcpw_component.priority); opal_output_verbose(20, mca_pml_crcpw_component.output_handle, "pml:crcpw: open: verbosity = %d", mca_pml_crcpw_component.verbose); return OMPI_SUCCESS; }
void shmem_init(void) { int err = OSHMEM_SUCCESS; int provided; int required = SHMEM_THREAD_SINGLE; if (oshmem_shmem_initialized) { /* * SPEC: If start_pes() is called multiple times, subsequent calls have no effect. */ return; } shmem_api_logger_output = opal_output_open(NULL); opal_output_set_verbosity(shmem_api_logger_output, oshmem_shmem_api_verbose); err = oshmem_shmem_init(0, NULL, required, &provided); if (OSHMEM_SUCCESS != err) { /* since spec does not propagete error to user we can only abort */ SHMEM_API_ERROR("SHMEM failed to initialize - aborting"); oshmem_shmem_abort(-1); } OPAL_CR_INIT_LIBRARY(); }
static int compress_gzip_open(void) { /* If there is a custom verbose level for this component than use it * otherwise take our parents level and output channel */ if ( 0 != mca_compress_gzip_component.super.verbose) { mca_compress_gzip_component.super.output_handle = opal_output_open(NULL); opal_output_set_verbosity(mca_compress_gzip_component.super.output_handle, mca_compress_gzip_component.super.verbose); } else { mca_compress_gzip_component.super.output_handle = opal_compress_base_framework.framework_output; } /* * Debug output */ opal_output_verbose(10, mca_compress_gzip_component.super.output_handle, "compress:gzip: open()"); opal_output_verbose(20, mca_compress_gzip_component.super.output_handle, "compress:gzip: open: priority = %d", mca_compress_gzip_component.super.priority); opal_output_verbose(20, mca_compress_gzip_component.super.output_handle, "compress:gzip: open: verbosity = %d", mca_compress_gzip_component.super.verbose); return OPAL_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; }
int pml_v_output_open(char *output, int verbosity) { opal_output_stream_t lds; char hostname[32] = "NA"; OBJ_CONSTRUCT(&lds, opal_output_stream_t); if(!output) { mca_pml_v.output = 0; } else { if(!strcmp(output, "stdout")) { lds.lds_want_stdout = true; } else if(!strcmp(output, "stderr")) { lds.lds_want_stderr = true; } else { lds.lds_want_file = true; lds.lds_file_suffix = output; } lds.lds_is_debugging = true; gethostname(hostname, 32); asprintf(&lds.lds_prefix, "[%s:%05d] pml_v: ", hostname, getpid()); lds.lds_verbose_level = verbosity; mca_pml_v.output = opal_output_open(&lds); free(lds.lds_prefix); } return mca_pml_v.output; }
/* * Reopen all the streams; used during checkpoint/restart. */ void opal_output_reopen_all(void) { char *str; char hostname[OPAL_MAXHOSTNAMELEN]; str = getenv("OPAL_OUTPUT_STDERR_FD"); if (NULL != str) { default_stderr_fd = atoi(str); } else { default_stderr_fd = -1; } gethostname(hostname, sizeof(hostname)); if( NULL != verbose.lds_prefix ) { free(verbose.lds_prefix); verbose.lds_prefix = NULL; } asprintf(&verbose.lds_prefix, "[%s:%05d] ", hostname, getpid()); #if 0 int i; opal_output_stream_t lds; for (i = 0; i < OPAL_OUTPUT_MAX_STREAMS; ++i) { /* scan till we find ldi_used == 0, which is the end-marker */ if (!info[i].ldi_used) { break; } /* * set this to zero to ensure that opal_output_open will * return this same index as the output stream id */ info[i].ldi_used = false; #if USE_SYSLOG lds.lds_want_syslog = info[i].ldi_syslog; lds.lds_syslog_priority = info[i].ldi_syslog_priority; lds.lds_syslog_ident = info[i].ldi_syslog_ident; #else lds.lds_want_syslog = false; #endif lds.lds_prefix = info[i].ldi_prefix; lds.lds_suffix = info[i].ldi_suffix; lds.lds_want_stdout = info[i].ldi_stdout; lds.lds_want_stderr = info[i].ldi_stderr; lds.lds_want_file = (-1 == info[i].ldi_fd) ? false : true; /* open all streams in append mode */ lds.lds_want_file_append = true; lds.lds_file_suffix = info[i].ldi_file_suffix; /* * call opal_output_open to open the stream. The return value * is guaranteed to be i. So we can ignore it. */ opal_output_open(&lds); } #endif }
/* init the progress engine - called from orte_init */ int opal_progress_init(void) { /* reentrant issues */ opal_atomic_init(&progress_lock, OPAL_ATOMIC_UNLOCKED); /* set the event tick rate */ opal_progress_set_event_poll_rate(10000); #if OPAL_ENABLE_DEBUG if (opal_progress_debug) { 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", opal_progress_yield_when_idle ? "true" : "false")); 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; }
static int hcoll_open(void) { mca_coll_hcoll_component_t *cm; cm = &mca_coll_hcoll_component; mca_coll_hcoll_output = opal_output_open(NULL); opal_output_set_verbosity(mca_coll_hcoll_output, cm->hcoll_verbose); hcoll_rte_fns_setup(); cm->libhcoll_initialized = false; /* Register memory hooks */ if ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) == ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) & opal_mem_hooks_support_level())) { setenv("MXM_HCOLL_MEM_ON_DEMAND_MAP", "y", 0); HCOL_VERBOSE(1, "Enabling on-demand memory mapping"); cm->using_mem_hooks = 1; } else { HCOL_VERBOSE(1, "Disabling on-demand memory mapping"); cm->using_mem_hooks = 0; } return OMPI_SUCCESS; }
static int mca_pml_ob1_component_open(void) { mca_pml_ob1_output = opal_output_open(NULL); opal_output_set_verbosity(mca_pml_ob1_output, mca_pml_ob1_verbose); mca_pml_ob1.enabled = false; return mca_base_framework_open(&ompi_bml_base_framework, 0); }
static int snapc_full_open(void) { int value; /* * This should be the last componet to ever get used since * it doesn't do anything. */ mca_base_param_reg_int(&mca_snapc_full_component.super.base_version, "priority", "Priority of the SNAPC full component", false, false, mca_snapc_full_component.super.priority, &mca_snapc_full_component.super.priority); mca_base_param_reg_int(&mca_snapc_full_component.super.base_version, "verbose", "Verbose level for the SNAPC full component", false, false, mca_snapc_full_component.super.verbose, &mca_snapc_full_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_snapc_full_component.super.verbose) { mca_snapc_full_component.super.output_handle = opal_output_open(NULL); opal_output_set_verbosity(mca_snapc_full_component.super.output_handle, mca_snapc_full_component.super.verbose); } else { mca_snapc_full_component.super.output_handle = orte_snapc_base_output; } mca_base_param_reg_int(&mca_snapc_full_component.super.base_version, "skip_filem", "Not for general use! For debugging only! Pretend to move files. [Default = disabled]", false, false, 0, &value); orte_snapc_full_skip_filem = OPAL_INT_TO_BOOL(value); /* * Debug Output */ opal_output_verbose(10, mca_snapc_full_component.super.output_handle, "snapc:full: open()"); opal_output_verbose(20, mca_snapc_full_component.super.output_handle, "snapc:full: open: priority = %d", mca_snapc_full_component.super.priority); opal_output_verbose(20, mca_snapc_full_component.super.output_handle, "snapc:full: open: verbosity = %d", mca_snapc_full_component.super.verbose); opal_output_verbose(20, mca_snapc_full_component.super.output_handle, "snapc:full: open: skip_filem = %s", (orte_snapc_full_skip_filem == true ? "True" : "False")); 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_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; }
/** * component open/close/init function */ static int mca_mpool_sm_open(void) { if (ompi_mpool_sm_verbose != 0) { mca_mpool_sm_component.verbose = opal_output_open(NULL); } else { mca_mpool_sm_component.verbose = -1; } return OMPI_SUCCESS; }
/* * Initialize the malloc debug interface */ void opal_malloc_init(void) { OBJ_CONSTRUCT(&malloc_stream, opal_output_stream_t); malloc_stream.lds_is_debugging = true; malloc_stream.lds_verbose_level = 5; malloc_stream.lds_prefix = "malloc debug: "; malloc_stream.lds_want_stderr = true; opal_malloc_output = opal_output_open(&malloc_stream); opal_finalize_register_cleanup (opal_malloc_finalize); }
/** * component open/close/init function */ static int orte_ras_gridengine_open(void) { if (orte_ras_gridengine_verbose != 0) { mca_ras_gridengine_component.verbose = opal_output_open(NULL); } else { mca_ras_gridengine_component.verbose = -1; } return ORTE_SUCCESS; }
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(); }
/* * Initialize the malloc debug interface */ void opal_malloc_init(void) { #if OMPI_ENABLE_DEBUG OBJ_CONSTRUCT(&malloc_stream, opal_output_stream_t); malloc_stream.lds_is_debugging = true; malloc_stream.lds_verbose_level = 5; malloc_stream.lds_prefix = "malloc debug: "; malloc_stream.lds_want_stderr = true; opal_malloc_output = opal_output_open(&malloc_stream); #endif /* OMPI_ENABLE_DEBUG */ }
/* * CR Init */ int orte_cr_init(void) { int ret, exit_status = ORTE_SUCCESS; int val; /* * OPAL Frameworks */ if (OPAL_SUCCESS != (ret = opal_cr_init() ) ) { exit_status = ret; goto cleanup; } /* * Register MCA Parameters */ mca_base_param_reg_int_name("orte_cr", "verbose", "Verbose output for the ORTE Checkpoint/Restart functionality", false, false, 0, &val); /*** RHC: This is going to crash-and-burn when the output conversion is * completed as opal_output will have no idea what opal_cr_output stream means, * or even worse, will have assigned it to someone else! */ if(0 != val) { orte_cr_output = opal_output_open(NULL); opal_output_set_verbosity(orte_cr_output, val); } else { orte_cr_output = opal_cr_output; } opal_output_verbose(10, orte_cr_output, "orte_cr: init: orte_cr_init()\n"); /* Init ORTE Entry Point Function */ if( ORTE_SUCCESS != (ret = orte_cr_entry_point_init()) ) { exit_status = ret; goto cleanup; } /* Register the ORTE interlevel coordination callback */ opal_cr_reg_coord_callback(orte_cr_coord, &prev_coord_callback); /* Typically this is not needed. Individual BTLs will set this as needed */ orte_cr_continue_like_restart = false; orte_cr_flush_restart_files = true; cleanup: return exit_status; }
static int crs_blcr_open(void) { int value; mca_base_param_reg_int(&mca_crs_blcr_component.super.base_version, "priority", "Priority of the CRS blcr component", false, false, mca_crs_blcr_component.super.priority, &mca_crs_blcr_component.super.priority); mca_base_param_reg_int(&mca_crs_blcr_component.super.base_version, "verbose", "Verbose level for the CRS blcr component", false, false, mca_crs_blcr_component.super.verbose, &mca_crs_blcr_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_crs_blcr_component.super.verbose) { mca_crs_blcr_component.super.output_handle = opal_output_open(NULL); opal_output_set_verbosity(mca_crs_blcr_component.super.output_handle, mca_crs_blcr_component.super.verbose); } else { mca_crs_blcr_component.super.output_handle = opal_crs_base_output; } mca_base_param_reg_int(&mca_crs_blcr_component.super.base_version, "dev_null", "Not for general use! For debugging only! Save checkpoint to /dev/null. [Default = disabled]", false, false, 0, &value); opal_crs_blcr_dev_null = OPAL_INT_TO_BOOL(value); /* * Debug output */ opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, "crs:blcr: open()"); opal_output_verbose(20, mca_crs_blcr_component.super.output_handle, "crs:blcr: open: priority = %d", mca_crs_blcr_component.super.priority); opal_output_verbose(20, mca_crs_blcr_component.super.output_handle, "crs:blcr: open: verbosity = %d", mca_crs_blcr_component.super.verbose); opal_output_verbose(10, mca_crs_blcr_component.super.output_handle, "crs:blcr: open: dev_null = %s", (opal_crs_blcr_dev_null == true ? "True" : "False")); return OPAL_SUCCESS; }
static void framework_open_output (struct mca_base_framework_t *framework) { if (0 < framework->framework_verbose) { if (-1 == framework->framework_output) { framework->framework_output = opal_output_open (NULL); } opal_output_set_verbosity(framework->framework_output, framework->framework_verbose); } else if (-1 != framework->framework_output) { opal_output_close (framework->framework_output); framework->framework_output = -1; } }