diff --git a/src/globals.cpp b/src/globals.cpp index 139a01fbddf6..16ae9b6daac5 100644 --- a/src/globals.cpp +++ b/src/globals.cpp @@ -29,6 +29,8 @@ namespace Globals { int nghost; +bool is_restart; + // all of these global variables are set at the start of main(): int my_rank; // MPI rank of this process int nranks; // total number of MPI ranks diff --git a/src/globals.hpp b/src/globals.hpp index 870a0803d8ce..ad0daafe6a4b 100644 --- a/src/globals.hpp +++ b/src/globals.hpp @@ -36,6 +36,7 @@ struct SparseConfig { }; extern int my_rank, nranks, nghost; +extern bool is_restart; extern SparseConfig sparse_config; diff --git a/src/parthenon_manager.cpp b/src/parthenon_manager.cpp index b0ec6ac971ae..26b5909e8775 100644 --- a/src/parthenon_manager.cpp +++ b/src/parthenon_manager.cpp @@ -70,6 +70,8 @@ ParthenonStatus ParthenonManager::ParthenonInitEnv(int argc, char *argv[]) { Globals::nranks = 1; #endif // MPI_PARALLEL + Globals::is_restart = IsRestart(); + Kokkos::initialize(argc, argv); // pgrete: This is a hack to disable allocation tracking until the Kokkos