Skip to content

Commit

Permalink
only warn on rank 0
Browse files Browse the repository at this point in the history
  • Loading branch information
lroberts36 committed May 23, 2024
1 parent bceceeb commit 52035a6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/outputs/restart_hdf5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@ RestartReaderHDF5::MeshInfo RestartReaderHDF5::GetMeshInfo() const {
mesh_info.derefinement_count = ReadDataset<int>("/Blocks/derefinement_count");
} catch (const std::runtime_error &e) {
// File does not contain this dataset, so must be older. Set to default value of zero
PARTHENON_WARN(
"Restarting from an HDF5 file that doesn't contain /Blocks/derefinement_count. \n"
"If you are running with AMR, this may cause restarts to not be bitwise exact \n"
"with simulations that are run without restarting.");
if (Globals::my_rank == 0)
PARTHENON_WARN("Restarting from an HDF5 file that doesn't contain "
"/Blocks/derefinement_count. \n"
"If you are running with AMR, this may cause restarts to not be "
"bitwise exact \n"
"with simulations that are run without restarting.");
mesh_info.derefinement_count = std::vector<int>(mesh_info.nbtotal, 0);
}
return mesh_info;
Expand Down

0 comments on commit 52035a6

Please sign in to comment.