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.
This commit is contained in:
Yixin Lin 2022-04-17 12:25:17 -04:00 committed by GitHub
parent bb1bc50886
commit 0a9893e839
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,6 +108,7 @@ class SparseGP_MPI(SparseGP):
raise
self._fail_count += 1
elif flag==-1:
ret = None
break
else:
self._IN_OPTIMIZATION_ = False