コード例 #1
0
int
opal_finalize(void)
{
    if( --opal_initialized != 0 ) {
        if( opal_initialized < 0 ) {
            return OPAL_ERROR;
        }
        return OPAL_SUCCESS;
    }

    opal_progress_finalize();

    opal_event_base_close();

    /* close high resolution timers */
    (void) mca_base_framework_close(&opal_timer_base_framework);

    (void) mca_base_framework_close(&opal_backtrace_base_framework);

    /* close hwloc */
    opal_hwloc_base_close();

    /* cleanup the main thread specific stuff */
    opal_tsd_keys_destruct();

    /* finalize util code */
    opal_finalize_util();

    return OPAL_SUCCESS;
}
コード例 #2
0
int
opal_finalize_util(void)
{
    if( --opal_util_initialized != 0 ) {
        if( opal_util_initialized < 0 ) {
            return OPAL_ERROR;
        }
        return OPAL_SUCCESS;
    }

    /* close interfaces code. */
    (void) mca_base_framework_close(&opal_if_base_framework);

    opal_event_base_close();

    /* Clear out all the registered MCA params */
    opal_deregister_params();
    mca_base_var_finalize();

    opal_net_finalize();

    /* keyval lex-based parser */
    opal_util_keyval_parse_finalize();

    (void) mca_base_framework_close(&opal_installdirs_base_framework);

    mca_base_close();

    /* finalize the memory allocator */
    opal_malloc_finalize();

    /* finalize the show_help system */
    opal_show_help_finalize();

    /* finalize the output system.  This has to come *after* the
       malloc code, as the malloc code needs to call into this, but
       the malloc code turning off doesn't affect opal_output that
       much */
    opal_output_finalize();

    /* close the dss */
    opal_dss_close();

    /* finalize the class/object system */
    opal_class_finalize();

    free (opal_process_info.nodename);
    opal_process_info.nodename = NULL;

    return OPAL_SUCCESS;
}
コード例 #3
0
void orte_info_close_components()
{
    int i;
    orte_info_component_map_t *map;
    
    if (opened_components) {
        
        /* Note that the order of shutdown here doesn't matter because
         * we aren't *using* any components -- none were selected, so
         * there are no dependencies between the frameworks.  We list
         * them generally "in order", but it doesn't really matter.
         
         * We also explicitly ignore the return values from the
         * close() functions -- what would we do if there was an
         * error?
         */
        
        (void) orte_grpcomm_base_close();
        (void) orte_db_base_close();
        (void) orte_ess_base_close();
        (void) orte_show_help_finalize();
#if !ORTE_DISABLE_FULL_SUPPORT
#if OPAL_ENABLE_FT_CR == 1
        (void) orte_snapc_base_close();
#endif
        (void) orte_filem_base_close();
        (void) orte_iof_base_close();
        (void) orte_plm_base_close();
        (void) orte_odls_base_close();
        (void) orte_rmaps_base_close();
        (void) orte_ras_base_close();
        (void) orte_rml_base_close();
        (void) orte_routed_base_close();
        (void) mca_oob_base_close();
#endif
        (void) orte_errmgr_base_close();
        (void) orte_state_base_close();

        (void) opal_backtrace_base_close();
        (void) opal_memory_base_close();
        (void) opal_memchecker_base_close();
        (void) opal_timer_base_close();
#if OPAL_HAVE_HWLOC
        (void) opal_hwloc_base_close();
#endif
#if OPAL_ENABLE_FT_CR == 1
        (void) opal_crs_base_close();
#endif
        (void) opal_event_base_close();
        
        /* Do not call OPAL's installdirs close; it will be handled in
         * opal_finalize_util().
         */
        for (i=0; i < component_map.size; i++) {
            if (NULL != (map = (orte_info_component_map_t*)opal_pointer_array_get_item(&component_map, i))) {
                OBJ_RELEASE(map);
            }
        }
        OBJ_DESTRUCT(&component_map);

        /* close the OPAL components */
        (void) opal_info_close_components();
    }
    
    opened_components = false;
}