From 4efca79950543283bef47d594306eaf6d5d9f80c Mon Sep 17 00:00:00 2001 From: hsitaram Date: Mon, 5 Aug 2024 20:13:38 -0600 Subject: [PATCH] adding hypre documentation for building with CUDA (#4061) --- Docs/sphinx_documentation/source/LinearSolvers.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Docs/sphinx_documentation/source/LinearSolvers.rst b/Docs/sphinx_documentation/source/LinearSolvers.rst index ab0ba3506a9..ee3ebe0efcf 100644 --- a/Docs/sphinx_documentation/source/LinearSolvers.rst +++ b/Docs/sphinx_documentation/source/LinearSolvers.rst @@ -568,6 +568,19 @@ residual correction form of the original problem. To build Hypre, follow the nex 5.- Create an environment variable with the HYPRE directory -- HYPRE_DIR=/hypre_path/hypre/src/hypre +To use Hypre with CUDA, nvcc compiler is needed along with all other requirements for CPU (e.g. gcc, mpicc). It is very important that the GPU architecture for Hypre matches with that of AMReX. By default, Hypre assumes its architecture number to be 70 and it is best to build Hypre for multiple architectures by specifying multiple compute capability numbers (e.g. 80 and 90). + +:: + + 1.- git clone https://github.com/hypre-space/hypre.git + 2.- cd hypre/src + 3.- ./configure --with-cuda -—with-gpu-arch=’80 90' + (you can figure out the gpu arch from command line using + nvidia-smi --query-gpu=compute_cap --format=csv, if it gives 9.0, gpu-arch is 90) + 4.- make install + 5.- Create an environment variable with the HYPRE directory -- + HYPRE_DIR=/hypre_path/hypre/src/hypre + To use hypre, one must include ``amrex/Src/Extern/HYPRE`` in the build system. For examples of using hypre, we refer the reader to `ABecLaplacian`_ or `NodeTensorLap`_.