Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Jun 28, 2021
1 parent 765f70b commit 83e9bcb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytorch_lightning/plugins/training_type/ddp.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,11 @@ def post_dispatch(self) -> None:
self.cluster_environment.teardown()

def barrier(self, *args, **kwargs):
if torch_distrib.is_available() and torch_distrib.is_initialized():
if torch_distrib.is_initialized():
if self.global_rank == 0:
import time
print("sleeping to test barrier")
time.sleep(10)
torch_distrib.barrier(device_ids=self.determine_ddp_device_ids())

def broadcast(self, obj: object, src: int = 0) -> object:
Expand Down

0 comments on commit 83e9bcb

Please sign in to comment.