-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable BML to use hypre's GPU-capable sparse matrix routines
* Enables sparse matrix multiplication and addition on GPUs * Uses openMP offload to transfer BML data to hypre * Current implementation supports NVIDIA GPUs only * Supports only one precision build of hypre (single of double)
- Loading branch information
1 parent
fa390fd
commit 393f5ad
Showing
14 changed files
with
585 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# - Find the HYPRE library | ||
# | ||
# Usage: | ||
# find_package(HYPRE [REQUIRED] [QUIET] ) | ||
# | ||
# It sets the following variables: | ||
# HYPRE_FOUND ... true if HYPRE is found on the system | ||
# HYPRE_LIBRARY_DIRS ... full path to HYPRE library | ||
# HYPRE_INCLUDE_DIRS ... HYPRE include directory | ||
# HYPRE_LIBRARIES ... HYPRE libraries | ||
# | ||
# The following variables will be checked by the function | ||
# HYPRE_USE_STATIC_LIBS ... if true, only static libraries are found | ||
# HYPRE_ROOT ... if set, the libraries are exclusively searched | ||
# under this path | ||
|
||
#If environment variable HYPRE_ROOT is specified, it has same effect as HYPRE_ROOT | ||
if( NOT HYPRE_ROOT AND NOT $ENV{HYPRE_ROOT} STREQUAL "" ) | ||
set( HYPRE_ROOT $ENV{HYPRE_ROOT} ) | ||
# set library directories | ||
set(HYPRE_LIBRARY_DIRS ${HYPRE_ROOT}/lib) | ||
# set include directories | ||
set(HYPRE_INCLUDE_DIRS ${HYPRE_ROOT}/include) | ||
# set libraries | ||
find_library( | ||
HYPRE_LIBRARIES | ||
NAMES "HYPRE" | ||
PATHS ${HYPRE_ROOT} | ||
PATH_SUFFIXES "lib" | ||
NO_DEFAULT_PATH | ||
) | ||
set(HYPRE_FOUND TRUE) | ||
else() | ||
set(HYPRE_FOUND FALSE) | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
module load cmake | ||
module load cuda | ||
module load gcc/11.2.0 | ||
module load openblas | ||
|
||
export CUDA_TOOLKIT_ROOT_DIR=${CUDA_TOOLKIT_ROOT_DIR="/sw/summit/cuda/11.0.3"} | ||
|
||
rm -r build | ||
rm -r install | ||
|
||
MY_PATH=$(pwd) | ||
|
||
# change this to path of hypre installation. | ||
# build hypre with: ./configure --with-cuda --without-MPI CUCC=nvcc | ||
# using gcc-9 compilers. | ||
HYPRE_INSTALL_PATH="/ccs/home/osei/soft/CoPA/with-hypre/hypre/src/hypre" | ||
|
||
#get jsrun with full path | ||
JSRUN=$(which jsrun) | ||
echo ${JSRUN} | ||
|
||
export CC=${CC:=gcc} | ||
export FC=${FC:=gfortran} | ||
export CXX=${CXX:=g++} | ||
export BLAS_VENDOR=${BLAS_VENDOR:=OpenBLAS} | ||
export BML_OPENMP=${BML_OPENMP:=yes} | ||
export BML_OMP_OFFLOAD=${BML_OMP_OFFLOAD:=yes} | ||
export BML_HYPRE=${BML_HYPRE:=yes} | ||
export HYPRE_ROOT=${HYPRE_INSTALL_PATH} | ||
export INSTALL_DIR=${INSTALL_DIR:="${MY_PATH}/install"} | ||
export BML_TESTING=${BML_TESTING:=yes} | ||
export BML_COMPLEX=${BML_COMPLEX:=no} | ||
export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=Release} | ||
export EXTRA_LINK_FLAGS=${EXTRA_LINK_FLAGS:="-fopenmp -latomic -lm"} | ||
export BML_CUSPARSE=${BML_CUSPARSE:=no} | ||
export BML_COMPLEX=${BML_COMPLEX:=no} | ||
export BML_SYEVD=${BML_SYEVD:=no} | ||
|
||
#use jsrun to run tests on a compute node | ||
export BML_NONMPI_PRECOMMAND=${BML_NONMPI_PRECOMMAND:=${JSRUN}} | ||
export BML_NONMPI_PRECOMMAND_ARGS=${BML_NONMPI_PRECOMMAND_ARGS:="-n1;-a1;-g1;-c7"} | ||
|
||
./build.sh install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
#!/bin/bash | ||
|
||
#module purge | ||
module load cmake | ||
module load xl/2021.03.11-cuda-11.2.0 | ||
module load cuda/11.2.0 | ||
module load cmake/3.23.1 | ||
module load xl/2022.03.10-cuda-11.8.0 | ||
module load cuda/11.8.0 | ||
module load lapack/3.9.0-xl-2020.11.12 | ||
#module load essl | ||
export CUDA_TOOLKIT_ROOT_DIR=${CUDA_TOOLKIT_ROOT_DIR="/usr/tce/packages/cuda/cuda-11.2.0"} | ||
|
||
module load essl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.