🐛 Bug
When training a model using the Raster Vision pipeline with a "larger" datasets on a dual GPU setup, the process crashes after reaching the "Building datasets..." stage. The issue appears to be caused by a timeout during NCCL operations, specifically an ALLREDUCE operation. Reducing the number of scenes in the dataset allows the training to proceed. All while the GPU utilization is at 100% for a single GPU while the second one is idle.
Attempted Workarounds:
- Increasing the
TORCH_NCCL_HEARTBEAT_TIMEOUT_SEC environment variable did not resolve the issue as the new value was not applied and the timeout remains at 600000ms.
Disabling monitoring by setting TORCH_NCCL_ENABLE_MONITORING=0 avoids the timeout but disables essential monitoring, which is not ideal. Edit: False positive.
- Reducing the number of scenes (10 instead of 3500) in the dataset allows training to proceed
- Disabling heartbeat monitoring with
TORCH_NCCL_ENABLE_MONITORING=0 also did not solve this issue.
Logs
Logs captured with NCCL_DEBUG=INFO
building-panoptic:875384:875432 [1] NCCL INFO ncclCommInitRank comm 0x564b81859bd0 rank 1 nranks 2 cudaDev 1 nvmlDev 1 busId 110 commId 0x1a221728bd4a5a4a - Init COMPLETE
2024-11-18 14:43:22:rastervision.pytorch_learner.learner: INFO - Building datasets ...
[rank1]:[E1118 14:53:22.694659270 ProcessGroupNCCL.cpp:616] [Rank 1] Watchdog caught collective operation timeout: WorkNCCL(SeqNum=5, OpType=ALLREDUCE, NumelIn=1, NumelOut=1, Timeout(ms)=600000) ran for 600019 milliseconds before timing out.
🐛 Bug
When training a model using the Raster Vision pipeline with a "larger" datasets on a dual GPU setup, the process crashes after reaching the "Building datasets..." stage. The issue appears to be caused by a timeout during NCCL operations, specifically an ALLREDUCE operation. Reducing the number of scenes in the dataset allows the training to proceed. All while the GPU utilization is at 100% for a single GPU while the second one is idle.
Attempted Workarounds:
TORCH_NCCL_HEARTBEAT_TIMEOUT_SECenvironment variable did not resolve the issue as the new value was not applied and the timeout remains at 600000ms.Disabling monitoring by setting TORCH_NCCL_ENABLE_MONITORING=0 avoids the timeout but disables essential monitoring, which is not ideal.Edit: False positive.TORCH_NCCL_ENABLE_MONITORING=0also did not solve this issue.Logs
Logs captured with
NCCL_DEBUG=INFObuilding-panoptic:875384:875432 [1] NCCL INFO ncclCommInitRank comm 0x564b81859bd0 rank 1 nranks 2 cudaDev 1 nvmlDev 1 busId 110 commId 0x1a221728bd4a5a4a - Init COMPLETE 2024-11-18 14:43:22:rastervision.pytorch_learner.learner: INFO - Building datasets ... [rank1]:[E1118 14:53:22.694659270 ProcessGroupNCCL.cpp:616] [Rank 1] Watchdog caught collective operation timeout: WorkNCCL(SeqNum=5, OpType=ALLREDUCE, NumelIn=1, NumelOut=1, Timeout(ms)=600000) ran for 600019 milliseconds before timing out.