Skip to content

Commit

Permalink
Added comments suggested by Jim; Added missing inject flag for buffer…
Browse files Browse the repository at this point in the history
…ed send

Signed-off-by: Md <[email protected]>
  • Loading branch information
wrrobin committed Jan 7, 2019
1 parent 98ad407 commit 93e34bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/transport_ofi.h
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ void shmem_transport_put_signal_nbi(shmem_transport_ctx_t* ctx, void *target, co
};

do {
ret = fi_writemsg(ctx->ep, &msg, FI_DELIVERY_COMPLETE);
ret = fi_writemsg(ctx->ep, &msg, FI_DELIVERY_COMPLETE | FI_INJECT);
} while (try_again(ctx, ret, &polled));

SHMEM_TRANSPORT_OFI_CTX_UNLOCK(ctx);
Expand Down Expand Up @@ -785,6 +785,8 @@ void shmem_transport_put_signal_nbi(shmem_transport_ctx_t* ctx, void *target, co
};

do {
/* FI_FENCE assures completion of one or more (for fragmentation) prior puts through
* signal delivery */
ret = fi_atomicmsg(ctx->ep, &msg_signal, FI_DELIVERY_COMPLETE | FI_FENCE | FI_INJECT);
} while (try_again(ctx, ret, &polled));

Expand Down
2 changes: 2 additions & 0 deletions src/transport_portals4.h
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,8 @@ static inline
void shmem_transport_put_signal_nbi(shmem_transport_ctx_t* ctx, void *target, const void *source, size_t len,
uint64_t *sig_addr, uint64_t signal, int pe)
{
/* FIXME: Need to optimize non-blocking put with signal for Portals. Current implementation below keeps
* the "fence" in between data and signal put */
shmem_transport_put_nbi(ctx, target, source, len, pe);
shmem_transport_fence(ctx);
shmem_transport_put_scalar(ctx, sig_addr, &signal, sizeof(uint64_t), pe);
Expand Down

0 comments on commit 93e34bd

Please sign in to comment.