From 0dd52981d0398a4e325b733611510e54818698ca Mon Sep 17 00:00:00 2001 From: Zhenwen Dai Date: Tue, 9 Feb 2016 16:48:23 +0000 Subject: [PATCH] get rid of mpi4py import --- GPy/util/gpu_init.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/GPy/util/gpu_init.py b/GPy/util/gpu_init.py index 0c496db3..94763d8b 100644 --- a/GPy/util/gpu_init.py +++ b/GPy/util/gpu_init.py @@ -10,15 +10,12 @@ gpu_device = None gpu_context = None MPI_enabled = False -try: - from mpi4py import MPI - MPI_enabled = True -except: - pass - - - def initGPU(): + try: + from mpi4py import MPI + MPI_enabled = True + except: + pass try: if MPI_enabled and MPI.COMM_WORLD.size>1: from .parallel import get_id_within_node