From 1b177f2de3765bf66b6f521e61d4d8c9b782dff6 Mon Sep 17 00:00:00 2001
From: Marcin Kirsz <mkirsz@ed.ac.uk>
Date: Fri, 4 Oct 2024 12:56:16 +0100
Subject: [PATCH] Update

---
 trainer.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/trainer.h b/trainer.h
index dfc477d..f31873e 100644
--- a/trainer.h
+++ b/trainer.h
@@ -276,15 +276,15 @@ class MPI_Trainer_HOST {
           MPI_Recv (&w_rows_available, 1, MPI_INT, MPI_ANY_SOURCE, TadahCLI::WORK_TAG, MPI_COMM_WORLD, &status2);
           worker2 = status2.MPI_SOURCE;
           if (tr.worker==worker2) {throw std::runtime_error("worker and worker2 are the same."); }
-          if (w_rows_available==0 ) {
-            // give up on this worker and release him as there is no more work to be done
-            MPI_Send (0, 0, MPI_INT, worker2, TadahCLI::RELEASE_TAG, MPI_COMM_WORLD);
-            count++;
-          } 
-          else {
+          //if (w_rows_available==0 ) {
+          //  // give up on this worker and release him as there is no more work to be done
+          //  MPI_Send (0, 0, MPI_INT, worker2, TadahCLI::RELEASE_TAG, MPI_COMM_WORLD);
+          //  count++;
+          //} 
+          //else {
             // found a worker
             break;
-          }
+          //}
         }
         int rows_accepted = w_rows_available < rows_needed ? w_rows_available : rows_needed;
         MPI_Send (&worker2, 1, MPI_INT, tr.worker, TadahCLI::DATA_TAG, MPI_COMM_WORLD);
-- 
GitLab