From 540bdbb74f69321c07823742ddf145ceb19886c8 Mon Sep 17 00:00:00 2001 From: Varuna Jayasiri Date: Thu, 8 Nov 2018 09:03:08 +0530 Subject: [PATCH] mpi_util 'RCALL_NUM_GPU' fix --- mpi_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpi_util.py b/mpi_util.py index 7da01dc..d6a6ab7 100644 --- a/mpi_util.py +++ b/mpi_util.py @@ -46,7 +46,7 @@ def guess_available_gpus(n_gpus=None): cuda_visible_divices = os.environ['CUDA_VISIBLE_DEVICES'] cuda_visible_divices = cuda_visible_divices.split(',') return [int(n) for n in cuda_visible_divices] - if 'RCALL_NUM_GPU' not in os.environ: + if 'RCALL_NUM_GPU' in os.environ: n_gpus = int(os.environ['RCALL_NUM_GPU']) return list(range(n_gpus)) nvidia_dir = '/proc/driver/nvidia/gpus/'