ZC RO Bcast: Initialize _numPendingRORdmaTransfers with numZerocopyROops 97/5097/4
authorNitin Bhat <nbhat4@illinois.edu>
Tue, 16 Apr 2019 17:50:28 +0000 (12:50 -0500)
committerNitin Bhat <nbhat4@illinois.edu>
Thu, 18 Apr 2019 02:53:23 +0000 (21:53 -0500)
commit1223a51c7b4ad12bd21992f613527239d84505ac
tree121d6dd2db7b0ad57b0dcda5c41d785efab4043d
parent87be097d9d82404fb55d1e1cd8b23c698ad62f4e
ZC RO Bcast: Initialize _numPendingRORdmaTransfers with numZerocopyROops

Previously, _numPendingRORdmaTransfers was initialized to 0 and
incremented inside the readonlyGet method, which was called when
the RO variable was being unpacked. This caused a race condition
where the the first RDMA Get operation could be completed before
_numPendingRORdmaTransfers was incremented again for a second RO
variable. Hence, this fix initializes _numPendingRORdmaTransfers
before launching any RDMA operations to avoid completion of an
RDMA operation before _numPendingRORdmaTransfers is initialized
to the total number of RDMA RO variables.

Change-Id: Ie53ee802c3eabfbb2d0c3cf57776a9365fa050a7
src/ck-core/charm++.h
src/ck-core/ckrdma.C
src/ck-core/init.C