mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-27 13:12:20 +08:00
fixed nccl init
This commit is contained in:
1 parent
4696e12641
commit
6c02afefca
1 file changed
+4
-1
@@ -379,7 +379,10 @@ class Trainer(TrainerIO):
|
||||
:param tries:
|
||||
:return:
|
||||
"""
|
||||
sleep(self.proc_rank*2)
|
||||
# hack to get nccl to stop throwing error... seems to be an nccl race condition
|
||||
if self.proc_rank > 0:
|
||||
sleep(10.0)
|
||||
|
||||
root_node = os.environ['SLURM_NODELIST'].split(' ')[0]
|
||||
os.environ['MASTER_ADDR'] = root_node
|
||||
os.environ['MASTER_PORT'] = f'{port}'
|
||||
|
||||
Reference in new issue
Block a user