From 36b9370412554cfa8f28735e380ebcfbd1b3688f Mon Sep 17 00:00:00 2001 From: "Benedikt J. Daurer" Date: Thu, 21 Mar 2024 15:23:33 +0000 Subject: [PATCH] Wrap nccl.get_unique_id in try/except (#549) --- ptypy/accelerate/cuda_cupy/multi_gpu.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ptypy/accelerate/cuda_cupy/multi_gpu.py b/ptypy/accelerate/cuda_cupy/multi_gpu.py index 79f511423..6ccbce9a7 100644 --- a/ptypy/accelerate/cuda_cupy/multi_gpu.py +++ b/ptypy/accelerate/cuda_cupy/multi_gpu.py @@ -98,7 +98,10 @@ def __init__(self): # get a unique identifier for the NCCL communicator and # broadcast it to all MPI processes (assuming one device per process) if self.rank == 0: - self.id = nccl.get_unique_id() + try: + self.id = nccl.get_unique_id() + except: + self.id = None else: self.id = None