Skip to content

Commit 352de81

Browse files
authored
Merge branch 'development' into doc_nse_table_cell
2 parents 028666a + d90e290 commit 352de81

File tree

84 files changed

+1028
-1084
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1028
-1084
lines changed

.github/workflows/dependencies/dependencies_hip.sh

+11-9
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ sudo apt-key add rocm.gpg.key
3333

3434
source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ...
3535

36-
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${1-latest} ${UBUNTU_CODENAME} main" \
36+
VERSION=${1-6.3.2}
37+
38+
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${VERSION} ${UBUNTU_CODENAME} main" \
3739
| sudo tee /etc/apt/sources.list.d/rocm.list
3840
echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' \
3941
| sudo tee -a /etc/profile.d/rocm.sh
@@ -53,16 +55,16 @@ sudo apt-get install -y --no-install-recommends \
5355
libnuma-dev \
5456
libopenmpi-dev \
5557
openmpi-bin \
56-
rocm-dev \
57-
roctracer-dev \
58-
rocprofiler-dev \
59-
rocrand-dev \
60-
rocfft-dev \
61-
rocprim-dev \
62-
rocsparse-dev
58+
rocm-dev${VERSION} \
59+
roctracer-dev${VERSION} \
60+
rocprofiler-dev${VERSION} \
61+
rocrand-dev${VERSION} \
62+
rocfft-dev${VERSION} \
63+
rocprim-dev${VERSION} \
64+
rocsparse-dev${VERSION}
6365

6466
# hiprand-dev is a new package that does not exist in old versions
65-
sudo apt-get install -y --no-install-recommends hiprand-dev || true
67+
sudo apt-get install -y --no-install-recommends hiprand-dev${VERSION} || true
6668

6769
# activate
6870
#

.github/workflows/hip.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ concurrency:
88

99
jobs:
1010
hip-compile:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- uses: actions/checkout@v4
1414
with:
@@ -27,7 +27,7 @@ jobs:
2727
cd ../..
2828
2929
- name: Dependencies
30-
run: .github/workflows/dependencies/dependencies_hip.sh
30+
run: .github/workflows/dependencies/dependencies_hip.sh 6.3.2
3131

3232
- name: compile test_react with HIP (iso7)
3333
run: |

Docs/source/burn_cell.rst

+4-26
Original file line numberDiff line numberDiff line change
@@ -52,39 +52,17 @@ The parameters that affect the thermodynamics are:
5252

5353
* ``unit_test.temperature`` : the initial temperature
5454

55-
* ``unit_test.small_temp`` : the low temperature cutoff used in the equation of state
55+
The composition can be set either by specifying individual mass fractions
56+
or setting ``unit_test.uniform_xn`` as described in :ref:`sec:defining_unit_test_composition`.
5657

57-
* ``unit_test.small_dens`` : the low density cutoff used in the equation of state
58-
59-
The composition can be set either by setting each mass fraction explicitly via the
60-
parameters, ``unit_test.X1``, ``unit_test.X2``, ...,
61-
e.g.:
62-
63-
::
64-
65-
unit_test.X1 = 0.5
66-
unit_test.X2 = 0.2
67-
unit_test.X3 = 0.2
68-
unit_test.X4 = 0.1
69-
70-
where parameters up to ``X35`` are available. If the values don't sum to ``1``
71-
initially, then the test will do a normalization. This normalization can be
72-
disabled by setting:
58+
If the values don't sum to ``1`` initially, then the test will do a
59+
normalization. This normalization can be disabled by setting:
7360

7461
::
7562

7663
unit_test.skip_initial_normalization = 1
7764

7865

79-
Alternately, the composition can be set automatically by initializing all
80-
of the mass fractions equally (to $1/N$, where $N$ is the number of species),
81-
by setting:
82-
83-
::
84-
85-
unit_test.uniform_xn = 1
86-
87-
8866
Controlling time
8967
----------------
9068

Docs/source/comprehensive_tests.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _sec:comprehensive_tests:
2+
13
************************
24
Comprehensive Unit Tests
35
************************

Docs/source/design.rst

+37-8
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Structure
88
The high-level directory structure delineates the types of microphysics
99
and the generic solvers:
1010

11-
* ``conductivity``: thermal conductivity routines
11+
* ``conductivity/``: thermal conductivity routines
1212

13-
* ``constants``: fundamental constants
13+
* ``constants/``: fundamental constants
1414

15-
* ``Docs``: the sphinx source for this documentation
15+
* ``Docs/``: the sphinx source for this documentation
1616

1717
* ``EOS/``: the various equations of state
1818

@@ -41,7 +41,13 @@ and the generic solvers:
4141

4242
* ``util/``: linear algebra solvers and other routines.
4343

44-
Design Philosophy
44+
45+
.. note::
46+
47+
All quantities are assumed to be in CGS units, unless otherwise
48+
specified.
49+
50+
Design philosophy
4551
=================
4652

4753
Any application that uses Microphysics will at minimum need to
@@ -64,10 +70,33 @@ of the species defined by the network to interpret the state.
6470

6571
We try to maximize code reuse in the Microphysics source, so the
6672
solvers (ODE integration for the network and Newton-Raphson root
67-
finding for the EOS) is separated from the specific implementations of
73+
finding for the EOS) are separated from the specific implementations of
6874
the microphysics.
6975

70-
.. note::
7176

72-
All quantities are assumed to be in CGS units, unless otherwise
73-
specified.
77+
78+
GPU considerations
79+
==================
80+
81+
.. index:: GPUs
82+
83+
All of the Microphysics routines are written to run on GPUs. This is
84+
enabled in application codes by using the AMReX lambda-capturing
85+
mechanism (see the [AMReX GPU
86+
documentation](https://amrex-codes.github.io/amrex/docs_html/GPU.html)
87+
for more information).
88+
89+
This means leveraging the AMReX data-structures, macros, and
90+
functions. The unit tests (see :ref:`sec:unit_tests`) provide a good
91+
reference for how to interface the Microphysics solvers and physics
92+
terms with an AMReX-based code.
93+
94+
There are a few places where Microphysics behaves slightly differently
95+
when running on a CPU vs. a GPU:
96+
97+
* In the VODE integrator, we disable Jacobian-caching to save memory.
98+
See :ref:`ch:networks:integrators`.
99+
100+
* In general we disable printing from GPU kernels, due to register
101+
pressure. Some output can be enabled by compiling with
102+
``USE_GPU_PRINTF=TRUE``.

Docs/source/eos_cell.rst

+2-8
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,8 @@ The parameters that affect the thermodynamics are:
2828

2929
* ``unit_test.temperature`` : the initial temperature
3030

31-
* ``unit_test.small_temp`` : the low temperature cutoff used in the equation of state
32-
33-
* ``unit_test.small_dens`` : the low density cutoff used in the equation of state
34-
35-
The composition can be set in the same way as in ``burn_cell``, either
36-
by setting each mass fraction explicitly via the parameters,
37-
``unit_test.X1``, ``unit_test.X2``, ..., or forcing them to be all
38-
equal via ``unit_test.uniform_xn=1``.
31+
The composition can be set either by specifying individual mass fractions
32+
or setting ``unit_test.uniform_xn`` as described in :ref:`sec:defining_unit_test_composition`.
3933

4034

4135
Building and Running the Code

Docs/source/index.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ system.
4646
getting_started
4747
design
4848
data_structures
49-
autodiff
5049
rp_intro
5150

5251
.. toctree::
@@ -85,13 +84,15 @@ system.
8584
:hidden:
8685

8786
util
87+
autodiff
8888

8989
.. toctree::
9090
:maxdepth: 1
9191
:caption: Unit tests
9292
:hidden:
9393

9494
unit_tests
95+
unit_test_runtime_parameters
9596
comprehensive_tests
9697
one_zone_tests
9798

Docs/source/integrators.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ routine (at the moment this can be ``VODE``, ``BackwardEuler``, ``ForwardEuler``
8888
.. code-block:: c++
8989

9090
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
91-
void burner (burn_t& state, Real dt)
91+
void burner (burn_t& state, amrex::Real dt)
9292

9393
The input is a ``burn_t``.
9494

@@ -198,7 +198,7 @@ be computed as:
198198

199199
.. code-block:: c++
200200

201-
Array1D<Real, 1, NumSpec> y;
201+
amrex::Array1D<amrex::Real, 1, NumSpec> y;
202202
...
203203
for (int i = 1; i <= NumSpec; ++i) {
204204
y(i) = state.xn[i-1] * aion_inv[i-1];

Docs/source/jac_cell.rst

+7-6
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ The parameters that affect the thermodynamics are:
3838

3939
* ``unit_test.temperature`` : the initial temperature
4040

41-
* ``unit_test.small_temp`` : the low temperature cutoff used in the equation of state
41+
The composition can be set either by specifying individual mass fractions
42+
or setting ``unit_test.uniform_xn`` as described in :ref:`sec:defining_unit_test_composition`.
4243

43-
* ``unit_test.small_dens`` : the low density cutoff used in the equation of state
44+
If the values don't sum to ``1`` initially, then the test will do a
45+
normalization. This normalization can be disabled by setting:
4446

45-
While the mass fractions can be set individually (using
46-
``unit_test.X1``, ``unit_test.X2``, ...), it is recommended to use
47-
``unit_test.uniform_xn=1`` to initialize all the mass fractions to be
48-
equal.
47+
::
48+
49+
unit_test.skip_initial_normalization = 1
4950

5051

5152
Building and Running the Code

0 commit comments

Comments
 (0)