Commit fe576505 authored by Norio Yamaguchi's avatar Norio Yamaguchi Committed by Huiwei Lu
Browse files

Fix some build warnings in netmod-IB


Signed-off-by: default avatarHuiwei Lu <huiweilu@mcs.anl.gov>
parent dc563e5a
......@@ -128,7 +128,7 @@ static int MPID_nem_ib_rdmawr_to_init(uint64_t sz)
void *MPID_nem_ib_rdmawr_to_alloc(int nslots)
{
dprintf("rdmawr_to_alloc,nslots=%d\n", nslots);
void *start;
void *start = NULL;
int i;
for (i = 0; i < nslots; i++) {
//dprintf("MPID_nem_ib_rdmawr_to_alloc,free_list=%p\n", MPID_nem_ib_rdmawr_to_alloc_free_list);
......@@ -505,7 +505,6 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
MPID_nem_ib_com_t *conp;
struct ibv_qp_init_attr qp_init_attr;
struct ibv_sge *sge;
int mr_flags;
int i;
dprintf("MPID_nem_ib_com_open,port=%d,flag=%08x\n", ib_port, open_flag);
......@@ -725,7 +724,6 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
memset(conp->icom_mem, 0, sizeof(void **) * MPID_NEM_IB_COM_NBUF_RDMA);
conp->icom_msize = (int *) MPIU_Malloc(sizeof(int *) * MPID_NEM_IB_COM_NBUF_RDMA);
memset(conp->icom_msize, 0, sizeof(int *) * MPID_NEM_IB_COM_NBUF_RDMA);
mr_flags = IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_READ | IBV_ACCESS_REMOTE_WRITE;
/* RDMA-write-to local memory area */
conp->icom_msize[MPID_NEM_IB_COM_RDMAWR_TO] = MPID_NEM_IB_COM_RDMABUF_SZ;
......@@ -783,7 +781,6 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
memset(conp->icom_mem, 0, sizeof(void *) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
conp->icom_msize = (int *) MPIU_Malloc(sizeof(int) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
memset(conp->icom_msize, 0, sizeof(int) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
mr_flags = IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_READ | IBV_ACCESS_REMOTE_WRITE;
/* RDMA-write-from local memory area */
conp->icom_msize[MPID_NEM_IB_COM_SCRATCH_PAD_FROM] = MPID_NEM_IB_COM_SCRATCH_PAD_FROM_SZ;
......@@ -824,7 +821,6 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
memset(conp->icom_mem, 0, sizeof(void **) * MPID_NEM_IB_COM_NBUF_UD);
conp->icom_msize = (int *) MPIU_Malloc(sizeof(int *) * MPID_NEM_IB_COM_NBUF_UD);
memset(conp->icom_msize, 0, sizeof(int *) * MPID_NEM_IB_COM_NBUF_UD);
mr_flags = IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_READ | IBV_ACCESS_REMOTE_WRITE;
/* UD-write-from local memory area */
MPID_NEM_IB_COM_ERR_CHKANDJUMP(MPID_NEM_IB_COM_UDBUF_SZ <= 40, -1,
......@@ -845,7 +841,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
conp->icom_msize[MPID_NEM_IB_COM_UDWR_FROM], 0,
MPID_NEM_IB_COM_REG_MR_STICKY);
MPID_NEM_IB_COM_ERR_CHKANDJUMP(!conp->icom_mrlist[MPID_NEM_IB_COM_UDWR_FROM], -1,
dprintf("ibv_reg_mr failed with mr_flags=0x%x\n", mr_flags));
printf("ibv_reg_mr failed\n"));
/* UD-write-to local memory area */
/* addr to addr+39 are not filled, addr+40 to addr+length-1 are filled with payload */
......
......@@ -772,7 +772,7 @@ static inline void *MPID_nem_ib_rdmawr_from_alloc(uint32_t _sz)
static inline void MPID_nem_ib_rdmawr_from_free(const void *p, uint32_t _sz)
{
int clz;
uint32_t sz;
uint32_t sz _UNUSED_;
assert(_sz <= (1ULL << 31));
MPID_NEM_IB_RDMAWR_FROM_ALLOC_PREPROCESS_SZ;
void *q = MPID_NEM_IB_RDMAWR_FROM_ALLOC_ARENA_START(p);
......
......@@ -23,6 +23,12 @@
*/
#define MPID_NEM_IB_ONDEMAND
#ifdef __GNUC__
#define _UNUSED_ __attribute__ ((__unused__))
#else
#define _UNUSED_
#endif
typedef struct {
union ibv_gid gid;
uint16_t lid;
......
......@@ -271,7 +271,7 @@ int MPID_nem_ib_lmt_start_recv(struct MPIDI_VC *vc, struct MPID_Request *req, MP
{
int mpi_errno = MPI_SUCCESS;
int dt_contig;
MPIDI_msg_sz_t data_sz;
MPIDI_msg_sz_t data_sz _UNUSED_;
MPID_Datatype *dt_ptr;
MPI_Aint dt_true_lb;
MPID_nem_ib_vc_area *vc_ib = VC_IB(vc);
......
......@@ -605,7 +605,7 @@ int MPID_nem_ib_poll_eager(MPID_nem_ib_ringbuf_t * ringbuf)
int mpi_errno = MPI_SUCCESS;
int ibcom_errno;
struct MPIDI_VC *vc;
struct MPIDI_VC *vc = NULL;
MPID_nem_ib_vc_area *vc_ib;
//int result;
//struct ibv_wc cqe[MPID_NEM_IB_COM_MAX_CQ_HEIGHT_DRAIN];
......@@ -616,7 +616,7 @@ int MPID_nem_ib_poll_eager(MPID_nem_ib_ringbuf_t * ringbuf)
//MPID_nem_ib_tsc_poll = MPID_nem_ib_rdtsc();
uint16_t *remote_poll;
uint16_t *remote_poll = NULL;
switch (ringbuf->type) {
case MPID_NEM_IB_RINGBUF_EXCLUSIVE:
remote_poll = &VC_FIELD(ringbuf->vc, ibcom->rsr_seq_num_poll);
......@@ -1152,8 +1152,8 @@ int MPID_nem_ib_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req)
#endif
MPIDI_msg_sz_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
int dt_contig _UNUSED_;
MPI_Aint dt_true_lb _UNUSED_;
MPID_Datatype *dt_ptr;
MPIDI_Datatype_get_info(req->dev.user_count, req->dev.datatype,
dt_contig, data_sz, dt_ptr, dt_true_lb);
......@@ -1839,9 +1839,9 @@ int MPID_nem_ib_pkt_rma_lmt_getdone(MPIDI_VC_t * vc,
if (*req->cc_ptr == 1 &&
(reqFn == MPIDI_CH3_ReqHandler_ReqOpsComplete
|| reqFn == MPIDI_CH3_ReqHandler_GetSendComplete)) {
MPIDI_VC_t *vc = req->ch.vc;
MPIDI_VC_t *_vc = req->ch.vc;
int complete = 0;
mpi_errno = reqFn(vc, req, &complete);
mpi_errno = reqFn(_vc, req, &complete);
}
else {
MPIDI_CH3U_Request_complete(req);
......
......@@ -716,7 +716,7 @@ int MPID_nem_ib_send_progress(MPIDI_VC_t * vc)
int mpi_errno = MPI_SUCCESS;
MPID_nem_ib_vc_area *vc_ib = VC_IB(vc);
MPID_Request *sreq, *prev_sreq;
int req_type, msg_type;
int msg_type;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_IB_SEND_PROGRESS);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_IB_SEND_PROGRESS);
......@@ -740,7 +740,6 @@ int MPID_nem_ib_send_progress(MPIDI_VC_t * vc)
if (sreq) {
prev_sreq = NULL;
do {
req_type = MPIDI_Request_get_type(sreq);
msg_type = MPIDI_Request_get_msg_type(sreq);
MPIDI_CH3_Pkt_t *ch3_hdr = (MPIDI_CH3_Pkt_t *) sreq->dev.iov[0].MPID_IOV_BUF;
......
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