Skip to content

Commit

Permalink
Set is_restart
Browse files Browse the repository at this point in the history
  • Loading branch information
brryan committed Sep 21, 2024
1 parent e0c85cc commit fda5ac9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ struct SparseConfig {
};

extern int my_rank, nranks, nghost;
extern bool is_restart;

extern SparseConfig sparse_config;

Expand Down
2 changes: 2 additions & 0 deletions src/parthenon_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fda5ac9

Please sign in to comment.