Logging/printing once in DistributedDataParallel

is there a correct way to do, instead of something like checking if the device is 0 ?
e.g. how to acquire a lock ? for logging/printing once on multi-processing settings

Thanks

I would suggest logging/printing on rank 0 process. Is there any reason not doing this?