Skip to content

Commit

Permalink
Merge branch 'development' into avisc_species
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Aug 6, 2024
2 parents 8c57182 + 36c0aaf commit 48ebed2
Show file tree
Hide file tree
Showing 17 changed files with 75 additions and 44 deletions.
32 changes: 32 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# 24.08

* lazy QueueReduction has been enabled for the timing diagnostics
(#2926)

* The `job_info` file output now correctly labels the compute time
as GPU-hours instead of CPU-hours when running on GPUs (#2930)

* We can now output warnings when running on GPUs if you build
with `USE_GPU_PRINTF=TRUE`(#2923, #2928)

* Code clean-ups / sync with Microphysics (#2900, #2901, #2905,
#2906, #2909, #2912, #2919, #2922, #2932, #2933, #2936, #2938,
#2940)

* The area weighting in the diagnostics in `subch_planar` was fixed
(#2885)

* A script to produce a resolution study for the `circular_det`
problem was added (#2857)

* science problem updates: `xrb_layered` (#2917), `nova` (#2913),
`wdmerger` (#2907, #2918, #2931), `Detonation` (#2902)

* updated scaling results on Frontier (#2904, #2914, #2915)

* more exact Riemann solver clean-up (#2896, #2897, #2898)
and clean-ups to the two shock solvers (#2895)

* fix issues with eigenvectors and clang-tidy in the MHD solver
(#2880)

# 24.07

* Reorganizing of the existing 2-shock and HLL Riemann solvers
Expand Down
2 changes: 1 addition & 1 deletion Exec/hydro_tests/Noh/problem_bc_fill.H
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void problem_bc_fill(int i, int j, int k,

eos_t zone_state;
zone_state.rho = rho_init * std::pow(1.0_rt + time / r, AMREX_SPACEDIM - 1);
zone_state.p = pres_init * std::pow(zone_state.rho / rho_init, 1.0_rt + eos_gamma);
zone_state.p = pres_init * std::pow(zone_state.rho / rho_init, 1.0_rt + eos_rp::eos_gamma);
for (int n = 0; n < NumSpec; ++n) {
zone_state.xn[n] = 1.0_rt / static_cast<Real>(NumSpec);
}
Expand Down
8 changes: 4 additions & 4 deletions Exec/hydro_tests/RT/problem_initialize_state_data.H
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ void problem_initialize_state_data (int i, int j, int k,

if (r[AMREX_SPACEDIM-1] < problem::split[AMREX_SPACEDIM-1]) {
Real pres = problem::p0_base - problem::rho_1 * r[AMREX_SPACEDIM-1];
state(i,j,k,UEDEN) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEDEN) = pres / (eos_rp::eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_rp::eos_gamma - 1.0_rt);
} else {
Real pres = presmid - problem::rho_2 *
(r[AMREX_SPACEDIM-1] - problem::split[AMREX_SPACEDIM-1]);
state(i,j,k,UEDEN) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEDEN) = pres / (eos_rp::eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_rp::eos_gamma - 1.0_rt);
}

Real pertheight;
Expand Down
4 changes: 2 additions & 2 deletions Exec/hydro_tests/Vortices_LWAcoustics/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ void problem_initialize ()

// Define rho_0

problem::rho_0 = std::pow(problem::p_ref, 1.0_rt/eos_gamma);
problem::rho_0 = std::pow(problem::p_ref, 1.0_rt/eos_rp::eos_gamma);

// Define c_0

problem::c_0 = std::sqrt(eos_gamma * problem::p_ref / problem::rho_0);
problem::c_0 = std::sqrt(eos_rp::eos_gamma * problem::p_ref / problem::rho_0);

// Define r_c, radius of each vortex

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void problem_initialize_state_data (int i, int j, int k,

// internal energy

state(i,j,k,UEINT) = problem::p_ref / (eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = problem::p_ref / (eos_rp::eos_gamma - 1.0_rt);

// Total energy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ void problem_initialize_state_data (int i, int j, int k,
state(i,j,k,UMZ) = 0.0_rt;

// we are isentropic, so p = (dens/rho0)**Gamma_1
Real p = std::pow(state(i,j,k,URHO) / problem::rho0, eos_gamma);
Real eint = p / (eos_gamma - 1.0_rt);
Real p = std::pow(state(i,j,k,URHO) / problem::rho0, eos_rp::eos_gamma);
Real eint = p / (eos_rp::eos_gamma - 1.0_rt);

state(i,j,k,UEDEN) = eint;
state(i,j,k,UEINT) = eint;
Expand Down
4 changes: 2 additions & 2 deletions Exec/hydro_tests/gamma_law_bubble/Problem_Derive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ void ca_derrhopert(const Box& bx, FArrayBox& derfab, int dcomp, int /*ncomp*/,
if (problem::do_isentropic) {
Real z = static_cast<Real>(j) * dx[AMREX_SPACEDIM-1];
density[j] = problem::dens_base *
std::pow((gravity::const_grav * problem::dens_base * (eos_gamma - 1.0_rt) * z/
(eos_gamma * problem::pres_base) + 1.0_rt), 1.0_rt/(eos_gamma - 1.0_rt));
std::pow((gravity::const_grav * problem::dens_base * (eos_rp::eos_gamma - 1.0_rt) * z/
(eos_rp::eos_gamma * problem::pres_base) + 1.0_rt), 1.0_rt/(eos_rp::eos_gamma - 1.0_rt));
} else {
Real z = (static_cast<Real>(j) + 0.5_rt) * dx[AMREX_SPACEDIM-1];
density[j] = problem::dens_base * std::exp(-z/H);
Expand Down
4 changes: 2 additions & 2 deletions Exec/hydro_tests/gamma_law_bubble/initial_model.H
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ generate_initial_model(const int npts_model, const Real xmin, const Real xmax,

density = model_params.dens_base *
std::pow(gravity::const_grav * model_params.dens_base *
(eos_gamma - 1.0) * z /
(eos_gamma * model_params.p_base) + 1.0_rt, 1.0_rt/(eos_gamma - 1.0_rt));
(eos_rp::eos_gamma - 1.0) * z /
(eos_rp::eos_gamma * model_params.p_base) + 1.0_rt, 1.0_rt/(eos_rp::eos_gamma - 1.0_rt));

} else {
Real z = xmin + (static_cast<Real>(i) + 0.5_rt) * dx;
Expand Down
4 changes: 2 additions & 2 deletions Exec/hydro_tests/gamma_law_bubble/prob_util.H
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ gamma_law_initial_model(Real* const pressure, Real* const density, Real* const t
if (problem::do_isentropic) {
Real z = static_cast<Real>(j) * dx[AMREX_SPACEDIM-1];
density[j] = problem::dens_base *
std::pow((gravity::const_grav * problem::dens_base * (eos_gamma - 1.0_rt) * z/
(eos_gamma * problem::pres_base) + 1.0_rt), 1.0_rt/(eos_gamma - 1.0_rt));
std::pow((gravity::const_grav * problem::dens_base * (eos_rp::eos_gamma - 1.0_rt) * z/
(eos_rp::eos_gamma * problem::pres_base) + 1.0_rt), 1.0_rt/(eos_rp::eos_gamma - 1.0_rt));
} else {
Real z = (static_cast<Real>(j) + 0.5_rt) * dx[AMREX_SPACEDIM-1];
density[j] = problem::dens_base * std::exp(-z/H);
Expand Down
16 changes: 8 additions & 8 deletions Exec/hydro_tests/riemann_2d/problem_initialize_state_data.H
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ void problem_initialize_state_data(int i, int j, int k,

state(i, j, k, UMX) = state(i, j, k, URHO) * problem::ux_3;
state(i, j, k, UMY) = state(i, j, k, URHO) * problem::uy_3;
state(i, j, k, UEINT) = problem::p_3 / (eos_gamma - 1.0_rt);
state(i, j, k, UEDEN) = problem::p_3 / (eos_gamma - 1.0_rt)
state(i, j, k, UEINT) = problem::p_3 / (eos_rp::eos_gamma - 1.0_rt);
state(i, j, k, UEDEN) = problem::p_3 / (eos_rp::eos_gamma - 1.0_rt)
+ 0.5 * problem::rho_3 * problem::ux_3 * problem::ux_3
+ 0.5 * problem::rho_3 * problem::uy_3 * problem::uy_3;

Expand All @@ -66,9 +66,9 @@ void problem_initialize_state_data(int i, int j, int k,

state(i, j, k, UMX) = state(i, j, k, URHO) * problem::ux_4;
state(i, j, k, UMY) = state(i, j, k, URHO) * problem::uy_4;
state(i, j, k, UEINT) = problem::p_4 / (eos_gamma - 1.0_rt);
state(i, j, k, UEINT) = problem::p_4 / (eos_rp::eos_gamma - 1.0_rt);

state(i, j, k, UEDEN) = problem::p_4 / (eos_gamma - 1.0_rt)
state(i, j, k, UEDEN) = problem::p_4 / (eos_rp::eos_gamma - 1.0_rt)
+ 0.5 * problem::rho_4 * problem::ux_4 * problem::ux_4
+ 0.5 * problem::rho_4 * problem::uy_4 * problem::uy_4;

Expand All @@ -79,9 +79,9 @@ void problem_initialize_state_data(int i, int j, int k,

state(i, j, k, UMX) = state(i, j, k, URHO) * problem::ux_2;
state(i, j, k, UMY) = state(i, j, k, URHO) * problem::uy_2;
state(i, j, k, UEINT) = problem::p_2 / (eos_gamma - 1.0_rt);
state(i, j, k, UEINT) = problem::p_2 / (eos_rp::eos_gamma - 1.0_rt);

state(i, j, k, UEDEN) = problem::p_2 / (eos_gamma - 1.0_rt)
state(i, j, k, UEDEN) = problem::p_2 / (eos_rp::eos_gamma - 1.0_rt)
+ 0.5 * problem::rho_2 * problem::ux_2 * problem::ux_2
+ 0.5 * problem::rho_2 * problem::uy_2 * problem::uy_2;
} else if (xx > problem::center[0] & yy > problem::center[1])
Expand All @@ -91,9 +91,9 @@ void problem_initialize_state_data(int i, int j, int k,

state(i, j, k, UMX) = state(i, j, k, URHO) * problem::ux_1;
state(i, j, k, UMY) = state(i, j, k, URHO) * problem::uy_1;
state(i, j, k, UEINT) = problem::p_1 / (eos_gamma - 1.0_rt);
state(i, j, k, UEINT) = problem::p_1 / (eos_rp::eos_gamma - 1.0_rt);

state(i, j, k, UEDEN) = problem::p_1 / (eos_gamma - 1.0_rt)
state(i, j, k, UEDEN) = problem::p_1 / (eos_rp::eos_gamma - 1.0_rt)
+ 0.5 * problem::rho_1 * problem::ux_1 * problem::ux_1
+ 0.5 * problem::rho_1 * problem::uy_1 * problem::uy_1;
}
Expand Down
9 changes: 4 additions & 5 deletions Exec/mhd_tests/RT/problem_initialize_state_data.H
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ void problem_initialize_state_data (int i, int j, int k,
Real pres;
if (r[AMREX_SPACEDIM-1] < problem::split[AMREX_SPACEDIM-1]) {
pres = problem::p0_base - problem::rho_1 * r[AMREX_SPACEDIM-1];
state(i,j,k,UEDEN) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEDEN) = pres / (eos_rp::eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_rp::eos_gamma - 1.0_rt);
} else {
pres = presmid - problem::rho_2 * (r[AMREX_SPACEDIM-1] - problem::split[AMREX_SPACEDIM-1]);
state(i,j,k,UEDEN) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEDEN) = pres / (eos_rp::eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_rp::eos_gamma - 1.0_rt);
}

// doing it similar to 2d, will be something in x-z though
Expand All @@ -61,4 +61,3 @@ void problem_initialize_state_data (int i, int j, int k,

}
#endif

18 changes: 9 additions & 9 deletions Exec/science/wdmerger/ci-benchmarks/wdmerger_collision_2D.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
xmom -5.4964100651e+14 1.3559128302e+14
ymom -2.5530096328e+15 2.5530122744e+15
zmom 0 0
rho_E 7.4982062146e+11 5.0669247218e+24
rho_e 7.1077581849e+11 5.0640768325e+24
Temp 242288.68588 1409652233.4
rho_He4 8.693611703e-17 3.5999032939
rho_E 7.4982062146e+11 5.0669247219e+24
rho_e 7.1077581849e+11 5.0640768326e+24
Temp 242288.68588 1409652233.6
rho_He4 8.693611703e-17 3.599903302
rho_C12 3.4774446812e-05 7825956.6934
rho_O16 5.2161670217e-05 11739149.75
rho_Ne20 8.693611703e-17 181951.05614
rho_Mg24 8.693611703e-17 1192.7969442
rho_Si28 8.693611703e-17 6.6913701534
rho_S32 8.693611703e-17 0.00019493290914
rho_Ne20 8.693611703e-17 181951.0571
rho_Mg24 8.693611703e-17 1192.7969729
rho_Si28 8.693611703e-17 6.6913702949
rho_S32 8.693611703e-17 0.00019493291655
rho_Ar36 8.693611703e-17 1.9565534609e-05
rho_Ca40 8.693611703e-17 1.9565534331e-05
rho_Ti44 8.693611703e-17 1.9565534308e-05
Expand All @@ -25,5 +25,5 @@
grav_x -684991644 -51428.243166
grav_y -739606241.84 739606820.44
grav_z 0 0
rho_enuc -3.2975004417e+12 7.6429034637e+23
rho_enuc -2.7633982574e+12 7.6429034885e+23

2 changes: 1 addition & 1 deletion Source/driver/Castro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ Castro::read_params ()
// in Amr::InitAmr(), right before the ParmParse checks, so if the user opts to
// override our overriding, they can do so.

Amr::setComputeNewDtOnRegrid(1);
Amr::setComputeNewDtOnRegrid(true);

// Read in custom refinement scheme.

Expand Down
2 changes: 1 addition & 1 deletion Source/driver/_cpp_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ update_sources_after_reflux bool 1

# Castro was originally written assuming dx = dy = dz. This assumption is
# enforced at runtime. Setting allow_non_unit_aspect_zones = 1 opts out.
allow_non_unit_aspect_zones int 0
allow_non_unit_aspect_zones bool 0


#-----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Source/rotation/Castro_rotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ Castro::construct_new_rotation_source(MultiFab& source, MultiFab& state_old, Mul
{
const int IOProc = ParallelDescriptor::IOProcessorNumber();
Real run_time = ParallelDescriptor::second() - strt_time;

Real llevel = level;
#ifdef BL_LAZY
Lazy::QueueReduction( [=] () mutable {
#endif
ParallelDescriptor::ReduceRealMax(run_time,IOProc);

amrex::Print() << "Castro::construct_new_rotation_source() time = " << run_time << " on level " << level << "\n" << "\n";
amrex::Print() << "Castro::construct_new_rotation_source() time = " << run_time << " on level " << llevel << "\n" << "\n";
#ifdef BL_LAZY
});
#endif
Expand Down
2 changes: 1 addition & 1 deletion external/Microphysics
Submodule Microphysics updated 214 files
2 changes: 1 addition & 1 deletion external/amrex
Submodule amrex updated 101 files

0 comments on commit 48ebed2

Please sign in to comment.