1
1

Get rid off all useless variables and PTL members.

This commit was SVN r6471.
Этот коммит содержится в:
George Bosilca 2005-07-13 22:24:28 +00:00
родитель 3edb6ad903
Коммит e9a271c54a
3 изменённых файлов: 16 добавлений и 27 удалений

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

@ -80,8 +80,6 @@ int mca_ptl_self_add_proc(struct mca_ptl_base_module_t* ptl, size_t nprocs, stru
{
size_t i, count;
mca_ptl_self_component.self_local = ompi_proc_local();
for( i = 0, count = 0; i < nprocs; i++ ) {
if( ompi_proc[i] == mca_ptl_self_component.self_local ) {
ompi_bitmap_set_bit( reachable, i );

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

@ -36,9 +36,6 @@ extern "C" {
*/
struct mca_ptl_self_component_t {
mca_ptl_base_component_1_0_0_t super; /**< base PTL component */
struct mca_ptl_base_module_t** self_ptl_modules; /**< array of available PTL modules */
uint32_t self_num_ptl_modules; /**< number of ptl modules actually used */
uint32_t self_max_ptl_modules; /**< maximum number of ptl modules */
uint32_t self_buf_size; /**< the size of the internal buffer used to pack/unpack the data */
uint32_t self_is_non_blocking; /**< how the memcopy operations are done segmented or not */
int32_t self_free_list_num; /**< initial size of free lists */

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

@ -117,12 +117,6 @@ static inline int mca_ptl_self_param_register_int(
int mca_ptl_self_component_open(void)
{
/* initialize state */
mca_ptl_self_component.self_ptl_modules = NULL;
mca_ptl_self_component.self_num_ptl_modules = 0;
/* initialize objects */
/* register SELF component parameters */
mca_ptl_self_component.self_buf_size =
mca_ptl_self_param_register_int("buffer_size", 64*1024);
@ -133,6 +127,9 @@ int mca_ptl_self_component_open(void)
int mca_ptl_self_component_close(void)
{
if( NULL == mca_ptl_self_component.self_local )
return OMPI_SUCCESS;
if (mca_ptl_self_component.self_send_requests.fl_num_allocated !=
mca_ptl_self_component.self_send_requests.super.opal_list_length) {
opal_output(0, "self send requests: %d allocated %d returned\n",
@ -140,15 +137,8 @@ int mca_ptl_self_component_close(void)
mca_ptl_self_component.self_send_requests.super.opal_list_length);
}
#if 0
/* JMS debug */
if (NULL != mca_ptl_self_component.self_ptl_modules) {
free(mca_ptl_self_component.self_ptl_modules);
mca_ptl_self_component.self_ptl_modules = NULL;
OBJ_DESTRUCT( &(mca_ptl_self_component.self_send_requests) );
}
mca_ptl_self_component.self_num_ptl_modules = 0;
#endif
OBJ_DESTRUCT( &(mca_ptl_self_component.self_send_requests) );
return OMPI_SUCCESS;
}
@ -158,17 +148,21 @@ mca_ptl_base_module_t** mca_ptl_self_component_init(int *num_ptl_modules,
bool enable_mpi_threads)
{
*num_ptl_modules = 0;
mca_ptl_base_module_t** modules = NULL;
mca_ptl_self_component.self_ptl_modules = (mca_ptl_base_module_t **)
malloc(sizeof(mca_ptl_base_module_t*));
if( NULL == mca_ptl_self_component.self_ptl_modules )
modules = (mca_ptl_base_module_t **)malloc(sizeof(mca_ptl_base_module_t*));
if( NULL == modules )
return NULL;
mca_ptl_self_component.self_ptl_modules[0] = &mca_ptl_self_module;
mca_ptl_self_component.self_num_ptl_modules = 1;
mca_ptl_self_component.self_max_ptl_modules = 1;
modules[0] = &mca_ptl_self_module;
mca_ptl_self_component.self_free_list_num = 4;
mca_ptl_self_component.self_free_list_max = -1;
mca_ptl_self_component.self_free_list_inc = 4;
/* Initialize the local pointer to the processor */
mca_ptl_self_component.self_local = ompi_proc_local();
*num_ptl_modules = 1;
OBJ_CONSTRUCT(&mca_ptl_self_component.self_send_requests, ompi_free_list_t);
@ -180,5 +174,5 @@ mca_ptl_base_module_t** mca_ptl_self_component_init(int *num_ptl_modules,
mca_ptl_self_component.self_free_list_inc,
NULL); /* use default allocator */
return mca_ptl_self_component.self_ptl_modules;
return modules;
}