1
1

Remove some compiler warnings about unused variables

Correctly define the 64 bits constants.
Some minor cleanups.

This commit was SVN r7606.
Этот коммит содержится в:
George Bosilca 2005-10-04 12:29:51 +00:00
родитель 492c0e59dc
Коммит 3453a6c0e9
2 изменённых файлов: 15 добавлений и 24 удалений

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

@ -166,19 +166,14 @@ int mca_btl_mx_register( struct mca_btl_base_module_t* btl,
mx_segment.segment_ptr = frag->base.des_dst->seg_addr.pval; mx_segment.segment_ptr = frag->base.des_dst->seg_addr.pval;
mx_segment.segment_length = frag->base.des_dst->seg_len; mx_segment.segment_length = frag->base.des_dst->seg_len;
mx_return = mx_irecv( mx_btl->mx_endpoint, &mx_segment, 1, (uint64_t)tag, 0xffffffffffffffff, mx_return = mx_irecv( mx_btl->mx_endpoint, &mx_segment, 1, (uint64_t)tag,
0xffffffffffffffffULL,
frag, &(frag->mx_request) ); frag, &(frag->mx_request) );
if( MX_SUCCESS != mx_return ) { if( MX_SUCCESS != mx_return ) {
return OMPI_ERROR; return OMPI_ERROR;
} }
} }
extern int mx_debug;
if( mx_debug ) {
#include <unistd.h>
sleep(20);
}
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }
@ -262,7 +257,6 @@ mca_btl_base_descriptor_t* mca_btl_mx_prepare_src(
size_t* size size_t* size
) )
{ {
mca_btl_mx_module_t* mx_btl = (mca_btl_mx_module_t*)btl;
mca_btl_mx_frag_t* frag; mca_btl_mx_frag_t* frag;
struct iovec iov; struct iovec iov;
uint32_t iov_count = 1; uint32_t iov_count = 1;
@ -271,6 +265,7 @@ mca_btl_base_descriptor_t* mca_btl_mx_prepare_src(
int rc; int rc;
#if MCA_BTL_HAS_MPOOL #if MCA_BTL_HAS_MPOOL
mca_btl_mx_module_t* mx_btl = (mca_btl_mx_module_t*)btl;
/* /*
* If the data has already been pinned and is contigous than we can * If the data has already been pinned and is contigous than we can
* use it in place. * use it in place.
@ -416,7 +411,7 @@ mca_btl_base_descriptor_t* mca_btl_mx_prepare_src(
iov.iov_len = mca_btl_mx_module.super.btl_eager_limit - reserve; iov.iov_len = mca_btl_mx_module.super.btl_eager_limit - reserve;
max_data = iov.iov_len; /* let the PML establish the pipeline */ max_data = iov.iov_len; /* let the PML establish the pipeline */
} }
iov.iov_base = (unsigned char*)frag->segment[0].seg_addr.pval + reserve; iov.iov_base = (void*)((unsigned char*)frag->segment[0].seg_addr.pval + reserve);
frag->segment[0].seg_len = reserve; frag->segment[0].seg_len = reserve;
frag->base.des_src_cnt = 1; frag->base.des_src_cnt = 1;
} }
@ -463,7 +458,9 @@ mca_btl_base_descriptor_t* mca_btl_mx_prepare_dst(
size_t reserve, size_t reserve,
size_t* size) size_t* size)
{ {
mca_btl_mx_module_t* mx_btl = (mca_btl_mx_module_t*) btl; #if MCA_BTL_HAS_MPOOL
mca_btl_mx_module_t* mx_btl = (mca_btl_mx_module_t*) btl;
#endif /* MCA_BTL_HAS_MPOOL */
mca_btl_mx_frag_t* frag; mca_btl_mx_frag_t* frag;
int rc; int rc;

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

@ -66,15 +66,12 @@ mca_btl_mx_component_t mca_btl_mx_component = {
} }
}; };
int mx_debug = 0;
/* /*
* utility routines for parameter registration * utility routines for parameter registration
*/ */
static inline char* mca_btl_mx_param_register_string( static inline char* mca_btl_mx_param_register_string( const char* param_name,
const char* param_name, const char* default_value )
const char* default_value)
{ {
char *param_value; char *param_value;
int id = mca_base_param_register_string("btl","mx",param_name,NULL,default_value); int id = mca_base_param_register_string("btl","mx",param_name,NULL,default_value);
@ -82,9 +79,8 @@ static inline char* mca_btl_mx_param_register_string(
return param_value; return param_value;
} }
static inline int mca_btl_mx_param_register_int( static inline int mca_btl_mx_param_register_int( const char* param_name,
const char* param_name, int default_value )
int default_value)
{ {
int id = mca_base_param_register_int("btl","mx",param_name,NULL,default_value); int id = mca_base_param_register_int("btl","mx",param_name,NULL,default_value);
int param_value = default_value; int param_value = default_value;
@ -99,11 +95,9 @@ static inline int mca_btl_mx_param_register_int(
int mca_btl_mx_component_open(void) int mca_btl_mx_component_open(void)
{ {
/* initialize state */ /* initialize state */
mca_btl_mx_component.mx_num_btls=0; mca_btl_mx_component.mx_num_btls = 0;
mca_btl_mx_component.mx_btls=NULL; mca_btl_mx_component.mx_btls = NULL;
/* initialize objects */ /* initialize objects */
OBJ_CONSTRUCT(&mca_btl_mx_component.mx_procs, opal_list_t); OBJ_CONSTRUCT(&mca_btl_mx_component.mx_procs, opal_list_t);
@ -146,7 +140,6 @@ int mca_btl_mx_component_open(void)
mca_btl_mx_module.super.btl_flags = mca_btl_mx_module.super.btl_flags =
mca_btl_mx_param_register_int("flags", MCA_BTL_FLAGS_PUT); mca_btl_mx_param_register_int("flags", MCA_BTL_FLAGS_PUT);
mx_debug = mca_btl_mx_param_register_int( "debug", 0 );
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }
@ -446,7 +439,8 @@ int mca_btl_mx_component_progress()
*/ */
mx_segment.segment_ptr = frag->base.des_dst->seg_addr.pval; mx_segment.segment_ptr = frag->base.des_dst->seg_addr.pval;
mx_segment.segment_length = mca_btl_mx_module.super.btl_eager_limit; mx_segment.segment_length = mca_btl_mx_module.super.btl_eager_limit;
mx_return = mx_irecv( mx_btl->mx_endpoint, &mx_segment, 1, (uint64_t)frag->tag, 0xffffffffffffffff, mx_return = mx_irecv( mx_btl->mx_endpoint, &mx_segment, 1, (uint64_t)frag->tag,
(uint64_t)0xffffffffffffffffULL,
frag, &(frag->mx_request) ); frag, &(frag->mx_request) );
if( MX_SUCCESS != mx_return ) { if( MX_SUCCESS != mx_return ) {
opal_output( 0, "Fail to re-register a fragment with the MX NIC ...\n" ); opal_output( 0, "Fail to re-register a fragment with the MX NIC ...\n" );