move checkpoint message to variable message

port
tangwei12 7 years ago
parent 8af8da4fe4
commit 5553adf85d

@ -236,17 +236,10 @@ void GRPCClient::AsyncCheckpointNotify(const std::string& ep,
CheckpointNotifyProcessor* s = new CheckpointNotifyProcessor(ch);
s->Prepare(time_out);
s->response_call_back_ = nullptr;
sendrecv::VariableMessage req;
req.set_varname(CHECKPOINT_SAVE_MESSAGE);
req.out_varname(dir);
auto call = s->stub_g_.PrepareUnaryCall(
s->context_.get(), "/sendrecv.SendRecvService/CheckpointNotify", req,
&cq_);
call->StartCall();
call->Finish(&s->reply_, &s->status_, reinterpret_cast<void*>(s));
req.set_out_varname(dir);
auto rpc = s->stub_->AsyncCheckpointNotify(s->context_.get(), req, &cq_);
rpc->Finish(&s->reply_, &s->status_, reinterpret_cast<void*>(s));

@ -329,7 +329,8 @@ void ListenAndServOp::RunImpl(const framework::Scope &scope,
// Write to a file of server selected port for python use.
SavePort();
if (sync_mode) {
RunSyncLoop(&executor, program, &recv_scope, prefetch_block_id_list);
RunSyncLoop(&executor, program, &recv_scope, prefetch_block_id_list,
checkpoint_point_block_id);
} else {
RunAsyncLoop(&executor, program);
}

Loading…
Cancel
Save