Skip to content

feat: Advance HIP support #3498

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

Draft
wants to merge 79 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
73eab60
Fix runtime issue with MemoryInfo
victorapm Dec 14, 2024
6618e7b
Fix runtime issue with CommunicationTools
victorapm Dec 14, 2024
f6fb4b9
Fix usage of version macros
victorapm Dec 14, 2024
2d2dd64
Use rocSPARSE's SpGEMM with HIP
victorapm Dec 14, 2024
104baff
Update LvArray
victorapm Dec 15, 2024
de3d256
Update LvArray
victorapm Dec 15, 2024
caff854
LvArray
victorapm Dec 15, 2024
db5b03a
LvArray
victorapm Dec 15, 2024
bf1734e
LvArray
victorapm Dec 15, 2024
f226031
Add TPL include to tioga-base
victorapm Dec 15, 2024
1f56d51
Create amdgpu-base.cmake
victorapm Dec 15, 2024
e5521f3
LvArray
victorapm Dec 15, 2024
3ff69c8
Remove old limitation
victorapm Dec 15, 2024
890ce42
LvArray
victorapm Dec 15, 2024
292eac7
Add workaround for link issue with cce-18
victorapm Dec 15, 2024
5c93fc9
Resolve compilation warnings
victorapm Dec 19, 2024
4737637
Check SuiteSparse presence
victorapm Dec 19, 2024
dc805b1
Link flag workaround
victorapm Dec 19, 2024
555973c
Add tuo host configs
victorapm Dec 19, 2024
38698bf
LvArray hash
victorapm Dec 19, 2024
8323d86
add some memory output info in the newton loop
rrsettgast Dec 20, 2024
010fdc0
LvArray hash
victorapm Dec 21, 2024
b0bd42d
Minor
victorapm Dec 21, 2024
e8c03bf
Fix MemoryUsageOutput
victorapm Dec 31, 2024
6bfc7af
Fix unused parameter warning
victorapm Dec 31, 2024
fad14d0
Minor fix
victorapm Dec 31, 2024
500bf64
Merge branch 'develop' into feature/paludettomag1/hip
victorapm May 7, 2025
537b873
Update blt
victorapm May 8, 2025
c28176c
Merge branch 'develop' into feature/paludettomag1/hip
victorapm May 8, 2025
9d041b2
Add tuo-cce-19-rocm-6.4.0 host config
victorapm May 8, 2025
56f3daa
Comment out VEM kernels
victorapm May 8, 2025
c6687fa
Add physics-based scaling option
victorapm May 26, 2025
0f650fe
Merge branch 'develop' into feature/paludettomag1/hip
victorapm May 30, 2025
af55bba
Fix build with/without SuperLU and SuiteSparse
victorapm May 31, 2025
a4cf2eb
Add matrix host configs
victorapm May 31, 2025
2bbb7cb
Update LvArray hash
victorapm May 31, 2025
362b971
Merge branch 'develop' into feature/paludettomag1/physicsScaling
victorapm May 31, 2025
dd00e7f
Testing MGR parameters
victorapm May 31, 2025
77a5661
Merge branch 'feature/paludettomag1/physicsScaling' into feature/palu…
victorapm May 31, 2025
d1f3aa8
Add kernel build options
victorapm Jun 2, 2025
19f78e3
Change Hypre APIs: Elm -> Pointwise
victorapm Jun 2, 2025
900d5e9
Disable physics scaling for now
victorapm Jun 2, 2025
e9c7ee0
Update LvArray hash
victorapm Jun 2, 2025
eb67272
Fixes
victorapm Jun 2, 2025
a855a24
Fix base HCs
victorapm Jun 2, 2025
336b5b2
Update LvArray hash
victorapm Jun 2, 2025
ba4295f
Fix cmake policy
victorapm Jun 2, 2025
97296b4
Add tioga HC
victorapm Jun 2, 2025
22a9e9e
Update matrix HCs
victorapm Jun 2, 2025
fb9bb2b
Add runtime control on GPU-aware MPI for hypre
victorapm Jun 3, 2025
f758790
Build info about GPU-aware MPI
victorapm Jun 3, 2025
6274614
Add cmake parameters
victorapm Jun 6, 2025
60a3461
Fix warning
victorapm Jun 6, 2025
5f6613d
cuda 12.8 fixes
victorapm Jun 8, 2025
6f82249
Minor
victorapm Jun 8, 2025
08d5b69
Add nvml option
victorapm Jun 8, 2025
3deb6c3
Merge branch 'develop' into feature/paludettomag1/physicsScaling
victorapm Jun 18, 2025
dda59d9
Fix APIs
victorapm Jun 18, 2025
f37410a
Fixes
victorapm Jun 20, 2025
0688fa1
Fixes
victorapm Jun 20, 2025
ce59776
Update API
victorapm Jun 26, 2025
c20a797
Uncrustify
victorapm Jun 26, 2025
f7034fc
Merge branch 'develop' into feature/paludettomag1/physicsScaling
victorapm Jun 26, 2025
d107af3
Update TPL tag
victorapm Jun 26, 2025
9270a8c
Add missing interfaces
victorapm Jun 27, 2025
4e9c12b
Merge branch 'develop' into feature/paludettomag1/physicsScaling
victorapm Jun 27, 2025
782ff7d
Scale -> Pointwise
victorapm Jun 27, 2025
96655cd
Merge branch 'feature/paludettomag1/physicsScaling' of github.com:GEO…
victorapm Jun 27, 2025
192a4c1
Compilation fixes
victorapm Jun 27, 2025
82a001a
Division -> Divide
victorapm Jun 27, 2025
a2388ef
Update doc
victorapm Jun 27, 2025
0e76fa1
Compilation fix
victorapm Jun 27, 2025
53ea0dc
Update TPL tag
victorapm Jun 27, 2025
7a2a849
Enable physics scaling by default only with hypre
victorapm Jun 27, 2025
8c82f10
Merge branch 'feature/paludettomag1/physicsScaling' of github.com:GEO…
victorapm Jun 27, 2025
12b9c93
Fix
victorapm Jun 27, 2025
1087d66
Update TPL tag
victorapm Jun 27, 2025
dd74633
Merge branch 'develop' into feature/paludettomag1/hip
victorapm Jun 28, 2025
b2e2dfd
Merge branch 'feature/paludettomag1/physicsScaling' into feature/palu…
victorapm Jun 28, 2025
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"GEOS_TPL_TAG": "307-681"
"GEOS_TPL_TAG": "312-717"
}
},
"runArgs": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
set( ENABLE_MATHPRESSO OFF CACHE BOOL "" )
set( GEOS_ENABLE_VEM OFF CACHE BOOL "" FORCE )

set( ENABLE_PAMELA ON CACHE BOOL "" )
set( ENABLE_MATHPRESSO OFF CACHE BOOL "" )
set( ENABLE_PAMELA OFF CACHE BOOL "" )
set( ENABLE_PVTPackage ON CACHE BOOL "" )

set( ENABLE_PETSC OFF CACHE BOOL "" FORCE )

set( ENABLE_CALIPER OFF CACHE BOOL "" )
set( ENABLE_CALIPER ON CACHE BOOL "" )
set( ENABLE_PAPI OFF CACHE BOOL "" )

set( ENABLE_ESSL OFF CACHE BOOL "" )

set( ENABLE_TRILINOS OFF CACHE BOOL "" )
set( ENABLE_VTK OFF CACHE BOOL "" )
set( ENABLE_VTK ON CACHE BOOL "" )
set( ENABLE_OPENMP OFF CACHE BOOL "" FORCE )

set( CAMP_STANDALONE TRUE CACHE BOOL "" )

Expand All @@ -30,3 +28,17 @@ set( ENABLE_DOCS OFF CACHE BOOL "" FORCE )

set( ENABLE_SCOTCH OFF CACHE BOOL "" FORCE )
set( ENABLE_SUPERLU_DIST OFF CACHE BOOL "" FORCE )
set( ENABLE_SUITESPARSE OFF CACHE BOOL "" FORCE )

# HYPRE options
set( ENABLE_HYPRE_DEVICE "HIP" CACHE STRING "Enable HIP backend for hypre" )
set( ENABLE_HYPRE_MIXINT ON CACHE BOOL "Enable 64-bit integers for hypre" )
set( ENABLE_HYPRE_GPU_AWARE_MPI OFF CACHE BOOL "Enable GPU-aware MPI for hypre" )

# TPLs
include(${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake)

# ATS
set(USER $ENV{USER} CACHE STRING "")
set(ATS_WORKING_DIR "/p/lustre2/${USER}/integratedTestsGEOS/${CONFIG_NAME}" CACHE PATH "")
set(ATS_BASELINE_DIR "/p/lustre2/${USER}/integratedTestsGEOS/baselines" CACHE PATH "")
67 changes: 67 additions & 0 deletions host-configs/LLNL/matrix-base.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
###############################################################################
#
# Base configuration for LC Matrix builds
# Calling configuration file must define the following CMAKE variables:
#
# MPI_HOME
#
###############################################################################

set(GEOS_BUILD_OBJ_LIBS OFF CACHE BOOL "")

# Fortran
set(ENABLE_FORTRAN OFF CACHE BOOL "")

# MPI
set(ENABLE_MPI ON CACHE BOOL "")
set(MPI_HOME "/usr/tce/packages/mvapich2/mvapich2-2.3.7-gcc-12.1.1" CACHE PATH "")
set(MPI_C_COMPILER ${MPI_HOME}/bin/mpicc CACHE PATH "")
set(MPI_CXX_COMPILER ${MPI_HOME}/bin/mpicxx CACHE PATH "")
set(MPIEXEC srun CACHE STRING "")
set(MPIEXEC_NUMPROC_FLAG -n CACHE STRING "")
set(ENABLE_WRAP_ALL_TESTS_WITH_MPIEXEC ON CACHE BOOL "")

# OpenMP
set(ENABLE_OPENMP OFF CACHE BOOL "" FORCE)

# CUDA
# LvArray sets this to the CMAKE_CXX_COMPILER.
set(CMAKE_CUDA_HOST_COMPILER ${MPI_CXX_COMPILER} CACHE STRING "")
set(ENABLE_CUDA_NVTOOLSEXT OFF CACHE BOOL "")

# ESSL
set(ENABLE_ESSL OFF CACHE BOOL "" FORCE )

# TPL
set(ENABLE_PAPI OFF CACHE BOOL "")

# GEOS specific options
set(ENABLE_PVTPackage ON CACHE BOOL "")
set(ENABLE_MATHPRESSO OFF CACHE BOOL "")
set(ENABLE_PETSC OFF CACHE BOOL "" FORCE )
set(ENABLE_TRILINOS OFF CACHE BOOL "" FORCE )
set(ENABLE_SUITESPARSE OFF CACHE BOOL "" FORCE )
set(ENABLE_SUPERLU_DIST OFF CACHE BOOL "" FORCE )
set(ENABLE_HYPRE_DEVICE "CUDA" CACHE STRING "" FORCE)
set(ENABLE_HYPRE_MIXINT ON CACHE BOOL "" FORCE)

# Documentation
set(ENABLE_UNCRUSTIFY OFF CACHE BOOL "" FORCE)
set(ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE)

# YAPF python formatting
#set(YAPF_EXECUTABLE /usr/gapps/GEOSX/thirdPartyLibs/python/lassen-gcc-python/python/bin/yapf CACHE PATH "" FORCE)

# PYGEOSX
set(ENABLE_PYGEOSX ON CACHE BOOL "")
set(PYTHON_EXECUTABLE /usr/tce/packages/python/python-3.9.12/bin/python CACHE PATH "")
set(Python3_ROOT_DIR /usr/tce/packages/python/python-3.9.12 CACHE PATH "")
set(Python3_EXECUTABLE /usr/tce/packages/python/python-3.9.12/bin/python3 CACHE PATH "")

# ATS
set(ATS_ARGUMENTS "--ats jsrun_omp --ats jsrun_bind=packed" CACHE STRING "")
set(USER $ENV{USER} CACHE STRING "")
set(ATS_WORKING_DIR "/p/lustre2/${USER}/integratedTestsGEOS/${CONFIG_NAME}" CACHE PATH "")
set(ATS_BASELINE_DIR "/p/lustre2/${USER}/integratedTestsGEOS/baselines" CACHE PATH "")

include(${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake)
17 changes: 17 additions & 0 deletions host-configs/LLNL/matrix-gcc-12-cuda-12.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include(${CMAKE_CURRENT_LIST_DIR}/../../src/coreComponents/LvArray/host-configs/LLNL/matrix-gcc-12-cuda-12.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/matrix-base.cmake)

# C++
# The "-march=native -mtune=native" which LvArray adds breaks the PVT package.
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_CUDA_FLAGS_RELEASE "-O3 -DNDEBUG -Xcompiler -DNDEBUG -Xcompiler -O3" CACHE STRING "" FORCE)

# Fortran
set(CMAKE_Fortran_COMPILER /usr/tce/packages/gcc/gcc-12.1.1/bin/gfortran CACHE PATH "")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "")
set(FORTRAN_MANGLE_NO_UNDERSCORE OFF CACHE BOOL "")

# MPI
set(MPI_Fortran_COMPILER ${MPI_HOME}/bin/mpifort CACHE PATH "")

set(ENABLE_CUDA_NVTOOLSEXT OFF CACHE BOOL "")
9 changes: 9 additions & 0 deletions host-configs/LLNL/tioga-cce-18-rocm-6.2.1.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include(${CMAKE_CURRENT_LIST_DIR}/../../src/coreComponents/LvArray/host-configs/LLNL/tioga-cce-18-rocm-6.2.1.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/amdgpu-base.cmake)

# MPI
set(MPI_HOME /opt/cray/pe/mpich/8.1.31/ofi/crayclang/18.0 CACHE PATH "")

# Workaround for linking errors involving missing explicit instantiations of certain functions.
# TODO: we should add the missing explicit instantiations
set( CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,--allow-shlib-undefined" CACHE STRING "" FORCE )
10 changes: 10 additions & 0 deletions host-configs/LLNL/tioga-cce-19-rocm-6.4.0.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include(${CMAKE_CURRENT_LIST_DIR}/../../src/coreComponents/LvArray/host-configs/LLNL/tioga-cce-19-rocm-6.4.0.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/amdgpu-base.cmake)

# MPI
set(MPI_HOME /opt/cray/pe/mpich/8.1.33.1/ofi/crayclang/18.0 CACHE PATH "")

# GPU-aware MPI option
if( ENABLE_HYPRE_GPU_AWARE_MPI )
set( CMAKE_HIP_LINK_FLAGS "${CMAKE_HIP_LINK_FLAGS} $ENV{PE_MPICH_GTL_DIR_amd_gfx90a} $ENV{PE_MPICH_GTL_LIBS_amd_gfx90a}" CACHE STRING "" FORCE )
endif()
9 changes: 9 additions & 0 deletions host-configs/LLNL/tuo-cce-18-rocm-6.2.1.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include(${CMAKE_CURRENT_LIST_DIR}/../../src/coreComponents/LvArray/host-configs/LLNL/tuo-cce-18-rocm-6.2.1.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/amdgpu-base.cmake)

# MPI
set(MPI_HOME /opt/cray/pe/mpich/8.1.31/ofi/crayclang/18.0 CACHE PATH "")

# Workaround for linking errors involving missing explicit instantiations of certain functions.
# TODO: we should add the missing explicit instantiations
set( CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,--allow-shlib-undefined" CACHE STRING "" FORCE )
9 changes: 9 additions & 0 deletions host-configs/LLNL/tuo-cce-19-rocm-6.4.0.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include(${CMAKE_CURRENT_LIST_DIR}/../../src/coreComponents/LvArray/host-configs/LLNL/tuo-cce-19-rocm-6.4.0.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/amdgpu-base.cmake)

# MPI
set(MPI_HOME /opt/cray/pe/mpich/8.1.32/ofi/crayclang/19.0 CACHE PATH "")

# Workaround for linking errors involving missing explicit instantiations of certain functions.
# TODO: we should add the missing explicit instantiations
set( CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,--allow-shlib-undefined" CACHE STRING "" FORCE )
6 changes: 6 additions & 0 deletions scripts/config-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ def main(calling_script, args, unknown_args):
# Append cache file at the end of the command line to make previous argument visible to the cache.
cmake_line.append("-C%s" % cache_file)

# Add them back
for unknown_arg in unknown_args:
if not unknown_arg.startswith('-D'):
logging.warning("Additional argument '%s' does not start with '-D'. Keeping it nevertheless." % unknown_arg)
cmake_line.append(unknown_arg)

cmake_line.append(os.path.normpath(os.path.join(scripts_dir, "..", "src")))

# Dump the cmake command to file for convenience
Expand Down
22 changes: 15 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ cmake_policy(SET CMP0104 OLD) # when using nvcc populate CMAKE_CUDA_ARCHITECTURE
cmake_policy(SET CMP0074 NEW) # dont ignore <PackageName>_ROOT env vars when searching for packages via find_package()
cmake_policy(SET CMP0066 NEW) # use CMAKE_<LANG>_FLAGS_<BUILD_TYPE> for try_compile() instead of only CMAKE_<LANG>_FLAGS
cmake_policy(SET CMP0056 NEW) # use CMAKE_EXE_LINKER_FLAGS in try_compile() in addition to CMAKE_<LANG>_FLAGS
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.27")
cmake_policy(SET CMP0144 NEW) # find_package uses upper-case <PACKAGENAME>_ROOT variables.
endif()

################################
# GEOSX
Expand Down Expand Up @@ -85,7 +88,6 @@ add_subdirectory( coreComponents )
add_subdirectory( externalComponents )
add_subdirectory( main )


################################
# Add docs
################################
Expand All @@ -104,7 +106,7 @@ install( DIRECTORY ${PROJECT_BINARY_DIR}/include DESTINATION . )
# Generate version information
################################
include( cmake/GeosxVersion.cmake )
message( STATUS "Configuring GEOSX version ${GEOS_VERSION_FULL}" )
message( STATUS "Configuring GEOS version ${GEOS_VERSION_FULL}" )


################################
Expand All @@ -123,10 +125,16 @@ endif()

if( ENABLE_CUDA )
list( APPEND extraComponentsLinkList cuda )
endif()

if( ENABLE_CUDA AND ENABLE_CUDA_NVTOOLSEXT )
list( APPEND extraComponentsLinkList CUDA::nvToolsExt )
if (ENABLE_CUDA_NVTOOLSEXT)
list( APPEND extraComponentsLinkList CUDA::nvToolsExt )
message( STATUS "Enabling CUDA::nvToolsExt" )
endif()

if (ENABLE_CUDA_NVML)
list( APPEND extraComponentsLinkList CUDA::nvml )
message( STATUS "Enabling CUDA::nvml" )
endif()
endif()

if( ENABLE_HIP )
Expand All @@ -135,7 +143,7 @@ endif()

blt_add_executable( NAME geosx
SOURCES main/main.cpp
DEPENDS_ON geosx_core
DEPENDS_ON geosx_core
${extraComponentsLinkList}
${externalComponentsLinkList} )

Expand Down Expand Up @@ -309,7 +317,7 @@ if ( ENABLE_ATS )

if (NOT Python3_EXECUTABLE)
message( FATAL_ERROR "An appropriate version of python was not found (required for integrated testing system). Try setting Python3_ROOT_DIR and/or Python3_EXECUTABLE in your host config." )
endif()
endif()

# Setup testing
set( ATS_SCRIPT
Expand Down
12 changes: 12 additions & 0 deletions src/cmake/GeosxOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,22 @@ endif()
# Physics packages
option( GEOS_ENABLE_CONTACT "Enables contact physics package" ON )
option( GEOS_ENABLE_FLUIDFLOW "Enables fluid flow physics package" ON )
option( GEOS_ENABLE_FLUIDFLOW_ISOTHERMAL_FVM "Enables isothermal FVM kernels in fluid flow physics package" ON )
option( GEOS_ENABLE_FLUIDFLOW_THERMAL_FVM "Enables thermal FVM kernels in fluid flow physics package" ON )
option( GEOS_ENABLE_FLUIDFLOW_REACTIVE "Enables reactive kernels in fluid flow physics package" ON )
option( GEOS_ENABLE_FLUIDFLOW_HYBRIDFVM "Enables Hybrid FVM kernels in fluid flow physics package" ON )
option( GEOS_ENABLE_INDUCEDSEISMICITY "Enables induced seismicity physics package" ON )
option( GEOS_ENABLE_MULTIPHYSICS "Enables multiphysics physics package" ON )
option( GEOS_ENABLE_MULTIPHYSICS_POROMECHANICS "Enables poromechanics kernels in multiphysics package" ON )
option( GEOS_ENABLE_MULTIPHYSICS_POROMECHANICS_EFEM "Enables poromechanics EFEM kernels in multiphysics package" ON )
option( GEOS_ENABLE_MULTIPHYSICS_POROMECHANICS_DAMAGE "Enables poromechanics damage kernels in multiphysics package" ON )
option( GEOS_ENABLE_MULTIPHYSICS_THERMOPOROMECHANICS "Enables thermoporomechanics kernels in multiphysics package" ON )
option( GEOS_ENABLE_SIMPLEPDE "Enables simple PDE physics package" ON )
option( GEOS_ENABLE_SOLIDMECHANICS "Enables solid mechanics physics package" ON )
option( GEOS_ENABLE_SOLIDMECHANICS_ELASTIC "Enables elastic kernels in solid mechanics physics package" ON )
option( GEOS_ENABLE_SOLIDMECHANICS_EXTRA "Enables extra kernels in solid mechanics physics package" ON )
option( GEOS_ENABLE_SOLIDMECHANICS_THERMOPOROELASTIC "Enables thermoporoelastic kernels in solid mechanics physics package" OFF )
option( GEOS_ENABLE_SOLIDMECHANICS_THERMOPOROMECHANICS "Enables thermoporomechanics kernels in solid mechanics physics package" ON )
option( GEOS_ENABLE_SURFACEGENERATION "Enables surface generation physics package" ON )
option( GEOS_ENABLE_WAVEPROPAGATION "Enables wave propagation physics package" ON )

Expand Down
2 changes: 1 addition & 1 deletion src/cmake/blt
Submodule blt updated 354 files
10 changes: 9 additions & 1 deletion src/cmake/thirdparty/SetupGeosxThirdParty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ else()
endif()

################################
# ZLIB
# ZLIB
################################
if(DEFINED ZLIB_DIR)
list(PREPEND CMAKE_PREFIX_PATH "${ZLIB_DIR}")
Expand Down Expand Up @@ -719,6 +719,14 @@ if(DEFINED HYPRE_DIR AND ENABLE_HYPRE)
message( " ----> hypre_VERSION = ${hypre_VERSION}" )
endif()

if( ENABLE_HYPRE_GPU_AWARE_MPI )
if( "${header_file}" MATCHES "HYPRE_USING_GPU_AWARE_MPI 1" )
message( " ----> GPU-aware MPI support activated" )
else ()
message(FATAL_ERROR "GEOS configured with ENABLE_HYPRE_GPU_AWARE_MPI=ON, however hypre was not built with GPU-aware MPI support")
endif ()
endif ()

# Prepend Hypre to link flags, fix for Umpire appearing before Hypre on the link line
# if (NOT CMAKE_HOST_APPLE)
# blt_add_target_link_flags (TO hypre FLAGS "-Wl,--whole-archive ${HYPRE_DIR}/lib/libHYPRE.a -Wl,--no-whole-archive")
Expand Down
5 changes: 4 additions & 1 deletion src/coreComponents/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
set(TOTAL_GENERATED_KERNELS 0 CACHE INTERNAL "Total number of generated kernels")

set( subdirs
math
common
Expand Down Expand Up @@ -83,5 +85,6 @@ endif()

if( GEOS_ENABLE_TESTS )
add_subdirectory( unitTests )
endif( )
endif()

message( STATUS "Total number of generated kernels: ${TOTAL_GENERATED_KERNELS}" )
6 changes: 4 additions & 2 deletions src/coreComponents/common/GeosxConfig.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
* Copyright (c) 2018-2024 TotalEnergies
* Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
* Copyright (c) 2023-2024 Chevron
* Copyright (c) 2023-2024 Chevron
* Copyright (c) 2019- GEOS/GEOSX Contributors
* All rights reserved
*
Expand Down Expand Up @@ -95,6 +95,9 @@
/// Enables use of SuperLU_dist library through HYPRE (CMake option ENABLE_SUPERLU_DIST)
#cmakedefine GEOS_USE_SUPERLU_DIST

/// Enables use of SuiteSparse library (CMake option ENABLE_SUITESPARSE)
#cmakedefine GEOS_USE_SUITESPARSE

/// Enables use of PETSc library (CMake option ENABLE_PETSC)
#cmakedefine GEOS_USE_PETSC

Expand Down Expand Up @@ -200,4 +203,3 @@
#endif

#endif /* GEOS_CONFIG_HPP */

2 changes: 1 addition & 1 deletion src/coreComponents/common/LifoStorage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class LifoStorage
m_bufferCount( 0 )
{
LIFO_LOG_RANK( " LIFO : maximum size "<< m_maxNumberOfBuffers << " buffers " );
LIFO_LOG_RANK( " LIFO : buffer size " << m_bufferSize / ( 1024.0 * 1024.0 ) << "MB" );
LIFO_LOG_RANK( " LIFO : buffer size " << ( ( double ) m_bufferSize ) / ( 1024.0 * 1024.0 ) << "MB" );
if( numberOfBuffersToStoreOnDevice < 0 )
{
#ifdef GEOS_USE_CUDA
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/common/LifoStorageCommon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class LifoStorageCommon
GEOS_ERROR( "To use LifoStorage, both _SC_AVPHYS_PAGES and _SC_PAGESIZE must be defined." );
#endif
int numberOfBuffersToStoreOnHost = std::max( 1, std::min( ( int )( 0.01 * percent * free / bufferSize ), maxNumberOfBuffers - numberOfBuffersToStoreOnDevice ) );
double freeGB = ( ( double ) free ) / ( 1024.0 * 1024.0 * 1024.0 ) / MpiWrapper::nodeCommSize();
GEOS_MAYBE_UNUSED double freeGB = ( ( double ) free ) / ( 1024.0 * 1024.0 * 1024.0 ) / MpiWrapper::nodeCommSize();
LIFO_LOG_RANK( " LIFO : available memory on host " << freeGB << " GB" );
return numberOfBuffersToStoreOnHost;
}
Expand Down
5 changes: 5 additions & 0 deletions src/coreComponents/common/MemoryInfos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ MemoryInfos::MemoryInfos( umpire::MemoryResourceTraits::resource_type resourceTy
case umpire::MemoryResourceTraits::resource_type::um:
#if defined( GEOS_USE_CUDA )
cudaMemGetInfo( &m_availableMemory, &m_totalMemory );
#elif defined( GEOS_USE_HIP )
{
hipError_t const err = hipMemGetInfo( &m_availableMemory, &m_totalMemory );
GEOS_WARNING_IF( err != hipSuccess, GEOS_FMT( "HIP error found: {} at {}:{}", hipGetErrorString( err ), __FILE__, __LINE__ ) );
}
#else
GEOS_WARNING( "Unknown device physical memory size getter for this compiler." );
m_physicalMemoryHandled = 0;
Expand Down
1 change: 1 addition & 0 deletions src/coreComponents/common/MpiWrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ U MpiWrapper::prefixSum( T const value, MPI_Comm comm )
U const convertedValue = value;
int const error = MPI_Exscan( &convertedValue, &localResult, 1, internal::getMpiType< U >(), MPI_SUM, comm );
MPI_CHECK_ERROR( error );
MPI_Barrier( comm );
#endif
if( commRank() == 0 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/common/TypeDispatch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ bool dispatch( LIST const combinations,
if( !success )
{
auto typePrinter = []( auto t ){ return LvArray::system::demangle( typeid( typename decltype(t)::type ).name() ); };
auto typeListPrinter = [typePrinter]( auto tlist ){ return internal::listToString( typename decltype( tlist )::type{}, "\n ", "", typePrinter ); };
GEOS_MAYBE_UNUSED auto typeListPrinter = [typePrinter]( auto tlist ){ return internal::listToString( typename decltype( tlist )::type{}, "\n ", "", typePrinter ); };

GEOS_ERROR( "Types were not dispatched to the lambda of type\n"
<< LvArray::system::demangleType< LAMBDA >() << "\n"
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/constitutive/PVTPackage
Submodule PVTPackage updated 102 files
Loading
Loading