Example #1
0
void opal_finalize_test(void)
{
    /* Clear out all the registered MCA params */
    mca_base_var_finalize();

    (void) mca_base_framework_close(&opal_installdirs_base_framework);

    /* finalize the mca */
    mca_base_close();

    /* 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();
}
Example #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);

    (void) mca_base_framework_close(&opal_event_base_framework);

    /* 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();

    opal_datatype_finalize();

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

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

    return OPAL_SUCCESS;
}
int
opal_finalize_util(void)
{
    if( --opal_util_initialized != 0 ) {
        if( opal_util_initialized < 0 ) {
            return OPAL_ERROR;
        }
        return OPAL_SUCCESS;
    }

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

    /* close interfaces code.  This is lazy opened, but protected from
       close when not opened internally */
    opal_iffinalize();

    opal_net_finalize();

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

    opal_installdirs_base_close();

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

    /* finalize the trace system */
    opal_trace_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();

    return OPAL_SUCCESS;
}