Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake updates #1181

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
46916f3
Add HYPRE_Setup*Toolkit.cmake files
victorapm Sep 13, 2024
7583390
Add HYPRE_USING_GPU to define C++ source files
victorapm Sep 13, 2024
d79a204
Initial working version for HIP support
victorapm Sep 13, 2024
777875d
Add summary table + misc improvements
victorapm Sep 14, 2024
8690017
Change to modern CMake practice
victorapm Sep 14, 2024
31b0d97
Remove unused variable
victorapm Sep 14, 2024
f7c411f
Add configure_mpi_target function
victorapm Sep 14, 2024
25491ae
Modernizing CUDA cmake build
victorapm Sep 15, 2024
1fda469
Add missing HYPRE_CUDA/HIP_CALL macros
victorapm Sep 15, 2024
f936f14
Allow CUDA/HIP builds with specific toolkit locations
victorapm Sep 15, 2024
ee9f9d5
Improve CUDA and HIP builds robustness
victorapm Sep 16, 2024
f4d3f4d
Adjustment to run nvidia-smi to detect cuda arch
victorapm Sep 16, 2024
329729f
Simplify build options setup with set_conditional_var + Simplify GPU …
victorapm Sep 16, 2024
c7da232
Add setup_tpl to simplify TPLs usage
victorapm Sep 17, 2024
c1f9961
Add find_package support to setup_tpl
victorapm Sep 17, 2024
3859516
Add VERSION and SOVERSION info
victorapm Sep 17, 2024
5b8a310
Modernize shared lib build: improve dependency linkage and CMake setup
victorapm Sep 18, 2024
6e08c7d
Top-level CMakeLists refactoring
victorapm Sep 21, 2024
fcb58e6
Simplify build with set_hypre_option
victorapm Sep 21, 2024
14f58d8
Add ensure_options_match/differ macros
victorapm Sep 22, 2024
657d0d5
Fix target: CUDAToolkit -> CUDA
victorapm Sep 24, 2024
34cd9cd
Improve dependency search in HYPREConfig.cmake
victorapm Sep 24, 2024
9212a93
Adjustments
victorapm Sep 27, 2024
c032f71
Merge branch 'master' into cmake-hip
victorapm Sep 27, 2024
254f586
Merge branch 'master' into cmake-hip
victorapm Oct 5, 2024
0b79d5a
Merge branch 'master' into cmake-hip
victorapm Oct 16, 2024
f60f359
Update SOVERSION for consistency with ABI approach in hypre
victorapm Oct 16, 2024
1c9fb99
Merge branch 'master' into cmake-hip
victorapm Oct 17, 2024
35a8c91
cmake: update soversion (#1164)
junghans Oct 17, 2024
b4a5fbe
Merge branch 'master' into cmake-hip
victorapm Nov 8, 2024
d32a7dc
Remove redundant options + use cache internal
victorapm Nov 8, 2024
de4e0a8
Update CMake documentation
victorapm Nov 9, 2024
c0bd265
Fix a few documentation warnings
victorapm Nov 9, 2024
3c60a47
Apply astyle
victorapm Nov 9, 2024
dd81c97
New tests + CTest support + Doc fixes
victorapm Nov 11, 2024
0954a4b
Fix typo involving BLAS/LAPACK variables
victorapm Nov 15, 2024
2512cf3
Fix typo involving BLAS/LAPACK variables
victorapm Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions AUTOTEST/machine-lassen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,17 @@ module list cmake/3.16.8 |& grep "None found"
mo="-j"

# CUDA with UM + CMake
co="-DCMAKE_C_COMPILER=$(which xlc) -DCMAKE_CXX_COMPILER=$(which xlc++) -DCMAKE_CUDA_COMPILER=$(which nvcc) -DMPI_C_COMPILER=$(which mpicc) -DMPI_CXX_COMPILER=$(which mpicxx) -DHYPRE_WITH_CUDA=ON -DHYPRE_ENABLE_UNIFIED_MEMORY=ON -DCMAKE_BUILD_TYPE=Debug -DHYPRE_ENABLE_PERSISTENT_COMM=ON -DHYPRE_ENABLE_DEVICE_POOL=ON -DHYPRE_WITH_EXTRA_CFLAGS="\'"-qsuppress=1500-029"\'" -DHYPRE_WITH_EXTRA_CXXFLAGS="\'"-qsuppress=1500-029"\'" -DHYPRE_CUDA_SM=70"
co="-DCMAKE_C_COMPILER=$(which xlc) -DCMAKE_CXX_COMPILER=$(which xlc++) -DCMAKE_CUDA_COMPILER=$(which nvcc) -DMPI_C_COMPILER=$(which mpicc) -DMPI_CXX_COMPILER=$(which mpicxx) -DHYPRE_WITH_CUDA=ON -DHYPRE_ENABLE_UNIFIED_MEMORY=ON -DCMAKE_BUILD_TYPE=Debug -DHYPRE_ENABLE_PERSISTENT_COMM=ON -DHYPRE_ENABLE_DEVICE_POOL=ON -DHYPRE_WITH_EXTRA_CFLAGS="\'"-qsuppress=1500-029"\'" -DHYPRE_WITH_EXTRA_CXXFLAGS="\'"-qsuppress=1500-029"\'" -DCMAKE_CUDA_ARCHITECTURES=70"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo
./renametest.sh cmake $output_dir/cmake-cuda-um-ij

# CUDA with UM [shared library] + CMake
co="-DCMAKE_C_COMPILER=$(which xlc) -DCMAKE_CXX_COMPILER=$(which xlc++) -DCMAKE_CUDA_COMPILER=$(which nvcc) -DMPI_C_COMPILER=$(which mpicc) -DMPI_CXX_COMPILER=$(which mpicxx) -DHYPRE_WITH_CUDA=ON -DHYPRE_ENABLE_UNIFIED_MEMORY=ON -DCMAKE_BUILD_TYPE=Debug -DHYPRE_WITH_OPENMP=ON -DHYPRE_ENABLE_HOPSCOTCH=ON -DHYPRE_ENABLE_SHARED=ON -DHYPRE_WITH_EXTRA_CFLAGS="\'"-qsuppress=1500-029"\'" -DHYPRE_WITH_EXTRA_CXXFLAGS="\'"-qsuppress=1500-029 "\'" -DHYPRE_CUDA_SM=70"
co="-DCMAKE_C_COMPILER=$(which xlc) -DCMAKE_CXX_COMPILER=$(which xlc++) -DCMAKE_CUDA_COMPILER=$(which nvcc) -DMPI_C_COMPILER=$(which mpicc) -DMPI_CXX_COMPILER=$(which mpicxx) -DHYPRE_WITH_CUDA=ON -DHYPRE_ENABLE_UNIFIED_MEMORY=ON -DCMAKE_BUILD_TYPE=Debug -DHYPRE_WITH_OPENMP=ON -DHYPRE_ENABLE_HOPSCOTCH=ON -DHYPRE_ENABLE_SHARED=ON -DHYPRE_WITH_EXTRA_CFLAGS="\'"-qsuppress=1500-029"\'" -DHYPRE_WITH_EXTRA_CXXFLAGS="\'"-qsuppress=1500-029 "\'" -DCMAKE_CUDA_ARCHITECTURES=70"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo
./renametest.sh cmake $output_dir/cmake-cuda-um-shared

# CUDA w.o UM + CMake
co="-DCMAKE_C_COMPILER=$(which xlc) -DCMAKE_CXX_COMPILER=$(which xlc++) -DCMAKE_CUDA_COMPILER=$(which nvcc) -DMPI_C_COMPILER=$(which mpicc) -DMPI_CXX_COMPILER=$(which mpicxx) -DHYPRE_WITH_CUDA=ON -DCMAKE_BUILD_TYPE=Debug -DHYPRE_WITH_EXTRA_CFLAGS="\'"-qsuppress=1500-029"\'" -DHYPRE_WITH_EXTRA_CXXFLAGS="\'"-qsuppress=1500-029"\'" -DHYPRE_CUDA_SM=70"
co="-DCMAKE_C_COMPILER=$(which xlc) -DCMAKE_CXX_COMPILER=$(which xlc++) -DCMAKE_CUDA_COMPILER=$(which nvcc) -DMPI_C_COMPILER=$(which mpicc) -DMPI_CXX_COMPILER=$(which mpicxx) -DHYPRE_WITH_CUDA=ON -DCMAKE_BUILD_TYPE=Debug -DHYPRE_WITH_EXTRA_CFLAGS="\'"-qsuppress=1500-029"\'" -DHYPRE_WITH_EXTRA_CXXFLAGS="\'"-qsuppress=1500-029"\'" -DCMAKE_CUDA_ARCHITECTURES=70"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo
./renametest.sh cmake $output_dir/cmake-cuda-nonum-struct

Expand All @@ -169,4 +169,3 @@ for errfile in $( find $output_dir ! -size 0 -name "*.err" )
do
echo $errfile >&2
done

21 changes: 21 additions & 0 deletions AUTOTEST/machine-tioga.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,27 @@ ro="-ij-noilu -ams -struct -sstruct -rt -D HYPRE_NO_SAVED"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro
./renametest.sh basic $output_dir/basic-hip-cpu

####################################
## HIP + CMake build (only) tests ##
####################################

module -q load cmake/3.24.2

# HIP without UM + CMake (no run)
co="-DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=CC -DMPI_C_COMPILER=cc -DMPI_CXX_COMPILER=CC -DHYPRE_WITH_HIP=ON -DCMAKE_HIP_ARCHITECTURES=gfx90a -DCMAKE_BUILD_TYPE=Debug -DHYPRE_BUILD_TESTS=ON"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo
./renametest.sh cmake $output_dir/cmake-hip-nonum

# HIP with UM + Shared library + CMake (no run)
co="-DBUILD_SHARED_LIBS=ON -DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=CC -DMPI_C_COMPILER=cc -DMPI_CXX_COMPILER=CC -DHYPRE_WITH_HIP=ON -DCMAKE_HIP_ARCHITECTURES=gfx90a -DHYPRE_ENABLE_UNIFIED_MEMORY=ON -DCMAKE_BUILD_TYPE=Debug -DHYPRE_BUILD_TESTS=ON"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo
./renametest.sh cmake $output_dir/cmake-hip-um-shared

# CPU + CMake (no run)
co="-DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=CC -DMPI_C_COMPILER=cc -DMPI_CXX_COMPILER=CC -DCMAKE_BUILD_TYPE=Debug -DHYPRE_BUILD_TESTS=ON"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo
./renametest.sh cmake $output_dir/cmake-cpu

# Echo to stderr all nonempty error files in $output_dir
for errfile in $( find $output_dir ! -size 0 -name "*.err" )
do
Expand Down
Loading