[ofa-general] Sending two integers via RDMA_WRITE
Zafar Gilani
zafargilani at gmail.com
Mon May 25 08:36:02 PDT 2009
Hi,
I am trying to send two integers (essentially a buf array of type uint32_t)
to the server via RDMA_WRITE method. The following is piece of code that I
rewrote:
++++++++++++++++++++++++++++++++++
buf[0] = strtoul(argv[2], NULL, 0);
buf[1] = strtoul(argv[3], NULL, 0);
printf("%d + %d = ", buf[0], buf[1]);
buf[0] = htonl(buf[0]);
buf[1] = htonl(buf[1]);
/* -----------------------------------
---- START - write operation 1 ----
----------------------------------- */
int c;
for(c = 0; c < 2; c++)
{
sge.addr = (uintptr_t) buf + ((uint32_t)c*sizeof(uint32_t));
sge.length = sizeof(uint32_t);
sge.lkey = mr->lkey;
send_wr.wr_id = (uint64_t)(c+1);//1;
send_wr.opcode = IBV_WR_RDMA_WRITE;
send_wr.sg_list = &sge;
send_wr.num_sge = 1;
send_wr.wr.rdma.rkey = ntohl(server_pdata.buf_rkey);
send_wr.wr.rdma.remote_addr = ntohll(server_pdata.buf_va);
if(ibv_post_send(cm_id->qp, &send_wr, &bad_send_wr))
return 1;
}
++++++++++++++++++++++++++++++++++
I receive no compilation errors but it does not write to remote memory. Any
suggestions of what might be wrong?
Thanks,
--
Syed Zafar ul Hussan Gilani | BIT-7
Research Student | CHPSC
MSP 2008-09
NUST SEECS | http://hpc.niit.edu.pk/~zafar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20090525/bb69096c/attachment.html>
More information about the general
mailing list