1
1

ompi/coll: Fix warnings in hcoll component

warning: assignment from incompatible pointer type
Этот коммит содержится в:
igor.ivanov@itseez.com 2015-12-15 19:20:00 +03:00 коммит произвёл Igor Ivanov
родитель 2b9341a38a
Коммит 8f45d83d46
5 изменённых файлов: 44 добавлений и 76 удалений

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

@ -168,14 +168,14 @@ int mca_coll_hcoll_bcast(void *buff, int count,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_hcoll_allgather(void *sbuf, int scount,
int mca_coll_hcoll_allgather(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_hcoll_gather(void *sbuf, int scount,
int mca_coll_hcoll_gather(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
@ -183,31 +183,31 @@ int mca_coll_hcoll_gather(void *sbuf, int scount,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_hcoll_allreduce(void *sbuf, void *rbuf, int count,
int mca_coll_hcoll_allreduce(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_hcoll_alltoall(void *sbuf, int scount,
int mca_coll_hcoll_alltoall(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void* rbuf, int rcount,
struct ompi_datatype_t *rdtype,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_hcoll_alltoallv(void *sbuf, int *scounts,
int *sdisps,
int mca_coll_hcoll_alltoallv(const void *sbuf, const int *scounts,
const int *sdisps,
struct ompi_datatype_t *sdtype,
void *rbuf, int *rcounts,
int *rdisps,
void *rbuf, const int *rcounts,
const int *rdisps,
struct ompi_datatype_t *rdtype,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_hcoll_gatherv(void* sbuf, int scount,
int mca_coll_hcoll_gatherv(const void* sbuf, int scount,
struct ompi_datatype_t *sdtype,
void* rbuf, int *rcounts, int *displs,
void* rbuf, const int *rcounts, const int *displs,
struct ompi_datatype_t *rdtype,
int root,
struct ompi_communicator_t *comm,
@ -223,7 +223,7 @@ int mca_coll_hcoll_ibcast(void *buff, int count,
ompi_request_t** request,
mca_coll_base_module_t *module);
int mca_coll_hcoll_iallgather(void *sbuf, int scount,
int mca_coll_hcoll_iallgather(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
@ -231,14 +231,14 @@ int mca_coll_hcoll_iallgather(void *sbuf, int scount,
ompi_request_t** request,
mca_coll_base_module_t *module);
int mca_coll_hcoll_iallreduce(void *sbuf, void *rbuf, int count,
int mca_coll_hcoll_iallreduce(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
ompi_request_t** request,
mca_coll_base_module_t *module);
int mca_coll_hcoll_ialltoall(void *sbuf, int scount,
int mca_coll_hcoll_ialltoall(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void* rbuf, int rcount,
struct ompi_datatype_t *rdtype,
@ -246,7 +246,7 @@ int mca_coll_hcoll_ialltoall(void *sbuf, int scount,
ompi_request_t **req,
mca_coll_base_module_t *module);
int mca_coll_hcoll_ialltoallv(void *sbuf, int *scounts,
int mca_coll_hcoll_ialltoallv(const void *sbuf, int *scounts,
int *sdisps,
struct ompi_datatype_t *sdtype,
void *rbuf, int *rcounts,
@ -256,9 +256,9 @@ int mca_coll_hcoll_ialltoallv(void *sbuf, int *scounts,
ompi_request_t **req,
mca_coll_base_module_t *module);
int mca_coll_hcoll_igatherv(void* sbuf, int scount,
int mca_coll_hcoll_igatherv(const void* sbuf, int scount,
struct ompi_datatype_t *sdtype,
void* rbuf, int *rcounts, int *displs,
void* rbuf, const int *rcounts, const int *displs,
struct ompi_datatype_t *rdtype,
int root,
struct ompi_communicator_t *comm,

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

@ -92,40 +92,6 @@ enum {
};
/*
* utility routine for string parameter registration
*/
static int reg_string(const char* param_name,
const char* deprecated_param_name,
const char* param_desc,
const char* default_value, char **storage,
int flags)
{
int index;
*storage = (char *) default_value;
index = mca_base_component_var_register(
&mca_coll_hcoll_component.super.collm_version,
param_name, param_desc, MCA_BASE_VAR_TYPE_STRING,
NULL, 0, 0, OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY, storage);
if (NULL != deprecated_param_name) {
(void) mca_base_var_register_synonym(index,
"ompi", "coll", "hcoll", deprecated_param_name,
MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
}
if (0 != (flags & REGSTR_EMPTY_OK) &&
(NULL == *storage || 0 == strlen(*storage))) {
opal_output(0, "Bad parameter value for parameter \"%s\"",
param_name);
return OMPI_ERR_BAD_PARAM;
}
return OMPI_SUCCESS;
}
/*
* Utility routine for integer parameter registration
*/

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

@ -157,7 +157,7 @@ static int mca_coll_hcoll_save_coll_handlers(mca_coll_hcoll_module_t *hcoll_modu
/*
** Communicator free callback
*/
int hcoll_comm_attr_del_fn(MPI_Comm comm, int keyval, void *attr_val, void *extra)
static int hcoll_comm_attr_del_fn(MPI_Comm comm, int keyval, void *attr_val, void *extra)
{
mca_coll_hcoll_module_t *hcoll_module;

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

@ -57,7 +57,7 @@ int mca_coll_hcoll_bcast(void *buff, int count,
return rc;
}
int mca_coll_hcoll_allgather(void *sbuf, int scount,
int mca_coll_hcoll_allgather(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
@ -86,7 +86,7 @@ int mca_coll_hcoll_allgather(void *sbuf, int scount,
hcoll_module->previous_allgather_module);
return rc;
}
rc = hcoll_collectives.coll_allgather(sbuf,scount,stype,rbuf,rcount,rtype,hcoll_module->hcoll_context);
rc = hcoll_collectives.coll_allgather((void *)sbuf,scount,stype,rbuf,rcount,rtype,hcoll_module->hcoll_context);
if (HCOLL_SUCCESS != rc){
HCOL_VERBOSE(20,"RUNNING FALLBACK ALLGATHER");
rc = hcoll_module->previous_allgather(sbuf,scount,sdtype,
@ -97,7 +97,7 @@ int mca_coll_hcoll_allgather(void *sbuf, int scount,
return rc;
}
int mca_coll_hcoll_gather(void *sbuf, int scount,
int mca_coll_hcoll_gather(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
@ -126,10 +126,10 @@ int mca_coll_hcoll_gather(void *sbuf, int scount,
hcoll_module->previous_allgather_module);
return rc;
}
rc = hcoll_collectives.coll_gather(sbuf,scount,stype,rbuf,rcount,rtype,root,hcoll_module->hcoll_context);
rc = hcoll_collectives.coll_gather((void *)sbuf,scount,stype,rbuf,rcount,rtype,root,hcoll_module->hcoll_context);
if (HCOLL_SUCCESS != rc){
HCOL_VERBOSE(20,"RUNNING FALLBACK GATHER");
rc = hcoll_module->previous_gather(sbuf,scount,sdtype,
rc = hcoll_module->previous_gather((void *)sbuf,scount,sdtype,
rbuf,rcount,rdtype,root,
comm,
hcoll_module->previous_allgather_module);
@ -138,7 +138,7 @@ int mca_coll_hcoll_gather(void *sbuf, int scount,
}
int mca_coll_hcoll_allreduce(void *sbuf, void *rbuf, int count,
int mca_coll_hcoll_allreduce(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
@ -176,7 +176,7 @@ int mca_coll_hcoll_allreduce(void *sbuf, void *rbuf, int count,
return rc;
}
rc = hcoll_collectives.coll_allreduce(sbuf,rbuf,count,Dtype,Op,hcoll_module->hcoll_context);
rc = hcoll_collectives.coll_allreduce((void *)sbuf,rbuf,count,Dtype,Op,hcoll_module->hcoll_context);
if (HCOLL_SUCCESS != rc){
HCOL_VERBOSE(20,"RUNNING FALLBACK ALLREDUCE");
rc = hcoll_module->previous_allreduce(sbuf,rbuf,
@ -186,7 +186,7 @@ int mca_coll_hcoll_allreduce(void *sbuf, void *rbuf, int count,
return rc;
}
int mca_coll_hcoll_alltoall(void *sbuf, int scount,
int mca_coll_hcoll_alltoall(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void* rbuf, int rcount,
struct ompi_datatype_t *rdtype,
@ -215,7 +215,7 @@ int mca_coll_hcoll_alltoall(void *sbuf, int scount,
hcoll_module->previous_alltoall_module);
return rc;
}
rc = hcoll_collectives.coll_alltoall(sbuf,scount,stype,rbuf,rcount,rtype,hcoll_module->hcoll_context);
rc = hcoll_collectives.coll_alltoall((void *)sbuf,scount,stype,rbuf,rcount,rtype,hcoll_module->hcoll_context);
if (HCOLL_SUCCESS != rc){
HCOL_VERBOSE(20,"RUNNING FALLBACK ALLTOALL");
rc = hcoll_module->previous_alltoall(sbuf,scount,sdtype,
@ -226,9 +226,9 @@ int mca_coll_hcoll_alltoall(void *sbuf, int scount,
return rc;
}
int mca_coll_hcoll_alltoallv(void *sbuf, int *scounts, int *sdisps,
int mca_coll_hcoll_alltoallv(const void *sbuf, const int *scounts, const int *sdisps,
struct ompi_datatype_t *sdtype,
void *rbuf, int *rcounts, int *rdisps,
void *rbuf, const int *rcounts, const int *rdisps,
struct ompi_datatype_t *rdtype,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
@ -251,8 +251,8 @@ int mca_coll_hcoll_alltoallv(void *sbuf, int *scounts, int *sdisps,
comm, hcoll_module->previous_alltoallv_module);
return rc;
}
rc = hcoll_collectives.coll_alltoallv(sbuf, scounts, sdisps, stype,
rbuf, rcounts, rdisps, rtype,
rc = hcoll_collectives.coll_alltoallv((void *)sbuf, (int *)scounts, (int *)sdisps, stype,
rbuf, (int *)rcounts, (int *)rdisps, rtype,
hcoll_module->hcoll_context);
if (HCOLL_SUCCESS != rc){
HCOL_VERBOSE(20,"RUNNING FALLBACK ALLTOALLV");
@ -263,9 +263,9 @@ int mca_coll_hcoll_alltoallv(void *sbuf, int *scounts, int *sdisps,
return rc;
}
int mca_coll_hcoll_gatherv(void* sbuf, int scount,
int mca_coll_hcoll_gatherv(const void* sbuf, int scount,
struct ompi_datatype_t *sdtype,
void* rbuf, int *rcounts, int *displs,
void* rbuf, const int *rcounts, const int *displs,
struct ompi_datatype_t *rdtype,
int root,
struct ompi_communicator_t *comm,
@ -292,7 +292,7 @@ int mca_coll_hcoll_gatherv(void* sbuf, int scount,
comm, hcoll_module->previous_gatherv_module);
return rc;
}
rc = hcoll_collectives.coll_gatherv(sbuf,scount,stype,rbuf,rcounts,displs, rtype, root, hcoll_module->hcoll_context);
rc = hcoll_collectives.coll_gatherv((void *)sbuf, scount, stype, rbuf, (int *)rcounts, (int *)displs, rtype, root, hcoll_module->hcoll_context);
if (HCOLL_SUCCESS != rc){
HCOL_VERBOSE(20,"RUNNING FALLBACK GATHERV");
rc = hcoll_module->previous_gatherv(sbuf,scount,sdtype,
@ -352,7 +352,7 @@ int mca_coll_hcoll_ibcast(void *buff, int count,
return rc;
}
int mca_coll_hcoll_iallgather(void *sbuf, int scount,
int mca_coll_hcoll_iallgather(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
@ -385,7 +385,7 @@ int mca_coll_hcoll_iallgather(void *sbuf, int scount,
hcoll_module->previous_iallgather_module);
return rc;
}
rc = hcoll_collectives.coll_iallgather(sbuf, scount, stype, rbuf, rcount, rtype, hcoll_module->hcoll_context, rt_handle);
rc = hcoll_collectives.coll_iallgather((void *)sbuf, scount, stype, rbuf, rcount, rtype, hcoll_module->hcoll_context, rt_handle);
if (HCOLL_SUCCESS != rc){
HCOL_VERBOSE(20,"RUNNING FALLBACK NON-BLOCKING ALLGATHER");
rc = hcoll_module->previous_iallgather(sbuf,scount,sdtype,
@ -397,7 +397,7 @@ int mca_coll_hcoll_iallgather(void *sbuf, int scount,
return rc;
}
int mca_coll_hcoll_iallreduce(void *sbuf, void *rbuf, int count,
int mca_coll_hcoll_iallreduce(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
@ -438,7 +438,7 @@ int mca_coll_hcoll_iallreduce(void *sbuf, void *rbuf, int count,
return rc;
}
rc = hcoll_collectives.coll_iallreduce(sbuf, rbuf, count, Dtype, Op, hcoll_module->hcoll_context, rt_handle);
rc = hcoll_collectives.coll_iallreduce((void *)sbuf, rbuf, count, Dtype, Op, hcoll_module->hcoll_context, rt_handle);
if (HCOLL_SUCCESS != rc){
HCOL_VERBOSE(20,"RUNNING FALLBACK NON-BLOCKING ALLREDUCE");
rc = hcoll_module->previous_iallreduce(sbuf,rbuf,
@ -448,9 +448,9 @@ int mca_coll_hcoll_iallreduce(void *sbuf, void *rbuf, int count,
return rc;
}
int mca_coll_hcoll_igatherv(void* sbuf, int scount,
int mca_coll_hcoll_igatherv(const void* sbuf, int scount,
struct ompi_datatype_t *sdtype,
void* rbuf, int *rcounts, int *displs,
void* rbuf, const int *rcounts, const int *displs,
struct ompi_datatype_t *rdtype,
int root,
struct ompi_communicator_t *comm,
@ -481,7 +481,7 @@ int mca_coll_hcoll_igatherv(void* sbuf, int scount,
hcoll_module->previous_igatherv_module);
return rc;
}
rc = hcoll_collectives.coll_igatherv(sbuf,scount,stype,rbuf,rcounts,displs, rtype, root, hcoll_module->hcoll_context, rt_handle);
rc = hcoll_collectives.coll_igatherv((void *)sbuf, scount, stype, rbuf, (int *)rcounts, (int *)displs, rtype, root, hcoll_module->hcoll_context, rt_handle);
if (HCOLL_SUCCESS != rc){
HCOL_VERBOSE(20,"RUNNING FALLBACK IGATHERV");
rc = hcoll_module->previous_igatherv(sbuf,scount,sdtype,

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

@ -79,7 +79,9 @@ static int get_ec_handles( int num_ec ,
rte_grp_handle_t ,
rte_ec_handle_t * ec_handles );
#if 0 /* This callback is not used */
static int get_my_ec(rte_grp_handle_t , rte_ec_handle_t *ec_handle);
#endif
static int group_size ( rte_grp_handle_t group );
static int my_rank (rte_grp_handle_t grp_h);
@ -181,7 +183,6 @@ static int recv_nb(struct dte_data_representation_t data,
/*do inline nb recv*/
size_t size;
ompi_request_t *ompi_req;
opal_free_list_item_t *item;
if (!buffer && !HCOL_DTE_IS_ZERO(data)) {
fprintf(stderr, "***Error in hcolrte_rml_recv_nb: buffer pointer is NULL"
@ -339,6 +340,7 @@ static int get_ec_handles( int num_ec ,
return HCOLL_SUCCESS;
}
#if 0 /* This callback is not used */
static int get_my_ec ( rte_grp_handle_t grp_h, rte_ec_handle_t *ec_handle)
{
ompi_communicator_t *comm = (ompi_communicator_t *)grp_h;
@ -348,7 +350,7 @@ static int get_my_ec ( rte_grp_handle_t grp_h, rte_ec_handle_t *ec_handle)
ec_handle->rank = my_rank;
return HCOLL_SUCCESS;
}
#endif
static int group_size ( rte_grp_handle_t grp_h )
{