1
1

Merge pull request #1228 from igor-ivanov/pr/fix-warnings

Pr/fix warnings
Этот коммит содержится в:
Mike Dubman 2015-12-17 19:39:09 +02:00
родитель 978c54880d 08c18195e7
Коммит 54e141c559
13 изменённых файлов: 132 добавлений и 159 удалений

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

@ -286,7 +286,7 @@ int mca_coll_fca_get_fca_lib(struct ompi_communicator_t *comm);
/* Collective functions */
int mca_coll_fca_allreduce(void *sbuf, void *rbuf, int count,
int mca_coll_fca_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);
@ -294,7 +294,7 @@ int mca_coll_fca_bcast(void *buff, int count, struct ompi_datatype_t *datatype,
int root, struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_fca_reduce(void *sbuf, void* rbuf, int count,
int mca_coll_fca_reduce(const void *sbuf, void* rbuf, int count,
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
int root, struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
@ -302,54 +302,54 @@ int mca_coll_fca_reduce(void *sbuf, void* rbuf, int count,
int mca_coll_fca_barrier(struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_fca_allgather(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
int mca_coll_fca_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_fca_allgatherv(void *sbuf, int scount,
int mca_coll_fca_allgatherv(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int *rcounts, int *disps,
void *rbuf, const int *rcounts, const int *disps,
struct ompi_datatype_t *rdtype,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_fca_alltoall(void *sbuf, int scount,
int mca_coll_fca_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_fca_alltoallv(void *sbuf, int *scounts, int *sdisps,
int mca_coll_fca_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_fca_alltoallw(void *sbuf, int *scounts, int *sdisps,
struct ompi_datatype_t **sdtypes,
void *rbuf, int *rcounts, int *rdisps,
struct ompi_datatype_t **rdtypes,
int mca_coll_fca_alltoallw(const void *sbuf, const int *scounts, const int *sdisps,
struct ompi_datatype_t * const *sdtypes,
void *rbuf, const int *rcounts, const int *rdisps,
struct ompi_datatype_t * const *rdtypes,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_fca_gather(void *sbuf, int scount,
int mca_coll_fca_gather(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
int root, struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_fca_gatherv(void *sbuf, int scount,
int mca_coll_fca_gatherv(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int *rcounts, int *disps,
void *rbuf, const int *rcounts, const int *disps,
struct ompi_datatype_t *rdtype, int root,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);
int mca_coll_fca_reduce_scatter(void *sbuf, void *rbuf, int *rcounts,
int mca_coll_fca_reduce_scatter(const void *sbuf, void *rbuf, const int *rcounts,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,

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

@ -253,7 +253,7 @@ orig_bcast:
* Accepts: - same as MPI_Reduce()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_fca_reduce(void *sbuf, void *rbuf, int count,
int mca_coll_fca_reduce(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
int root, struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
@ -263,7 +263,7 @@ int mca_coll_fca_reduce(void *sbuf, void *rbuf, int count,
int ret;
mca_coll_fca_get_reduce_root(root, fca_module->rank, &spec);
spec.sbuf = sbuf;
spec.sbuf = (void *)sbuf;
spec.rbuf = rbuf;
if (mca_coll_fca_fill_reduce_spec(count, dtype, op, &spec,
fca_module->fca_comm_caps.max_payload)
@ -295,7 +295,7 @@ orig_reduce:
* Accepts: - same as MPI_Allreduce()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_fca_allreduce(void *sbuf, void *rbuf, int count,
int mca_coll_fca_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)
@ -304,7 +304,7 @@ int mca_coll_fca_allreduce(void *sbuf, void *rbuf, int count,
fca_reduce_spec_t spec;
int ret;
spec.sbuf = sbuf;
spec.sbuf = (void *)sbuf;
spec.rbuf = rbuf;
if (mca_coll_fca_fill_reduce_spec(count, dtype, op, &spec,
fca_module->fca_comm_caps.max_payload)
@ -377,7 +377,7 @@ static size_t __setup_gather_sendbuf_inplace(void *inplace_sbuf, int rcount,
* Accepts: - same as MPI_Allgather()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_fca_allgather(void *sbuf, int scount, struct ompi_datatype_t *sdtype,
int mca_coll_fca_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)
@ -399,7 +399,7 @@ int mca_coll_fca_allgather(void *sbuf, int scount, struct ompi_datatype_t *sdtyp
(char *)rbuf + rcount * fca_module->rank * rdtype_extent,
rcount, rdtype, &sconv, &spec.sbuf);
} else {
spec.size = __setup_gather_sendbuf(sbuf, scount, sdtype, &sconv, &spec.sbuf);
spec.size = __setup_gather_sendbuf((void *)sbuf, scount, sdtype, &sconv, &spec.sbuf);
}
/* Setup recv buffer */
@ -442,9 +442,9 @@ orig_allgather:
comm, fca_module->previous_allgather_module);
}
int mca_coll_fca_allgatherv(void *sbuf, int scount,
int mca_coll_fca_allgatherv(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int *rcounts, int *disps,
void *rbuf, const int *rcounts, const int *disps,
struct ompi_datatype_t *rdtype,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
@ -471,7 +471,7 @@ int mca_coll_fca_allgatherv(void *sbuf, int scount,
(char *)rbuf + disps[fca_module->rank] * rdtype_extent,
rcounts[fca_module->rank], rdtype, &sconv, &spec.sbuf);
} else {
spec.sendsize = __setup_gather_sendbuf(sbuf, scount, sdtype, &sconv, &spec.sbuf);
spec.sendsize = __setup_gather_sendbuf((void *)sbuf, scount, sdtype, &sconv, &spec.sbuf);
}
/* Allocate alternative recvsizes/displs on the stack, which will be in bytes */
@ -548,7 +548,7 @@ orig_allgatherv:
fca_module->previous_allgatherv_module);
}
int mca_coll_fca_alltoall(void *sbuf, int scount,
int mca_coll_fca_alltoall(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
@ -561,9 +561,9 @@ int mca_coll_fca_alltoall(void *sbuf, int scount,
comm, fca_module->previous_alltoall_module);
}
int mca_coll_fca_alltoallv(void *sbuf, int *scounts, int *sdisps,
int mca_coll_fca_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)
@ -574,10 +574,10 @@ int mca_coll_fca_alltoallv(void *sbuf, int *scounts, int *sdisps,
comm, fca_module->previous_alltoallv_module);
}
int mca_coll_fca_alltoallw(void *sbuf, int *scounts, int *sdisps,
struct ompi_datatype_t **sdtypes,
void *rbuf, int *rcounts, int *rdisps,
struct ompi_datatype_t **rdtypes,
int mca_coll_fca_alltoallw(const void *sbuf, const int *scounts, const int *sdisps,
struct ompi_datatype_t * const *sdtypes,
void *rbuf, const int *rcounts, const int *rdisps,
struct ompi_datatype_t * const *rdtypes,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
{
@ -587,7 +587,7 @@ int mca_coll_fca_alltoallw(void *sbuf, int *scounts, int *sdisps,
comm, fca_module->previous_alltoallw_module);
}
int mca_coll_fca_gather(void *sbuf, int scount,
int mca_coll_fca_gather(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
@ -600,9 +600,9 @@ int mca_coll_fca_gather(void *sbuf, int scount,
comm, fca_module->previous_gather_module);
}
int mca_coll_fca_gatherv(void *sbuf, int scount,
int mca_coll_fca_gatherv(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int *rcounts, int *disps,
void *rbuf, const int *rcounts, const int *disps,
struct ompi_datatype_t *rdtype, int root,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
@ -613,7 +613,7 @@ int mca_coll_fca_gatherv(void *sbuf, int scount,
comm, fca_module->previous_gatherv_module);
}
int mca_coll_fca_reduce_scatter(void *sbuf, void *rbuf, int *rcounts,
int mca_coll_fca_reduce_scatter(const void *sbuf, void *rbuf, const int *rcounts,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,

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

@ -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 )
{

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

@ -220,8 +220,8 @@ static int ompi_mtl_mxm_recv_ep_address(ompi_proc_t *source_proc, void **address
{
char *modex_component_name = mca_base_component_to_string(&mca_mtl_mxm_component.super.mtl_version);
char *modex_name = malloc(strlen(modex_component_name) + 5);
unsigned char *modex_buf_ptr;
size_t modex_cur_size;
uint8_t *modex_buf_ptr;
int32_t modex_cur_size;
size_t modex_buf_size;
size_t *address_len_buf_ptr;
int modex_name_id = 0;
@ -233,7 +233,7 @@ static int ompi_mtl_mxm_recv_ep_address(ompi_proc_t *source_proc, void **address
/* Receive address length */
sprintf(modex_name, "%s-len", modex_component_name);
OPAL_MODEX_RECV_STRING(rc, modex_name, &source_proc->super.proc_name,
(char**)&address_len_buf_ptr,
(uint8_t **)&address_len_buf_ptr,
&modex_cur_size);
if (OMPI_SUCCESS != rc) {
MXM_ERROR("Failed to receive ep address length");
@ -254,7 +254,7 @@ static int ompi_mtl_mxm_recv_ep_address(ompi_proc_t *source_proc, void **address
while (modex_buf_size < *address_len_p) {
sprintf(modex_name, "%s-%d", modex_component_name, modex_name_id);
OPAL_MODEX_RECV_STRING(rc, modex_name, &source_proc->super.proc_name,
(char**)&modex_buf_ptr,
&modex_buf_ptr,
&modex_cur_size);
if (OMPI_SUCCESS != rc) {
MXM_ERROR("Open MPI couldn't distribute EP connection details");
@ -598,7 +598,7 @@ int ompi_mtl_mxm_del_procs(struct mca_mtl_base_module_t *mtl, size_t nprocs,
size_t i;
#if MXM_API >= MXM_VERSION(3,1)
if (ompi_mtl_mxm.bulk_disconnect && nprocs == ompi_proc_world_size ()) {
if (ompi_mtl_mxm.bulk_disconnect && ((int)nprocs) == ompi_proc_world_size ()) {
mxm_ep_powerdown(ompi_mtl_mxm.ep);
}
#endif

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

@ -66,14 +66,14 @@ static int send_ep_address(void)
address = alloca(addrlen);
error = mxm_ep_get_address(ompi_pml_yalla.mxm_ep, address, &addrlen);
if (MXM_OK != error) {
PML_YALLA_ERROR("Failed to get EP address");
PML_YALLA_ERROR("%s", "Failed to get EP address");
return OMPI_ERROR;
}
OPAL_MODEX_SEND(rc, OPAL_PMIX_GLOBAL,
&mca_pml_yalla_component.pmlm_version, address, addrlen);
if (OMPI_SUCCESS != rc) {
PML_YALLA_ERROR("Open MPI couldn't distribute EP connection details");
PML_YALLA_ERROR("%s", "Open MPI couldn't distribute EP connection details");
return OMPI_ERROR;
}
@ -87,7 +87,7 @@ static int recv_ep_address(ompi_proc_t *proc, void **address_p, size_t *addrlen_
OPAL_MODEX_RECV(rc, &mca_pml_yalla_component.pmlm_version, &proc->super.proc_name,
address_p, addrlen_p);
if (rc < 0) {
PML_YALLA_ERROR("Failed to receive EP address");
PML_YALLA_ERROR("%s", "Failed to receive EP address");
}
return rc;
}
@ -103,18 +103,18 @@ int mca_pml_yalla_open(void)
{
mxm_error_t error;
PML_YALLA_VERBOSE(1, "mca_pml_yalla_open");
PML_YALLA_VERBOSE(1, "%s", "mca_pml_yalla_open");
/* Set memory hooks */
if ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) ==
((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) &
opal_mem_hooks_support_level()))
{
PML_YALLA_VERBOSE(1, "enabling on-demand memory mapping");
PML_YALLA_VERBOSE(1, "%s", "enabling on-demand memory mapping");
opal_setenv("MXM_MPI_MEM_ON_DEMAND_MAP", "y", false, &environ);
ompi_pml_yalla.using_mem_hooks = 1;
} else {
PML_YALLA_VERBOSE(1, "disabling on-demand memory mapping");
PML_YALLA_VERBOSE(1, "%s", "disabling on-demand memory mapping");
ompi_pml_yalla.using_mem_hooks = 0;
}
opal_setenv("MXM_MPI_SINGLE_THREAD", ompi_mpi_thread_multiple ? "n" : "y",
@ -137,7 +137,7 @@ int mca_pml_yalla_open(void)
int mca_pml_yalla_close(void)
{
PML_YALLA_VERBOSE(1, "mca_pml_yalla_close");
PML_YALLA_VERBOSE(1, "%s", "mca_pml_yalla_close");
if (ompi_pml_yalla.ctx_opts != NULL) {
mxm_config_free_context_opts(ompi_pml_yalla.ctx_opts);
@ -157,7 +157,7 @@ int mca_pml_yalla_init(void)
mxm_error_t error;
int rc;
PML_YALLA_VERBOSE(1, "mca_pml_yalla_init");
PML_YALLA_VERBOSE(1, "%s", "mca_pml_yalla_init");
if (ompi_pml_yalla.using_mem_hooks) {
opal_mem_hooks_register_release(mca_pml_yalla_mem_release_cb, NULL);
@ -188,7 +188,7 @@ int mca_pml_yalla_init(void)
int mca_pml_yalla_cleanup(void)
{
PML_YALLA_VERBOSE(1, "mca_pml_yalla_cleanup");
PML_YALLA_VERBOSE(1, "%s", "mca_pml_yalla_cleanup");
opal_progress_unregister(mca_pml_yalla_progress);
@ -241,7 +241,7 @@ int mca_pml_yalla_add_procs(struct ompi_proc_t **procs, size_t nprocs)
free(address);
if (MXM_OK != error) {
PML_YALLA_ERROR("Failed to connect");
PML_YALLA_ERROR("%s", "Failed to connect");
return OMPI_ERROR;
}
@ -256,7 +256,7 @@ int mca_pml_yalla_del_procs(struct ompi_proc_t **procs, size_t nprocs)
size_t i;
if (ompi_mpi_finalized) {
PML_YALLA_VERBOSE(3, "using bulk powerdown");
PML_YALLA_VERBOSE(3, "%s", "using bulk powerdown");
mxm_ep_powerdown(ompi_pml_yalla.mxm_ep);
}
@ -303,7 +303,7 @@ int mca_pml_yalla_del_comm(struct ompi_communicator_t* comm)
mxm_mq_h mq = (void*)comm->c_pml_comm;
if (ompi_pml_yalla.mxm_context == NULL) {
PML_YALLA_ERROR("Destroying communicator after MXM context is destroyed");
PML_YALLA_ERROR("%s", "Destroying communicator after MXM context is destroyed");
return OMPI_ERROR;
}
@ -390,7 +390,7 @@ int mca_pml_yalla_isend_init(const void *buf, size_t count, ompi_datatype_t *dat
{
mca_pml_yalla_send_request_t *sreq;
sreq = MCA_PML_YALLA_SREQ_INIT(buf, count, datatype, dst, tag, mode, comm,
sreq = MCA_PML_YALLA_SREQ_INIT((void *)buf, count, datatype, dst, tag, mode, comm,
OMPI_REQUEST_INACTIVE);
sreq->super.ompi.req_persistent = true;
sreq->super.flags = MCA_PML_YALLA_REQUEST_FLAG_SEND;
@ -459,7 +459,7 @@ int mca_pml_yalla_isend(const void *buf, size_t count, ompi_datatype_t *datatype
mxm_error_t error;
int rc;
sreq = MCA_PML_YALLA_SREQ_INIT(buf, count, datatype, dst, tag, mode, comm,
sreq = MCA_PML_YALLA_SREQ_INIT((void *)buf, count, datatype, dst, tag, mode, comm,
OMPI_REQUEST_ACTIVE);
sreq->super.ompi.req_persistent = false;
sreq->super.flags = 0;
@ -493,7 +493,7 @@ int mca_pml_yalla_send(const void *buf, size_t count, ompi_datatype_t *datatype,
mxm_send_req_t sreq;
mxm_error_t error;
PML_YALLA_INIT_MXM_SEND_REQ(&sreq, buf, count, datatype, dst, tag, mode, comm, send);
PML_YALLA_INIT_MXM_SEND_REQ(&sreq, (void *)buf, count, datatype, dst, tag, mode, comm, send);
PML_YALLA_INIT_BLOCKING_MXM_SEND_REQ(&sreq);
PML_YALLA_VERBOSE(8, "send to %d tag %d dtype %s count %zu", dst, tag,

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

@ -25,7 +25,15 @@ struct pml_yalla_base_request {
ompi_request_t ompi;
mca_pml_yalla_convertor_t *convertor;
int flags;
mxm_req_base_t mxm_base[0]; /* overlaps with base of send/recv */
/* overlaps with base of send/recv
* In ISO C90, you would have to give contents a length of 1,
* which means either you waste space or complicate the argument to malloc.
* Note:
* - 1 was the portable way to go, though it was rather strange
* - 0 was better at indicating intent, but not legal as far as
* the Standard was concerned and supported as an extension by some compilers (including gcc)
*/
mxm_req_base_t mxm_base[1];
};
struct pml_yalla_send_request {
@ -126,28 +134,26 @@ void mca_pml_yalla_init_reqs(void);
} \
}
#define MCA_PML_YALLA_RREQ_INIT(_buf, _count, _datatype, _src, _tag, _comm, _state) \
({ \
mca_pml_yalla_recv_request_t *rreq = (mca_pml_yalla_recv_request_t *)PML_YALLA_FREELIST_GET(&ompi_pml_yalla.recv_reqs); \
\
PML_YALLA_INIT_OMPI_REQ(&rreq->super.ompi, _comm, _state); \
PML_YALLA_INIT_MXM_RECV_REQ(&rreq->mxm, _buf, _count, _datatype, _src, _tag, \
_comm, irecv, rreq); \
rreq; \
})
static inline mca_pml_yalla_recv_request_t* MCA_PML_YALLA_RREQ_INIT(void *_buf, size_t _count, ompi_datatype_t *_datatype,
int _src, int _tag, struct ompi_communicator_t* _comm, int _state)
{
mca_pml_yalla_recv_request_t *rreq = (mca_pml_yalla_recv_request_t *)PML_YALLA_FREELIST_GET(&ompi_pml_yalla.recv_reqs);
PML_YALLA_INIT_OMPI_REQ(&rreq->super.ompi, _comm, _state);
PML_YALLA_INIT_MXM_RECV_REQ(&rreq->mxm, _buf, _count, _datatype, _src, _tag, _comm, irecv, rreq);
return rreq;
}
#define MCA_PML_YALLA_SREQ_INIT(_buf, _count, _datatype, _dst, _tag, _mode, _comm, _state) \
({ \
mca_pml_yalla_send_request_t *sreq = (mca_pml_yalla_send_request_t *)PML_YALLA_FREELIST_GET(&ompi_pml_yalla.send_reqs); \
\
PML_YALLA_INIT_OMPI_REQ(&sreq->super.ompi, _comm, _state); \
PML_YALLA_INIT_MXM_SEND_REQ(&sreq->mxm, _buf, _count, _datatype, _dst, _tag, \
mode, _comm, isend, sreq); \
sreq->super.ompi.req_status.MPI_TAG = _tag; \
sreq->super.ompi.req_status.MPI_SOURCE = (_comm)->c_my_rank; \
sreq->super.ompi.req_status._ucount = _count; \
sreq; \
})
static inline mca_pml_yalla_send_request_t* MCA_PML_YALLA_SREQ_INIT(void *_buf, size_t _count, ompi_datatype_t *_datatype,
int _dst, int _tag, mca_pml_base_send_mode_t _mode, struct ompi_communicator_t* _comm, int _state)
{
mca_pml_yalla_send_request_t *sreq = (mca_pml_yalla_send_request_t *)PML_YALLA_FREELIST_GET(&ompi_pml_yalla.send_reqs);
PML_YALLA_INIT_OMPI_REQ(&sreq->super.ompi, _comm, _state);
PML_YALLA_INIT_MXM_SEND_REQ(&sreq->mxm, _buf, _count, _datatype, _dst, _tag, _mode, _comm, isend, sreq);
sreq->super.ompi.req_status.MPI_TAG = _tag;
sreq->super.ompi.req_status.MPI_SOURCE = (_comm)->c_my_rank;
sreq->super.ompi.req_status._ucount = _count;
return sreq;
}
#define PML_YALLA_INIT_MXM_PROBE_REQ(_rreq, _rank, _tag, _comm) \
{ \

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

@ -410,7 +410,7 @@ int mca_spml_ikrit_add_procs(oshmem_proc_t** procs, size_t nprocs)
{
spml_ikrit_mxm_ep_conn_info_t *ep_info = NULL;
spml_ikrit_mxm_ep_conn_info_t *ep_hw_rdma_info = NULL;
spml_ikrit_mxm_ep_conn_info_t my_ep_info = {0,};
spml_ikrit_mxm_ep_conn_info_t my_ep_info = {{0}};
#if MXM_API < MXM_VERSION(2,0)
mxm_conn_req_t *conn_reqs;
int timeout;
@ -874,7 +874,6 @@ static inline int mca_spml_ikrit_get_shm(void *src_addr,
int mca_spml_ikrit_get(void *src_addr, size_t size, void *dst_addr, int src)
{
mxm_send_req_t sreq;
mxm_error_t err;
if (0 >= size) {
return OSHMEM_SUCCESS;

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

@ -88,7 +88,7 @@ static inline int check_mxm_tls(char *var)
return OSHMEM_SUCCESS;
}
static inline int set_mxm_tls()
static inline int set_mxm_tls(void)
{
char *tls;
@ -136,7 +136,7 @@ static inline int check_mxm_hw_tls(char *v, char *tls)
return OSHMEM_ERROR;
}
static inline int set_mxm_hw_rdma_tls()
static inline int set_mxm_hw_rdma_tls(void)
{
if (!mca_spml_ikrit.hw_rdma_channel) {
return check_mxm_hw_tls("MXM_OSHMEM_TLS", getenv("MXM_OSHMEM_TLS"));

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

@ -164,7 +164,6 @@ segment_create(map_segment_t *ds_buf,
size_t size)
{
int rc = OSHMEM_SUCCESS;
void *addr = NULL;
openib_device_t *device = &memheap_device;
int num_devs = 0;
int i = 0;
@ -280,6 +279,7 @@ segment_create(map_segment_t *ds_buf,
#if (MPAGE_ENABLE > 0)
if (!rc && mca_sshmem_verbs_component.has_shared_mr) {
void *addr = NULL;
access_flag = IBV_ACCESS_LOCAL_WRITE |
IBV_ACCESS_REMOTE_WRITE |
IBV_ACCESS_REMOTE_READ|