From 0a9893e839f3c2a06831162fc9f0ee0793bb296d Mon Sep 17 00:00:00 2001 From: Yixin Lin <1heart@users.noreply.github.com> Date: Sun, 17 Apr 2022 12:25:17 -0400 Subject: [PATCH] Fix rank>0 thread exiting during SparseGP multiprocessing (#731) If you run mpiexec -n 2 on any code to try to use MPI multiprocessing for SparseGPRegression, it crashes (see #618) because the rank>1 processes do not have ret defined. --- GPy/core/sparse_gp_mpi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/GPy/core/sparse_gp_mpi.py b/GPy/core/sparse_gp_mpi.py index d9c29a2f..d747ac83 100644 --- a/GPy/core/sparse_gp_mpi.py +++ b/GPy/core/sparse_gp_mpi.py @@ -108,6 +108,7 @@ class SparseGP_MPI(SparseGP): raise self._fail_count += 1 elif flag==-1: + ret = None break else: self._IN_OPTIMIZATION_ = False