Cleaning up. Removing all unused variables and fields in the MX BTL and
component structures. This commit was SVN r14957.
Этот коммит содержится в:
родитель
5d6c958066
Коммит
c66cf32ee2
@ -94,13 +94,14 @@ struct mca_btl_mx_component_t {
|
||||
ompi_free_list_t mx_send_eager_frags; /**< free list of mx eager send fragments */
|
||||
ompi_free_list_t mx_send_user_frags; /**< free list of mx user send fragments */
|
||||
|
||||
ompi_free_list_t mx_recv_frags; /**< free list of mx recv fragments */
|
||||
|
||||
opal_list_t mx_pending_acks; /**< queue of pending sends */
|
||||
|
||||
opal_mutex_t mx_lock; /**< lock for accessing module state */
|
||||
|
||||
char* mx_mpool_name; /**< name of memory pool */
|
||||
char* mx_if_include; /**< include the following NICs */
|
||||
char* mx_if_exclude; /**< Exclude the following NICs. These
|
||||
* values are based on the last 6
|
||||
* digits in hexadecimal of the MAC
|
||||
* address of the mapper.
|
||||
*/
|
||||
};
|
||||
typedef struct mca_btl_mx_component_t mca_btl_mx_component_t;
|
||||
|
||||
|
@ -164,9 +164,7 @@ int mca_btl_mx_component_close(void)
|
||||
/* release resources */
|
||||
OBJ_DESTRUCT(&mca_btl_mx_component.mx_send_eager_frags);
|
||||
OBJ_DESTRUCT(&mca_btl_mx_component.mx_send_user_frags);
|
||||
OBJ_DESTRUCT(&mca_btl_mx_component.mx_recv_frags);
|
||||
OBJ_DESTRUCT(&mca_btl_mx_component.mx_procs);
|
||||
OBJ_DESTRUCT(&mca_btl_mx_component.mx_pending_acks);
|
||||
OBJ_DESTRUCT(&mca_btl_mx_component.mx_lock);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -267,10 +265,28 @@ static mca_btl_mx_module_t* mca_btl_mx_create(uint64_t addr)
|
||||
mca_btl_mx_finalize( &mx_btl->super );
|
||||
return NULL;
|
||||
}
|
||||
mx_btl->mx_unique_network_id = ((ms.mapper_mac[2] << 24) +
|
||||
(ms.mapper_mac[3] << 16) +
|
||||
/* Keep the first 4 bytes for the network speed */
|
||||
mx_btl->mx_unique_network_id = ((ms.mapper_mac[3] << 16) +
|
||||
(ms.mapper_mac[4] << 8) +
|
||||
(ms.mapper_mac[5]));
|
||||
#if defined(MX_HAS_NET_TYPE)
|
||||
if( (status = mx_get_info( mx_btl->mx_endpoint, MX_LINE_SPEED, NULL, 0,
|
||||
&value, sizeof(int))) != MX_SUCCESS ) {
|
||||
opal_output( 0, "mx_get_info(MX_LINE_SPEED) failed with status %d (%s)\n",
|
||||
status, mx_strerror(status) );
|
||||
}
|
||||
if( MX_SPEED_2G == value ) {
|
||||
mx_btl->mx_unique_network_id |= 0xaa00000000;
|
||||
mx_btl->super.btl_bandwidth = 2000;
|
||||
} else if( MX_SPEED_10G == value ) {
|
||||
mx_btl->mx_unique_network_id |= 0xbb00000000;
|
||||
mx_btl->super.btl_bandwidth = 10000;
|
||||
} else {
|
||||
mx_btl->mx_unique_network_id |= 0xcc00000000;
|
||||
mx_btl->super.btl_bandwidth = 1000; /* some value */
|
||||
}
|
||||
#endif /* defined(MX_HAS_NET_TYPE) */
|
||||
|
||||
}
|
||||
#endif /* MX_HAVE_MAPPER_STATE */
|
||||
|
||||
@ -395,9 +411,7 @@ mca_btl_base_module_t** mca_btl_mx_component_init(int *num_btl_modules,
|
||||
/* initialize objects */
|
||||
OBJ_CONSTRUCT(&mca_btl_mx_component.mx_send_eager_frags, ompi_free_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_mx_component.mx_send_user_frags, ompi_free_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_mx_component.mx_recv_frags, ompi_free_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_mx_component.mx_procs, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_mx_component.mx_pending_acks, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_mx_component.mx_lock, opal_mutex_t);
|
||||
|
||||
ompi_free_list_init( &mca_btl_mx_component.mx_send_eager_frags,
|
||||
@ -416,14 +430,6 @@ mca_btl_base_module_t** mca_btl_mx_component_init(int *num_btl_modules,
|
||||
mca_btl_mx_component.mx_free_list_inc,
|
||||
NULL ); /* use default allocator */
|
||||
|
||||
ompi_free_list_init( &mca_btl_mx_component.mx_recv_frags,
|
||||
sizeof(mca_btl_mx_frag_t),
|
||||
OBJ_CLASS(mca_btl_mx_frag_t),
|
||||
mca_btl_mx_component.mx_free_list_num,
|
||||
mca_btl_mx_component.mx_free_list_max,
|
||||
mca_btl_mx_component.mx_free_list_inc,
|
||||
NULL ); /* use default allocator */
|
||||
|
||||
/* intialize process hash table */
|
||||
OBJ_CONSTRUCT( &mca_btl_mx_component.mx_procs, opal_list_t );
|
||||
|
||||
|
@ -34,7 +34,6 @@ OBJ_CLASS_INSTANCE(mca_btl_mx_proc_t,
|
||||
void mca_btl_mx_proc_construct(mca_btl_mx_proc_t* proc)
|
||||
{
|
||||
proc->proc_ompi = 0;
|
||||
proc->proc_addr_index = 0;
|
||||
proc->proc_endpoints = NULL;
|
||||
proc->proc_endpoint_count = 0;
|
||||
proc->mx_peers_count = 0;
|
||||
@ -191,7 +190,6 @@ int mca_btl_mx_proc_insert( mca_btl_mx_proc_t* module_proc,
|
||||
if( mx_btl->mx_unique_network_id == mx_peers[j].unique_network_id ) {
|
||||
module_endpoint->mx_peer.nic_id = mx_peers[j].nic_id;
|
||||
module_endpoint->mx_peer.endpoint_id = mx_peers[j].endpoint_id;
|
||||
module_proc->proc_addr_index = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -212,7 +210,7 @@ int mca_btl_mx_proc_insert( mca_btl_mx_proc_t* module_proc,
|
||||
|
||||
int mca_btl_mx_proc_connect( mca_btl_mx_endpoint_t* module_endpoint )
|
||||
{
|
||||
int num_retry = 0, i;
|
||||
int num_retry = 0;
|
||||
mx_return_t mx_status;
|
||||
mx_endpoint_addr_t mx_remote_addr;
|
||||
mca_btl_mx_proc_t* module_proc = module_endpoint->endpoint_proc;
|
||||
@ -233,8 +231,8 @@ int mca_btl_mx_proc_connect( mca_btl_mx_endpoint_t* module_endpoint )
|
||||
if( MX_SUCCESS != mx_nic_id_to_hostname( module_endpoint->mx_peer.nic_id, peer_name ) )
|
||||
sprintf( peer_name, "unknown %lx nic_id", (long)module_endpoint->mx_peer.nic_id );
|
||||
|
||||
opal_output( 0, "mx_connect fail for %s(%dth remote address) with key %x (error %s)\n",
|
||||
peer_name, i, mca_btl_mx_component.mx_filter, mx_strerror(mx_status) );
|
||||
opal_output( 0, "mx_connect fail for %s with key %x (error %s)\n",
|
||||
peer_name, mca_btl_mx_component.mx_filter, mx_strerror(mx_status) );
|
||||
}
|
||||
module_endpoint->status = MCA_BTL_MX_NOT_REACHEABLE;
|
||||
return OMPI_ERROR;
|
||||
|
@ -45,9 +45,6 @@ extern "C" {
|
||||
mca_btl_mx_addr_t *mx_peers; /**< peers addresses */
|
||||
int mx_peers_count;
|
||||
|
||||
size_t proc_addr_index;
|
||||
/**< next remote address that will be used to establish the connection */
|
||||
|
||||
struct mca_btl_base_endpoint_t **proc_endpoints;
|
||||
/**< array of endpoints that have been created to access this proc */
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user