diff --git a/paddle/fluid/distributed/fleet_executor/dist_model.cc b/paddle/fluid/distributed/fleet_executor/dist_model.cc index c1408130b5e577e54a4062316a4868701338864d..cacd55e02a5e2a290e92ab8a0c77bfa0297b98ba 100644 --- a/paddle/fluid/distributed/fleet_executor/dist_model.cc +++ b/paddle/fluid/distributed/fleet_executor/dist_model.cc @@ -168,7 +168,7 @@ bool DistModel::Init() { if (!PrepareFeedAndFetch()) { return false; } - if (!CommInit()) { + if (config_.nranks > 1 && !CommInit()) { return false; } if (!PrepareFleetExe()) {