Only show warning if in restart mode. Refs #3477 (#3478)

This commit is contained in:
April Novak 2025-07-03 09:10:12 -06:00 committed by GitHub
parent b6c6ac078b
commit dd8d621f0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -436,7 +436,8 @@ extern "C" int openmc_statepoint_load(const char* filename)
// Read batch number to restart at
read_dataset(file_id, "current_batch", simulation::restart_batch);
if (simulation::restart_batch >= settings::n_max_batches) {
if (settings::restart_run &&
simulation::restart_batch >= settings::n_max_batches) {
warning(fmt::format(
"The number of batches specified for simulation ({}) is smaller "
"than or equal to the number of batches in the restart statepoint file "