Update batch comparison in statepoint load

This commit is contained in:
Patrick Shriwise 2023-02-16 17:52:23 -06:00
parent 648313fab1
commit 65852f4fbc

View file

@ -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