From 65852f4fbc8e2cbe702af558733aff0bae83d1a3 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Thu, 16 Feb 2023 17:52:23 -0600 Subject: [PATCH] Update batch comparison in statepoint load --- src/state_point.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/state_point.cpp b/src/state_point.cpp index 8ca0166c6..23538da59 100644 --- a/src/state_point.cpp +++ b/src/state_point.cpp @@ -403,10 +403,11 @@ void load_state_point() // Read batch number to restart at read_dataset(file_id, "current_batch", simulation::restart_batch); - if (simulation::restart_batch >= settings::n_batches) { - fatal_error(fmt::format("The number of batches specified for simiulation ({}) is smaller" - " than the number of batches in the restart statepoint file ({})", - settings::n_batches, simulation::restart_batch)); + if (simulation::restart_batch >= settings::n_max_batches) { + fatal_error(fmt::format( + "The number of batches specified for simiulation ({}) is smaller" + " than the number of batches in the restart statepoint file ({})", + settings::n_max_batches, simulation::restart_batch)); } // Logical flag for source present in statepoint file