From 9a5d76ef0e7a24db1393a8989e41ea90bdc07c2f Mon Sep 17 00:00:00 2001 From: hsitaram Date: Sun, 4 Aug 2024 15:29:31 -0600 Subject: [PATCH 1/2] adding hypre documentation for building with CUDA --- .../source/LinearSolvers.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Docs/sphinx_documentation/source/LinearSolvers.rst b/Docs/sphinx_documentation/source/LinearSolvers.rst index ab0ba3506a9..1a1139cd0af 100644 --- a/Docs/sphinx_documentation/source/LinearSolvers.rst +++ b/Docs/sphinx_documentation/source/LinearSolvers.rst @@ -568,6 +568,25 @@ 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`_. From 7afdd7d8f3d05d6a9f9225f91ce3035562a10878 Mon Sep 17 00:00:00 2001 From: hsitaram Date: Sun, 4 Aug 2024 15:46:27 -0600 Subject: [PATCH 2/2] trying to remove white spaces --- Docs/sphinx_documentation/source/LinearSolvers.rst | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Docs/sphinx_documentation/source/LinearSolvers.rst b/Docs/sphinx_documentation/source/LinearSolvers.rst index 1a1139cd0af..ee3ebe0efcf 100644 --- a/Docs/sphinx_documentation/source/LinearSolvers.rst +++ b/Docs/sphinx_documentation/source/LinearSolvers.rst @@ -568,21 +568,15 @@ 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). +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’ + 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) + 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