コード例 #1
0
ファイル: uiu.c プロジェクト: NexMirror/MPICH
void HYD_uiu_free_params(void)
{
    struct stdoe_fd *tmp, *run;

    HYDU_finalize_user_global(&HYD_server_info.user_global);

    if (HYD_server_info.base_path)
        MPL_free(HYD_server_info.base_path);

    if (HYD_server_info.port_range)
        MPL_free(HYD_server_info.port_range);

    if (HYD_server_info.iface_ip_env_name)
        MPL_free(HYD_server_info.iface_ip_env_name);

    if (HYD_server_info.nameserver)
        MPL_free(HYD_server_info.nameserver);

    if (HYD_server_info.localhost)
        MPL_free(HYD_server_info.localhost);

    if (HYD_server_info.node_list)
        HYDU_free_node_list(HYD_server_info.node_list);

    if (HYD_server_info.pg_list.proxy_list)
        HYDU_free_proxy_list(HYD_server_info.pg_list.proxy_list);

    if (HYD_server_info.pg_list.next)
        HYDU_free_pg_list(HYD_server_info.pg_list.next);

    if (HYD_ui_info.prepend_pattern)
        MPL_free(HYD_ui_info.prepend_pattern);

    if (HYD_ui_info.outfile_pattern)
        MPL_free(HYD_ui_info.outfile_pattern);

    if (HYD_ui_info.errfile_pattern)
        MPL_free(HYD_ui_info.errfile_pattern);

    for (run = stdoe_fd_list; run;) {
        close(run->fd);
        tmp = run->next;
        MPL_free(run);
        run = tmp;
    }

    /* Re-initialize everything to default values */
    HYD_uiu_init_params();
}
コード例 #2
0
ファイル: pmip.c プロジェクト: adk9/hydra
static void cleanup_params(void)
{
    int i;

    HYDU_finalize_user_global(&HYD_pmcd_pmip.user_global);

    /* System global */
    if (HYD_pmcd_pmip.system_global.pmi_fd)
        HYDU_FREE(HYD_pmcd_pmip.system_global.pmi_fd);

    if (HYD_pmcd_pmip.system_global.pmi_process_mapping)
        HYDU_FREE(HYD_pmcd_pmip.system_global.pmi_process_mapping);


    /* Upstream */
    if (HYD_pmcd_pmip.upstream.server_name)
        HYDU_FREE(HYD_pmcd_pmip.upstream.server_name);


    /* Downstream */
    if (HYD_pmcd_pmip.downstream.out)
        HYDU_FREE(HYD_pmcd_pmip.downstream.out);

    if (HYD_pmcd_pmip.downstream.err)
        HYDU_FREE(HYD_pmcd_pmip.downstream.err);

    if (HYD_pmcd_pmip.downstream.pid)
        HYDU_FREE(HYD_pmcd_pmip.downstream.pid);

    if (HYD_pmcd_pmip.downstream.exit_status)
        HYDU_FREE(HYD_pmcd_pmip.downstream.exit_status);

    if (HYD_pmcd_pmip.downstream.pmi_rank)
        HYDU_FREE(HYD_pmcd_pmip.downstream.pmi_rank);

    if (HYD_pmcd_pmip.downstream.pmi_fd)
        HYDU_FREE(HYD_pmcd_pmip.downstream.pmi_fd);

    if (HYD_pmcd_pmip.downstream.pmi_fd_active)
        HYDU_FREE(HYD_pmcd_pmip.downstream.pmi_fd_active);


    /* Local */
    if (HYD_pmcd_pmip.local.iface_ip_env_name)
        HYDU_FREE(HYD_pmcd_pmip.local.iface_ip_env_name);

    if (HYD_pmcd_pmip.local.hostname)
        HYDU_FREE(HYD_pmcd_pmip.local.hostname);

    if (HYD_pmcd_pmip.local.spawner_kvs_name)
        HYDU_FREE(HYD_pmcd_pmip.local.spawner_kvs_name);

    if (HYD_pmcd_pmip.local.ckpoint_prefix_list) {
        for (i = 0; HYD_pmcd_pmip.local.ckpoint_prefix_list[i]; i++)
            HYDU_FREE(HYD_pmcd_pmip.local.ckpoint_prefix_list[i]);
        HYDU_FREE(HYD_pmcd_pmip.local.ckpoint_prefix_list);
    }

    HYD_pmcd_free_pmi_kvs_list(HYD_pmcd_pmip.local.kvs);


    /* Exec list */
    HYDU_free_exec_list(HYD_pmcd_pmip.exec_list);

    HYDT_topo_finalize();
}