Commit d04c8a1e authored by Igor Ivanov's avatar Igor Ivanov Committed by Pavan Balaji
Browse files

mpid/common/hcoll: Fix broken hcoll support

- Fixed hcoll broken by #98c76f78

 commit;
- Resolved warnings reported by hcoll supported code;
Signed-off-by: default avatarIgor Ivanov <Igor.Ivanov@itseez.com>
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent b6ce8a4c
......@@ -10,13 +10,13 @@ extern int world_comm_destroying;
int hcoll_comm_create(MPID_Comm * comm, void *param);
int hcoll_comm_destroy(MPID_Comm * comm, void *param);
int hcoll_Barrier(MPID_Comm * comm_ptr, int *err);
int hcoll_Barrier(MPID_Comm * comm_ptr, mpir_errflag_t *err);
int hcoll_Bcast(void *buffer, int count, MPI_Datatype datatype, int root,
MPID_Comm * comm_ptr, int *err);
MPID_Comm * comm_ptr, mpir_errflag_t *err);
int hcoll_Allgather(const void *sbuf, int scount, MPI_Datatype sdtype,
void *rbuf, int rcount, MPI_Datatype rdtype, MPID_Comm * comm_ptr, int *err);
void *rbuf, int rcount, MPI_Datatype rdtype, MPID_Comm * comm_ptr, mpir_errflag_t *err);
int hcoll_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
MPI_Op op, MPID_Comm * comm_ptr, int *err);
MPI_Op op, MPID_Comm * comm_ptr, mpir_errflag_t *err);
int hcoll_Ibarrier_req(MPID_Comm * comm_ptr, MPID_Request ** request);
int hcoll_Ibcast_req(void *buffer, int count, MPI_Datatype datatype, int root,
......
......@@ -5,7 +5,7 @@
#define FUNCNAME hcoll_Barrier
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int hcoll_Barrier(MPID_Comm * comm_ptr, int *err)
int hcoll_Barrier(MPID_Comm * comm_ptr, mpir_errflag_t *err)
{
int rc;
MPI_Comm comm = comm_ptr->handle;
......@@ -29,7 +29,7 @@ int hcoll_Barrier(MPID_Comm * comm_ptr, int *err)
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int hcoll_Bcast(void *buffer, int count, MPI_Datatype datatype, int root,
MPID_Comm * comm_ptr, int *err)
MPID_Comm * comm_ptr, mpir_errflag_t *err)
{
dte_data_representation_t dtype;
int rc;
......@@ -73,7 +73,7 @@ int hcoll_Bcast(void *buffer, int count, MPI_Datatype datatype, int root,
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int hcoll_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
MPI_Op op, MPID_Comm * comm_ptr, int *err)
MPI_Op op, MPID_Comm * comm_ptr, mpir_errflag_t *err)
{
dte_data_representation_t Dtype;
hcoll_dte_op_t *Op;
......@@ -97,7 +97,7 @@ int hcoll_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype
use_fallback = 1;
}
else {
rc = hcoll_collectives.coll_allreduce(sendbuf, recvbuf, count, Dtype, Op,
rc = hcoll_collectives.coll_allreduce((void *)sendbuf, recvbuf, count, Dtype, Op,
comm_ptr->hcoll_priv.hcoll_context);
if (HCOLL_SUCCESS != rc) {
use_fallback = 1;
......@@ -124,7 +124,7 @@ int hcoll_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int hcoll_Allgather(const void *sbuf, int scount, MPI_Datatype sdtype,
void *rbuf, int rcount, MPI_Datatype rdtype, MPID_Comm * comm_ptr, int *err)
void *rbuf, int rcount, MPI_Datatype rdtype, MPID_Comm * comm_ptr, mpir_errflag_t *err)
{
int is_homogeneous = 1, use_fallback = 0;
MPI_Comm comm = comm_ptr->handle;
......@@ -149,7 +149,7 @@ int hcoll_Allgather(const void *sbuf, int scount, MPI_Datatype sdtype,
use_fallback = 1;
}
else {
rc = hcoll_collectives.coll_allgather(sbuf, scount, stype, rbuf, rcount, rtype,
rc = hcoll_collectives.coll_allgather((void *)sbuf, scount, stype, rbuf, rcount, rtype,
comm_ptr->hcoll_priv.hcoll_context);
if (HCOLL_SUCCESS != rc) {
use_fallback = 1;
......@@ -282,7 +282,7 @@ int hcoll_Iallgather_req(const void *sendbuf, int sendcount, MPI_Datatype sendty
use_fallback = 1;
}
else {
rc = hcoll_collectives.coll_iallgather(sendbuf, sendcount, stype, recvbuf, recvcount, rtype,
rc = hcoll_collectives.coll_iallgather((void *)sendbuf, sendcount, stype, recvbuf, recvcount, rtype,
comm_ptr->hcoll_priv.hcoll_context, rt_handle);
if (HCOLL_SUCCESS != rc) {
use_fallback = 1;
......@@ -337,7 +337,7 @@ int hcoll_Iallreduce_req(const void *sendbuf, void *recvbuf, int count, MPI_Data
use_fallback = 1;
}
else {
rc = hcoll_collectives.coll_iallreduce(sendbuf, recvbuf, count, Dtype, Op,
rc = hcoll_collectives.coll_iallreduce((void *)sendbuf, recvbuf, count, Dtype, Op,
comm_ptr->hcoll_priv.hcoll_context, rt_handle);
if (HCOLL_SUCCESS != rc) {
use_fallback = 1;
......
......@@ -103,7 +103,7 @@ static inline int count_total_dte_repeat_entries(struct dte_data_representation_
struct dte_generalized_iovec_t *dte_iovec = data->rep.general_rep->data_representation.data;
int total_entries_number = 0;
for (i = 0; i < dte_iovec->repeat_count; i++) {
total_entries_number += dte_iovec->repeat[i].n_builtin_elements;
total_entries_number += dte_iovec->repeat[i].n_elements;
}
return total_entries_number;
}
......@@ -161,7 +161,7 @@ static int recv_nb(struct dte_data_representation_t data,
repeat = data.rep.general_rep->data_representation.data->repeat;
repeat_count = data.rep.general_rep->data_representation.data->repeat_count;
for (i = 0; i < repeat_count; i++) {
for (j = 0; j < repeat[i].n_builtin_elements; j++) {
for (j = 0; j < repeat[i].n_elements; j++) {
char *repeat_unit = (char *) &repeat[i];
buf = (void *) (repeat_unit + repeat[i].elements[j].base_offset);
len = repeat[i].elements[j].packed_size;
......@@ -228,7 +228,7 @@ static int send_nb(dte_data_representation_t data,
repeat = data.rep.general_rep->data_representation.data->repeat;
repeat_count = data.rep.general_rep->data_representation.data->repeat_count;
for (i = 0; i < repeat_count; i++) {
for (j = 0; j < repeat[i].n_builtin_elements; j++) {
for (j = 0; j < repeat[i].n_elements; j++) {
char *repeat_unit = (char *) &repeat[i];
buf = (void *) (repeat_unit + repeat[i].elements[j].base_offset);
len = repeat[i].elements[j].packed_size;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment