-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make a global variable for whether simulation is a restart (#1179)
* Set is_restart * Add soft equivalence * soft_equiv used for testing * CHANGELOG, test_kokkos_abstraction * copyright * Oops wrong var * Oops comparing error and reference * Update src/utils/robust.hpp Co-authored-by: Jonah Miller <[email protected]> * style * naming * Make code more self-documenting --------- Co-authored-by: Jonah Miller <[email protected]>
- Loading branch information
Showing
7 changed files
with
32 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
// Copyright(C) 2014 James M. Stone <[email protected]> and other code contributors | ||
// Licensed under the 3-clause BSD License, see LICENSE file for details | ||
//======================================================================================== | ||
// (C) (or copyright) 2020-2021. Triad National Security, LLC. All rights reserved. | ||
// (C) (or copyright) 2020-2024. Triad National Security, LLC. All rights reserved. | ||
// | ||
// This program was produced under U.S. Government contract 89233218CNA000001 for Los | ||
// Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC | ||
|
@@ -30,8 +30,9 @@ namespace Globals { | |
int nghost; | ||
|
||
// 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 | ||
int my_rank; // MPI rank of this process | ||
int nranks; // total number of MPI ranks | ||
bool is_restart; // Whether this simulation is restarted from a checkpoint file | ||
|
||
// sparse configuration values that are needed in various places | ||
SparseConfig sparse_config; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
// Copyright(C) 2014 James M. Stone <[email protected]> and other code contributors | ||
// Licensed under the 3-clause BSD License, see LICENSE file for details | ||
//======================================================================================== | ||
// (C) (or copyright) 2020-2021. Triad National Security, LLC. All rights reserved. | ||
// (C) (or copyright) 2020-2024. Triad National Security, LLC. All rights reserved. | ||
// | ||
// This program was produced under U.S. Government contract 89233218CNA000001 for Los | ||
// Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC | ||
|
@@ -36,6 +36,7 @@ struct SparseConfig { | |
}; | ||
|
||
extern int my_rank, nranks, nghost; | ||
extern bool is_restart; | ||
|
||
extern SparseConfig sparse_config; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters