[mpich-discuss] [patch] fix bug in NEWMAD and MXM netmods

Kuleshov Aleksey rndfax at yandex.ru
Sat Nov 29 14:14:10 CST 2014


diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
index e8bddc3..752a1f9 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
@@ -482,8 +482,8 @@ static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
         *iov_count = n_iov;
     }
     else {
-        int packsize = 0;
-        MPIR_Pack_size_impl(rreq->dev.user_count, rreq->dev.datatype, (MPI_Aint *) & packsize);
+        MPI_Aint packsize = 0;
+        MPIR_Pack_size_impl(rreq->dev.user_count, rreq->dev.datatype, &packsize);
         rreq->dev.tmpbuf = MPIU_Malloc((size_t) packsize);
         MPIU_Assert(rreq->dev.tmpbuf);
         rreq->dev.tmpbuf_sz = packsize;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c b/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c
index 2dba872..5a32515 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c
@@ -575,7 +575,7 @@ int MPID_nem_newmad_process_rdtype(MPID_Request **rreq_p, MPID_Datatype * dt_ptr
     }
     else
     {
-       int packsize = 0;
+       MPI_Aint packsize = 0;
        MPIR_Pack_size_impl(rreq->dev.user_count, rreq->dev.datatype, &packsize);
        rreq->dev.tmpbuf = MPIU_Malloc((size_t) packsize);
        MPIU_Assert(rreq->dev.tmpbuf);



More information about the discuss mailing list