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 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
62 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
9179d21
Draft idea for copying executables to the original source directory f…
rfalgout Nov 18, 2024
2687afb
Fix SYCL build via cmake
victorapm Nov 20, 2024
018c605
Add targets: etags, distclean, uninstall + test fixes
victorapm Nov 20, 2024
1968f5a
Disabling uninstall target
victorapm Nov 20, 2024
ecdcf55
Remove duplicate
victorapm Nov 20, 2024
8dfb4e4
Change DPCT_ROOT to DPCTROOT
Nov 20, 2024
2f724c6
Merge branch 'cmake-hip' of github.com:hypre-space/hypre into cmake-hip
Nov 20, 2024
373661b
CMake debug build now matches debug flags set via configure
victorapm Nov 21, 2024
8eb54c4
Use ENABLE for pkg features
victorapm Nov 21, 2024
a5768c7
ENABLE_STRICT_CHECKING support via cmake
victorapm Nov 21, 2024
35d32f4
[Doc]: Add section about testing
victorapm Nov 21, 2024
512ab47
Fix issue with make distclean
victorapm Nov 21, 2024
4890e46
Fix make uninstall target
victorapm Nov 21, 2024
395b0c4
Fix: propagate compiler options to drivers
victorapm Nov 22, 2024
0055eeb
[Doc]: update section about AUTOTEST
victorapm Nov 22, 2024
e2b71bc
[Fix]: enforce C standard when not given by the user
victorapm Nov 22, 2024
0899168
Merge branch 'cmake-hip' of github.com:hypre-space/hypre into cmake-hip
victorapm Nov 22, 2024
dea751a
Minor fixes
victorapm Nov 23, 2024
6d72863
Adding cmbuild/.gitignore to keep the cmbuild directory
rfalgout Nov 26, 2024
a139a4c
Fix CUDA build on MSVC
victorapm Nov 28, 2024
d6bc5ee
Fix nvidia-smi search on Windows
victorapm Nov 28, 2024
65cd3d5
Ignore Windows executables
victorapm Nov 28, 2024
b678e65
Update cmake variables that are really internal
victorapm Nov 28, 2024
a44dfde
Fix LTO-related issues and add HYPRE_ENABLE_LTO build option
victorapm Dec 2, 2024
9649c9a
Updating cmake.sh autotest script to work with cmake build changes
rfalgout Dec 9, 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
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ HYPRE_config.h
autom4te.cache
src/TAGS
hypre/
cmbuild/
install/
AUTOTEST/*.dir
out/
.vscode
.vs

###############
# Documentation
Expand Down Expand Up @@ -53,6 +54,6 @@ src/test/struct
src/test/struct_migrate
src/test/zboxloop
src/examples/ex[0-9]
victorapm marked this conversation as resolved.
Show resolved Hide resolved
src/examples/ex1[0-6]
src/examples/ex1[0-8]
src/examples/ex5f
src/examples/ex12f
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