Commit 8bdfaf74 authored by Kuleshov Aleksey's avatar Kuleshov Aleksey Committed by Sangmin Seo
Browse files

Fix bug in using wrong type for packsize.



Type of the third argument for MPIR_Pack_size_impl should be a pointer
to MPI_Aint. This patch fixes the wrong usage of int pointer for
MPIR_Pack_size_impl in NEWMAD and MXM netmods.
Signed-off-by: Sangmin Seo's avatarSangmin Seo <sseo@anl.gov>
parent d5a4685b
...@@ -482,8 +482,8 @@ static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype, ...@@ -482,8 +482,8 @@ static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
*iov_count = n_iov; *iov_count = n_iov;
} }
else { else {
int packsize = 0; MPI_Aint packsize = 0;
MPIR_Pack_size_impl(rreq->dev.user_count, rreq->dev.datatype, (MPI_Aint *) & packsize); MPIR_Pack_size_impl(rreq->dev.user_count, rreq->dev.datatype, &packsize);
rreq->dev.tmpbuf = MPIU_Malloc((size_t) packsize); rreq->dev.tmpbuf = MPIU_Malloc((size_t) packsize);
MPIU_Assert(rreq->dev.tmpbuf); MPIU_Assert(rreq->dev.tmpbuf);
rreq->dev.tmpbuf_sz = packsize; rreq->dev.tmpbuf_sz = packsize;
......
...@@ -575,7 +575,7 @@ int MPID_nem_newmad_process_rdtype(MPID_Request **rreq_p, MPID_Datatype * dt_ptr ...@@ -575,7 +575,7 @@ int MPID_nem_newmad_process_rdtype(MPID_Request **rreq_p, MPID_Datatype * dt_ptr
} }
else else
{ {
int packsize = 0; MPI_Aint packsize = 0;
MPIR_Pack_size_impl(rreq->dev.user_count, rreq->dev.datatype, &packsize); MPIR_Pack_size_impl(rreq->dev.user_count, rreq->dev.datatype, &packsize);
rreq->dev.tmpbuf = MPIU_Malloc((size_t) packsize); rreq->dev.tmpbuf = MPIU_Malloc((size_t) packsize);
MPIU_Assert(rreq->dev.tmpbuf); MPIU_Assert(rreq->dev.tmpbuf);
......
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