1
1
This commit was SVN r16100.
Этот коммит содержится в:
Shiqing Fan 2007-09-12 15:29:58 +00:00
родитель b4735c9719
Коммит a0660f4deb
13 изменённых файлов: 32 добавлений и 31 удалений

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

@ -154,7 +154,7 @@ static inline int ompi_cb_fifo_init(int size_of_fifo,
fifo->mask = (size - 1);
/* allocate fifo array */
buf = memory_allocator->mpool_alloc(memory_allocator,
buf = (char *) memory_allocator->mpool_alloc(memory_allocator,
sizeof(void *) * size + 2*CACHE_LINE_SIZE, CACHE_LINE_SIZE, 0,
NULL);
if (NULL == buf) {

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

@ -157,7 +157,7 @@ int ompi_free_list_grow(ompi_free_list_t* flist, size_t num_elements)
elem_size = OPAL_ALIGN(flist->fl_elem_size -
flist->fl_elem_class->cls_sizeof, flist->fl_alignment, size_t);
if(elem_size != 0) {
mpool_alloc_ptr = flist->fl_mpool->mpool_alloc(flist->fl_mpool,
mpool_alloc_ptr = (unsigned char *) flist->fl_mpool->mpool_alloc(flist->fl_mpool,
num_elements * elem_size, flist->fl_alignment,
MCA_MPOOL_FLAGS_CACHE_BYPASS, &reg);
if(NULL == mpool_alloc_ptr) {

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

@ -246,7 +246,7 @@ int32_t ompi_convertor_pack( ompi_convertor_t* pConv,
goto complete_contiguous_data_pack;
}
if( OPAL_LIKELY(NULL == iov[i].iov_base) )
iov[i].iov_base = base_pointer;
iov[i].iov_base = (IOVBASE_TYPE *) base_pointer;
else
MEMCPY( iov[i].iov_base, base_pointer, iov[i].iov_len );
pending_length -= iov[i].iov_len;
@ -258,7 +258,7 @@ int32_t ompi_convertor_pack( ompi_convertor_t* pConv,
complete_contiguous_data_pack:
iov[i].iov_len = pending_length;
if( OPAL_LIKELY(NULL == iov[i].iov_base) )
iov[i].iov_base = base_pointer;
iov[i].iov_base = (IOVBASE_TYPE *) base_pointer;
else
MEMCPY( iov[i].iov_base, base_pointer, iov[i].iov_len );
pConv->bConverted = pConv->local_size;

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

@ -71,7 +71,7 @@ ompi_pack_homogeneous_contig_function( ompi_convertor_t* pConv,
if( (size_t)iov[iov_count].iov_len > length )
iov[iov_count].iov_len = length;
if( iov[iov_count].iov_base == NULL ) {
iov[iov_count].iov_base = source_base;
iov[iov_count].iov_base = (IOVBASE_TYPE *) source_base;
COMPUTE_CSUM( iov[iov_count].iov_base, iov[iov_count].iov_len, pConv );
} else {
/* contiguous data just memcpy the smallest data in the user buffer */
@ -133,7 +133,7 @@ ompi_pack_homogeneous_contig_with_gaps_function( ompi_convertor_t* pConv,
if( (uint32_t)pStack->count < ((*out_size) - iov_count) ) {
pStack[1].count = pData->size - (pConv->bConverted % pData->size);
for( index = iov_count; i < pConv->count; i++, index++ ) {
iov[index].iov_base = user_memory;
iov[index].iov_base = (IOVBASE_TYPE *) user_memory;
iov[index].iov_len = pStack[1].count;
pStack[0].disp += extent;
total_bytes_converted += pStack[1].count;
@ -156,13 +156,13 @@ ompi_pack_homogeneous_contig_with_gaps_function( ompi_convertor_t* pConv,
for( index = iov_count; (i < pConv->count) && (index < (*out_size));
i++, index++ ) {
if( max_allowed < pData->size ) {
iov[index].iov_base = user_memory;
iov[index].iov_base = (IOVBASE_TYPE *) user_memory;
iov[index].iov_len = max_allowed;
max_allowed = 0;
COMPUTE_CSUM( iov[index].iov_base, iov[index].iov_len, pConv );
break;
} else {
iov[index].iov_base = user_memory;
iov[index].iov_base = (IOVBASE_TYPE *) user_memory;
iov[index].iov_len = pData->size;
user_memory += extent;
COMPUTE_CSUM( iov[index].iov_base, (size_t)iov[index].iov_len, pConv );
@ -185,7 +185,7 @@ ompi_pack_homogeneous_contig_with_gaps_function( ompi_convertor_t* pConv,
uint32_t counter;
size_t done;
packed_buffer = iov[iov_count].iov_base;
packed_buffer = (unsigned char *) iov[iov_count].iov_base;
done = pConv->bConverted - i * pData->size; /* partial data from last pack */
if( done != 0 ) { /* still some data to copy from the last time */
done = pData->size - done;
@ -281,7 +281,7 @@ ompi_generic_simple_pack_function( ompi_convertor_t* pConvertor,
pConvertor->stack_pos, pStack->index, (int)pStack->count, (long)pStack->disp ); );
for( iov_count = 0; iov_count < (*out_size); iov_count++ ) {
destination = iov[iov_count].iov_base;
destination = (unsigned char *) iov[iov_count].iov_base;
iov_len_local = iov[iov_count].iov_len;
while( 1 ) {
while( pElem->elem.common.flags & DT_FLAG_DATA ) {

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

@ -385,7 +385,7 @@ ompi_generic_simple_unpack_function( ompi_convertor_t* pConvertor,
for( iov_count = 0; iov_count < (*out_size); iov_count++ ) {
packed_buffer = iov[iov_count].iov_base;
packed_buffer = (unsigned char *) iov[iov_count].iov_base;
iov_len_local = iov[iov_count].iov_len;
if( 0 != pConvertor->partial_length ) {
size_t element_length = ompi_ddt_basicDatatypes[pElem->elem.common.type]->size;

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

@ -374,7 +374,7 @@ static int mca_btl_tcp_component_create_instances(void)
return OMPI_ERROR;
}
kindexes = malloc(sizeof(int) * if_count);
kindexes = (int *) malloc(sizeof(int) * if_count);
if (NULL == kindexes) {
return OMPI_ERR_OUT_OF_RESOURCE;
}

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

@ -195,7 +195,7 @@ int ompi_coll_tuned_alltoall_intra_bruck(void *sbuf, int scount,
if (err != MPI_SUCCESS) { line = __LINE__; goto err_hndl; }
/* Copy back new data from recvbuf to tmpbuf */
err = ompi_ddt_copy_content_same_ddt(new_ddt, 1,tmpbuf, rbuf);
err = ompi_ddt_copy_content_same_ddt(new_ddt, 1,tmpbuf, (char *) rbuf);
if (err < 0) { line = __LINE__; err = -1; goto err_hndl; }
/* free ddt */

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

@ -78,7 +78,7 @@ ompi_coll_tuned_gather_intra_binomial(void *sbuf, int scount,
if (rank == root) {
if (0 == root){
/* root on 0, just use the recv buffer */
ptmp = rbuf;
ptmp = (char *) rbuf;
if (sbuf != MPI_IN_PLACE) {
err = ompi_ddt_sndrcv(sbuf, scount, sdtype,
ptmp, rcount, rdtype);
@ -87,7 +87,7 @@ ompi_coll_tuned_gather_intra_binomial(void *sbuf, int scount,
} else {
/* root is not on 0, allocate temp buffer for recv,
* rotate data at the end */
tempbuf = malloc(rtrue_extent + (rcount*size - 1) * rextent);
tempbuf = (char *) malloc(rtrue_extent + (rcount*size - 1) * rextent);
if (NULL == tempbuf) {
err= OMPI_ERR_OUT_OF_RESOURCE; line = __LINE__; goto err_hndl;
}
@ -110,7 +110,7 @@ ompi_coll_tuned_gather_intra_binomial(void *sbuf, int scount,
/* other non-leaf nodes, allocate temp buffer for data received from
* children, the most we need is half of the total data elements due
* to the property of binimoal tree */
tempbuf = malloc(strue_extent + (scount*size - 1) * sextent);
tempbuf = (char *) malloc(strue_extent + (scount*size - 1) * sextent);
if (NULL == tempbuf) {
err= OMPI_ERR_OUT_OF_RESOURCE; line = __LINE__; goto err_hndl;
}
@ -130,7 +130,7 @@ ompi_coll_tuned_gather_intra_binomial(void *sbuf, int scount,
} else {
/* leaf nodes, no temp buffer needed, use sdtype,scount as
* rdtype,rdcount since they are ignored on non-root procs */
ptmp = sbuf;
ptmp = (char *) sbuf;
total_recv = scount;
}
@ -180,7 +180,7 @@ ompi_coll_tuned_gather_intra_binomial(void *sbuf, int scount,
err = ompi_ddt_copy_content_same_ddt(rdtype, rcount*root,
rbuf, ptmp + rextent*rcount*(size-root));
(char *) rbuf, ptmp + rextent*rcount*(size-root));
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
free(tempbuf);

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

@ -521,7 +521,7 @@ int ompi_coll_tuned_reduce_intra_in_order_binary( void *sendbuf, void *recvbuf,
ompi_ddt_get_true_extent(datatype, &tlb, &text);
if ((root == rank) && (MPI_IN_PLACE == sendbuf)) {
tmpbuf = malloc(text + (count - 1) * ext);
tmpbuf = (char *) malloc(text + (count - 1) * ext);
if (NULL == tmpbuf) {
return MPI_ERR_INTERN;
}
@ -530,7 +530,7 @@ int ompi_coll_tuned_reduce_intra_in_order_binary( void *sendbuf, void *recvbuf,
(char*)recvbuf);
use_this_sendbuf = tmpbuf;
} else if (io_root == rank) {
tmpbuf = malloc(text + (count - 1) * ext);
tmpbuf = (char *) malloc(text + (count - 1) * ext);
if (NULL == tmpbuf) {
return MPI_ERR_INTERN;
}

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

@ -603,7 +603,7 @@ ompi_coll_tuned_reduce_scatter_intra_ring(void *sbuf, void *rbuf, int *rcounts,
ompi_op_reduce(op, inbuf[inbi], tmprecv, rcounts[rank], dtype);
/* Copy result from tmprecv to rbuf */
ret = ompi_ddt_copy_content_same_ddt(dtype, rcounts[rank], rbuf, tmprecv);
ret = ompi_ddt_copy_content_same_ddt(dtype, rcounts[rank], (char *) rbuf, tmprecv);
if (ret < 0) { line = __LINE__; goto error_hndl; }
if (NULL != displs) free(displs);

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

@ -76,7 +76,7 @@ ompi_coll_tuned_scatter_intra_binomial(void *sbuf, int scount,
if (rank == root) {
if (0 == root) {
/* root on 0, just use the send buffer */
ptmp = sbuf;
ptmp = (char *) sbuf;
if (rbuf != MPI_IN_PLACE) {
/* local copy to rbuf */
err = ompi_ddt_sndrcv(sbuf, scount, sdtype,
@ -85,7 +85,7 @@ ompi_coll_tuned_scatter_intra_binomial(void *sbuf, int scount,
}
} else {
/* root is not on 0, allocate temp buffer for send */
tempbuf = malloc(strue_extent + (scount*size - 1) * sextent);
tempbuf = (char *) malloc(strue_extent + (scount*size - 1) * sextent);
if (NULL == tempbuf) {
err = OMPI_ERR_OUT_OF_RESOURCE; line = __LINE__; goto err_hndl;
}
@ -99,7 +99,7 @@ ompi_coll_tuned_scatter_intra_binomial(void *sbuf, int scount,
err = ompi_ddt_copy_content_same_ddt(sdtype, scount*root,
ptmp + sextent*scount*(size - root), sbuf);
ptmp + sextent*scount*(size - root), (char *) sbuf);
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
if (rbuf != MPI_IN_PLACE) {
@ -113,7 +113,7 @@ ompi_coll_tuned_scatter_intra_binomial(void *sbuf, int scount,
} else if (!(vrank % 2)) {
/* non-root, non-leaf nodes, allocte temp buffer for recv
* the most we need is rcount*size/2 */
tempbuf = malloc(rtrue_extent + (rcount*size - 1) * rextent);
tempbuf = (char *) malloc(rtrue_extent + (rcount*size - 1) * rextent);
if (NULL == tempbuf) {
err= OMPI_ERR_OUT_OF_RESOURCE; line = __LINE__; goto err_hndl;
}
@ -126,7 +126,7 @@ ompi_coll_tuned_scatter_intra_binomial(void *sbuf, int scount,
total_send = scount;
} else {
/* leaf nodes, just use rbuf */
ptmp = rbuf;
ptmp = (char *) rbuf;
}
if (!(vrank % 2)) {

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

@ -365,7 +365,7 @@ ompi_osc_rdma_component_select(ompi_win_t *win,
/* buffer setup */
module->m_use_buffers = check_config_value_bool("use_buffers", info);
module->m_pending_buffers = malloc(sizeof(ompi_osc_rdma_buffer_t) *
module->m_pending_buffers = (ompi_osc_rdma_buffer_t *) malloc(sizeof(ompi_osc_rdma_buffer_t) *
ompi_comm_size(module->m_comm));
memset(module->m_pending_buffers, 0,
sizeof(ompi_osc_rdma_buffer_t) * ompi_comm_size(module->m_comm));
@ -1125,7 +1125,7 @@ setup_rdma(ompi_osc_rdma_module_t *module)
#endif
/* create a setup info structure */
module->m_setup_info = malloc(sizeof(ompi_osc_rdma_setup_info_t));
module->m_setup_info = (ompi_osc_rdma_setup_info_t *) malloc(sizeof(ompi_osc_rdma_setup_info_t));
if (NULL == module->m_setup_info) {
ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
goto cleanup;
@ -1134,7 +1134,7 @@ setup_rdma(ompi_osc_rdma_module_t *module)
module->m_setup_info->num_btls_expected = -1;
module->m_setup_info->num_btls_outgoing = 0;
module->m_setup_info->outstanding_btl_requests =
malloc(sizeof(opal_list_t) * ompi_comm_size(module->m_comm));
(opal_list_t *) malloc(sizeof(opal_list_t) * ompi_comm_size(module->m_comm));
if (NULL == module->m_setup_info->outstanding_btl_requests) {
ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
goto cleanup;
@ -1271,7 +1271,7 @@ setup_rdma(ompi_osc_rdma_module_t *module)
}
/* fill in information about remote peers */
remote = malloc(sizeof(uint64_t) * ompi_comm_size(module->m_comm));
remote = (uint64_t *) malloc(sizeof(uint64_t) * ompi_comm_size(module->m_comm));
if (NULL == remote) {
ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
goto cleanup;

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

@ -596,7 +596,8 @@ int mca_pml_ob1_ft_event( int state )
int mca_pml_ob1_com_btl_comp(const void *v1, const void *v2)
{
const mca_pml_ob1_com_btl_t *b1 = v1, *b2 = v2;
const mca_pml_ob1_com_btl_t *b1 = (const mca_pml_ob1_com_btl_t *) v1;
const mca_pml_ob1_com_btl_t *b2 = (const mca_pml_ob1_com_btl_t *) v2;
if(b1->bml_btl->btl_weight < b2->bml_btl->btl_weight)
return 1;