Skip to content

Commit

Permalink
Placeholder changes for RDMA dp, reader side failure handling
Browse files Browse the repository at this point in the history
  • Loading branch information
eisenhauer committed Jul 14, 2018
1 parent fc61ed3 commit d323fed
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion source/adios2/toolkit/sst/dp/rdma_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,28 @@ static void *RdmaReadRemoteMemory(CP_Services Svcs, DP_RS_Stream Stream_v,
return ret;
}

static void RdmaWaitForCompletion(CP_Services Svcs, void *Handle_v)
static void RdmaNotifyConnFailure(CP_Services Svcs, DP_RS_Stream Stream_v,
int FailedPeerRank)
{
Rdma_RS_Stream Stream = (Rdma_RS_Stream)
Stream_v; /* DP_RS_Stream is the return from InitReader */
CManager cm = Svcs->getCManager(Stream->CP_Stream);
Svcs->verbose(Stream->CP_Stream, "received notification that writer peer "
"%d has failed, failing any pending "
"requests\n",
FailedPeerRank);
// This is what EVPath does...
// FailRequestsToRank(Svcs, cm, Stream, FailedPeerRank);
}

/*
* RdmaWaitForCompletion should return 1 if successful, but 0 if the reads
* failed for some reason or were aborted by RdmaNotifyConnFailure()
*/
static int RdmaWaitForCompletion(CP_Services Svcs, void *Handle_v)
{
RdmaCompletionHandle Handle = (RdmaCompletionHandle)Handle_v;
int Ret = 1;
Svcs->verbose(
Handle->CPStream,
"Waiting for completion of memory read to rank %d, condition %d\n",
Expand All @@ -756,6 +775,7 @@ static void RdmaWaitForCompletion(CP_Services Svcs, void *Handle_v)
Handle->Rank, Handle->CMcondition);

free(Handle);
return Ret;
}

static void RdmaProvideTimestep(CP_Services Svcs, DP_WS_Stream Stream_v,
Expand Down Expand Up @@ -975,6 +995,7 @@ extern CP_DP_Interface LoadRdmaDP()
RdmaDPInterface.provideWriterDataToReader = RdmaProvideWriterDataToReader;
RdmaDPInterface.readRemoteMemory = RdmaReadRemoteMemory;
RdmaDPInterface.waitForCompletion = RdmaWaitForCompletion;
RdmaDPInterface.notifyConnFailure = RdmaNotifyConnFailure;
RdmaDPInterface.provideTimestep = RdmaProvideTimestep;
RdmaDPInterface.releaseTimestep = RdmaReleaseTimestep;
RdmaDPInterface.destroyReader = RdmaDestroyReader;
Expand Down

0 comments on commit d323fed

Please sign in to comment.