From 6144d6e16779b9d9b24336a5767d6abeb45f53c8 Mon Sep 17 00:00:00 2001
From: KyleKlenk <kyle.c.klenk@gmail.com>
Date: Tue, 12 Jul 2022 17:11:48 -0600
Subject: [PATCH] fixed issue with the server actor where we did not verify the
 batch value was present

---
 build/module_load.sh                             | 7 +++++++
 build/source/actors/summa_actor/summa_server.cpp | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100755 build/module_load.sh

diff --git a/build/module_load.sh b/build/module_load.sh
new file mode 100755
index 0000000..6359abc
--- /dev/null
+++ b/build/module_load.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+#### load modules if using Compute Canada or Copernicus ####
+module load gcc/9.3.0
+module load netcdf-fortran
+module load openblas
+module load caf
\ No newline at end of file
diff --git a/build/source/actors/summa_actor/summa_server.cpp b/build/source/actors/summa_actor/summa_server.cpp
index 41204bd..814a107 100644
--- a/build/source/actors/summa_actor/summa_server.cpp
+++ b/build/source/actors/summa_actor/summa_server.cpp
@@ -85,8 +85,8 @@ behavior summa_server(stateful_actor<summa_server_state>* self, std::string conf
             if (batch_to_send.has_value()) {
                 Batch verified_batch = batch_to_send.value();
                 verified_batch.assignedBatch(self->state.client_list[client_id].getHostname(), client);
-                self->send(client, batch_v, client_id, batch_to_send->getBatchID(), batch_to_send->getStartHRU(), 
-                    batch_to_send->getNumHRU(), self->state.config_path);
+                self->send(client, batch_v, client_id, verified_batch.getBatchID(), verified_batch.getStartHRU(), 
+                    verified_batch.getNumHRU(), self->state.config_path);
             } else {
                 aout(self) << "We Are Done - Telling Clients to exit \n";
                 for (std::vector<int>::size_type i = 0; i < self->state.client_list.size(); i++) {
-- 
GitLab