diff --git a/paddle/fluid/operators/listen_and_serv_op.cc b/paddle/fluid/operators/listen_and_serv_op.cc index 8acbf82025..7fb7f07a61 100644 --- a/paddle/fluid/operators/listen_and_serv_op.cc +++ b/paddle/fluid/operators/listen_and_serv_op.cc @@ -101,6 +101,7 @@ void ListenAndServOp::RunSyncLoop(framework::Executor *executor, framework::Scope *recv_scope, framework::BlockDesc *prefetch_block) const { auto fan_in = Attr("Fanin"); + auto checkpoint = Attr("Checkpoint"); size_t num_blocks = program->Size(); PADDLE_ENFORCE_GE(num_blocks, 2, @@ -188,6 +189,18 @@ void ListenAndServOp::RunSyncLoop(framework::Executor *executor, for (auto &var : sparse_vars) { var->GetMutable()->mutable_rows()->clear(); } + + /******************** CHECK POINT ***********************/ + std::vector all_vars = recv_scope.LocalVarNames(); + + std::vector::iterator it; + for (it = all_vars.begin(); it != all_vars.end(); it++) { + VLOG(2) << "Checkpoint Var: " << *it; + break; + } + + /******************** CHECK POINT ***********************/ + rpc_service_->SetCond(1); // FIXME(typhoonzero): use another condition to sync wait clients get. rpc_service_->WaitClientGet(fan_in);