From 21a8c67c66fdb490fb532081c6661fc87574b4e9 Mon Sep 17 00:00:00 2001
From: Giovanni La Mura <giovanni.lamura@inaf.it>
Date: Tue, 14 May 2024 21:03:21 +0200
Subject: [PATCH] Fix inversion error logging and calculation stopping

---
 src/cluster/cluster.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cluster/cluster.cpp b/src/cluster/cluster.cpp
index 44bfefed..a5664ef7 100644
--- a/src/cluster/cluster.cpp
+++ b/src/cluster/cluster.cpp
@@ -223,7 +223,7 @@ void cluster(const string& config_file, const string& data_file, const string& o
 	  delete time_logger;
 	  delete sconf;
 	  delete gconf;
-	  return jer;
+	  return;
 	}
 
 	// here go the calls that send data to be duplicated on other MPI processes from process 0 to others, using MPI broadcasts, but only if MPI is actually used
@@ -639,7 +639,7 @@ int cluster_jxi488_cycle(int jxi488, ScattererConfiguration *sconf, GeometryConf
   logger->log(message);
   if (jer != 0) {
     message = "ERROR: matrix inversion ended with error code " + to_string(jer) + ".\n";
-    logger.err(message);
+    logger->err(message);
     return jer;
     // break; // jxi488 loop: goes to memory clean
   }
-- 
GitLab