From 3d04ca7e9389a8b171cdcc6b3901a6e28ff4ae95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Le=20Guyader?= <loic.le.guyader@xfel.eu> Date: Thu, 13 Apr 2023 09:47:33 +0200 Subject: [PATCH] Catch exception on non GPU environement --- src/toolbox_scs/routines/boz.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/toolbox_scs/routines/boz.py b/src/toolbox_scs/routines/boz.py index b90b7a8..1cf6fb9 100644 --- a/src/toolbox_scs/routines/boz.py +++ b/src/toolbox_scs/routines/boz.py @@ -28,6 +28,11 @@ try: _can_use_gpu = True except ModuleNotFoundError: _can_use_gpu = False + print('cupy module not installed') +except ImportError: + _can_use_gpu = False + print('Not on GPU') + __all__ = [ 'parameters', -- GitLab