@@ -41,7 +41,13 @@ and the generic solvers:
41
41
42
42
* ``util/ ``: linear algebra solvers and other routines.
43
43
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
45
51
=================
46
52
47
53
Any application that uses Microphysics will at minimum need to
@@ -67,7 +73,30 @@ solvers (ODE integration for the network and Newton-Raphson root
67
73
finding for the EOS) are separated from the specific implementations of
68
74
the microphysics.
69
75
70
- .. note ::
71
76
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 ``.
0 commit comments