1
1
This commit was SVN r2013.
Этот коммит содержится в:
Tim Woodall 2004-08-10 21:02:36 +00:00
родитель 1005359360
Коммит debf4842eb
6 изменённых файлов: 39 добавлений и 42 удалений

Просмотреть файл

@ -16,26 +16,19 @@
int mca_oob_base_close(void)
{
ompi_list_item_t* item;
/* Finalize all the ptl components and free their list items */
for (item = ompi_list_remove_first(&mca_oob_base_components);
NULL != item;
item = ompi_list_remove_first(&mca_oob_base_components)) {
mca_base_component_list_item_t* component = (mca_base_component_list_item_t *) item;
/* Blatently ignore the return code (what would we do to recover,
anyway? This component is going away, so errors don't matter
anymore) */
((mca_oob_base_component_t*)component->cli_component)->oob_finalize();
free(component);
/* Finalize all the oob modules and free their list items */
for (item = ompi_list_remove_first(&mca_oob_base_modules);
item != NULL;
item = ompi_list_remove_first(&mca_oob_base_modules)) {
mca_oob_base_info_t* base = (mca_oob_base_info_t *) item;
base->oob_module->oob_finalize(base->oob_module);
}
/* Close all remaining available modules (may be one if this is a
OMPI RTE program, or [possibly] multiple if this is ompi_info) */
mca_base_components_close(mca_oob_base_output, &mca_oob_base_components,
NULL);
mca_base_components_close(mca_oob_base_output, &mca_oob_base_components, NULL);
OBJ_DESTRUCT(&mca_oob_base_modules);
OBJ_DESTRUCT(&mca_oob_base_components);

Просмотреть файл

@ -22,7 +22,7 @@ int mca_oob_cofs_close(void);
* Startup / Shutdown
*/
mca_oob_t* mca_oob_cofs_init(bool *allow_multi_user_threads, bool *have_hidden_threads);
int mca_oob_cofs_finalize(void);
int mca_oob_cofs_finalize(mca_oob_t*);

Просмотреть файл

@ -37,15 +37,15 @@ mca_oob_base_component_1_0_0_t mca_oob_cofs_component = {
{
false /* checkpoint / restart */
},
mca_oob_cofs_init, /* module init */
mca_oob_cofs_finalize
mca_oob_cofs_init /* module init */
};
mca_oob_t mca_oob_cofs = {
mca_oob_cofs_send,
mca_oob_cofs_recv,
mca_oob_cofs_send_nb,
mca_oob_cofs_recv_nb
mca_oob_cofs_recv_nb,
mca_oob_cofs_finalize
};
char mca_oob_cofs_comm_loc[OMPI_PATH_MAX];
@ -90,7 +90,7 @@ mca_oob_t* mca_oob_cofs_init(bool *allow_multi_user_threads, bool *have_hidden_t
}
int mca_oob_cofs_finalize(void)
int mca_oob_cofs_finalize(mca_oob_t* oob)
{
return OMPI_SUCCESS;
}

Просмотреть файл

@ -14,6 +14,19 @@
#include "include/types.h"
#include "mca/mca.h"
#include "mca/oob/base/base.h"
struct mca_oob_1_0_0_t;
/**
* Convenience Typedef
*/
typedef struct mca_oob_1_0_0_t mca_oob_1_0_0_t;
/**
* Convenience typedef
*/
typedef struct mca_oob_1_0_0_t mca_oob_t;
/********
* NOTE: these are functions and prototypes for the use of the modules
* and components.
@ -108,6 +121,11 @@ typedef int (*mca_oob_base_module_recv_nb_fn_t)(
mca_oob_callback_fn_t cbfunc,
void* cbdata);
/**
* OOB finalize function
*/
typedef int (*mca_oob_base_module_finalize_fn_t)(mca_oob_t*);
/**
* OOB Module
*/
@ -116,16 +134,8 @@ struct mca_oob_1_0_0_t {
mca_oob_base_module_recv_fn_t oob_recv;
mca_oob_base_module_send_nb_fn_t oob_send_nb;
mca_oob_base_module_recv_nb_fn_t oob_recv_nb;
mca_oob_base_module_finalize_fn_t oob_finalize;
};
/**
* Convenience Typedef
*/
typedef struct mca_oob_1_0_0_t mca_oob_1_0_0_t;
/**
* Convenience typedef
*/
typedef struct mca_oob_1_0_0_t mca_oob_t;
/**
* OOB Component
*/
@ -133,21 +143,15 @@ typedef mca_oob_t* (*mca_oob_base_component_init_fn_t)(
bool *allow_multi_user_threads,
bool *have_hidden_threads);
/**
* OOB finalize function
*/
typedef int (*mca_oob_base_component_finalize_fn_t)(void);
/**
* the standard component data structure
*/
struct mca_oob_base_component_1_0_0_t {
mca_base_component_t oob_version;
mca_base_component_data_1_0_0_t oob_data;
mca_oob_base_component_init_fn_t oob_init;
mca_oob_base_component_finalize_fn_t oob_finalize;
};
/**
* Convenience Typedef
*/

Просмотреть файл

@ -33,8 +33,7 @@ mca_oob_tcp_component_t mca_oob_tcp_component = {
{
false /* checkpoint / restart */
},
mca_oob_tcp_init, /* module init */
mca_oob_tcp_finalize
mca_oob_tcp_init /* module init */
}
};
@ -42,7 +41,8 @@ static mca_oob_t mca_oob_tcp = {
mca_oob_tcp_send,
mca_oob_tcp_recv,
mca_oob_tcp_send_nb,
mca_oob_tcp_recv_nb
mca_oob_tcp_recv_nb,
mca_oob_tcp_finalize
};
@ -279,7 +279,7 @@ mca_oob_t* mca_oob_tcp_init(bool *allow_multi_user_threads, bool *have_hidden_th
8, /* increment to grow by */
NULL); /* use default allocator */
#if 0
#if 1
/* intialize event library */
memset(&mca_oob_tcp_component.tcp_recv_event, 0, sizeof(ompi_event_t));
memset(&mca_oob_tcp_component.tcp_send_event, 0, sizeof(ompi_event_t));
@ -303,7 +303,7 @@ mca_oob_t* mca_oob_tcp_init(bool *allow_multi_user_threads, bool *have_hidden_th
/*
* Module cleanup.
*/
int mca_oob_tcp_finalize(void)
int mca_oob_tcp_finalize(mca_oob_t* oob)
{
int optval;
mca_oob_tcp_peer_t * peer;

Просмотреть файл

@ -31,7 +31,7 @@ extern "C" {
int mca_oob_tcp_open(void);
int mca_oob_tcp_close(void);
mca_oob_t* mca_oob_tcp_init(bool *allow_multi_user_threads, bool *have_hidden_threads);
int mca_oob_tcp_finalize(void);
int mca_oob_tcp_finalize(mca_oob_t*);
/**
* Convert process name from network to host byte order.