Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
94 changes: 94 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 24,
"patch": 0
},
"configurePresets": [
{
"name": "testing",
"hidden": true,
"cacheVariables": {
"IPPL_ENABLE_TESTS": "ON",
"IPPL_ENABLE_UNIT_TESTS": "ON"
}
},
{
"name": "default",
"displayName": "Default",
"description": "Default build, release mode with most common options",
"generator": "Unix Makefiles",
"cacheVariables": {
"BUILD_SHARED_LIBS": "ON",
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_POSITION_INDEPENDENT_CODE": "ON",
"CMAKE_CXX_STANDARD": "20",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"Kokkos_VERSION_DEFAULT": "git.5.2.2",
"Heffte_VERSION_DEFAULT": "git.v2.4.1",
"IPPL_PLATFORMS": "SERIAL",
"IPPL_ENABLE_FFT": "ON",
"IPPL_ENABLE_ALPINE": "ON",
"IPPL_ENABLE_ESPIF": "ON",
"IPPL_ENABLE_COSMOLOGY": "ON",
"IPPL_ENABLE_COLLISIONS": "ON",
"IPPL_ENABLE_FEL": "ON",
"IPPL_ENABLE_UNIT_TESTS": "OFF",
"IPPL_USE_STANDARD_FOLDERS": "ON"
}
},
{
"name": "release-testing",
"displayName": "Testing(Release)",
"description": "Enables building test in release mode",
"inherits": [
"testing",
"default"
]
},
{
"name": "debug-testing",
"displayName": "Testing(Debug)",
"description": "Enables building test in debug mode",
"inherits": [
"testing",
"default"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "alps-gh200",
"displayName": "Alps-GH200-defaults",
"description": "Settings for Alps GH200, with CUDA (release+testing)",
"inherits": [
"release-testing"
],
"cacheVariables": {
"CMAKE_CUDA_ARCHITECTURES": "90",
"MPIEXEC_EXECUTABLE": "/usr/bin/srun",
"MPIEXEC_PREFLAGS": "--gpus-per-task=1;/user-environment/wrapper-mpi.sh",
"OPALX_PLATFORMS": "CUDA;SERIAL"
}
},
{
"name": "alps-mi300",
"displayName": "Alps-mi300-defaults",
"description": "Enables building test in debug mode",
"inherits": [
"release-testing"
],
"cacheVariables": {
"CMAKE_CXX_FLAGS": "--offload-arch=gfx942:sramecc+:xnack+",
"CMAKE_HIP_ARCHITECTURES": "gfx942",
"MPIEXEC_EXECUTABLE": "/usr/bin/srun",
"MPIEXEC_PREFLAGS": "--gpus-per-node=4;/user-environment/wrapper-mpi.sh",
"OPALX_PLATFORMS": "HIP;SERIAL",
"Kokkos_ARCH_AMD_GFX942_APU": "ON",
"KOKKOS_AMDGPU_OPTIONS": "--offload-arch=gfx942:sramecc+:xnack+"
}
}
]
}
155 changes: 0 additions & 155 deletions CMakeUserPresets.json

This file was deleted.

2 changes: 2 additions & 0 deletions cmake/BuildSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ The following CMake cache variables control this support:

Installed dependencies can be selected with `KokkosKernels_DIR`, `LAPACKE_ROOT`,
`LAPACKE_INCLUDE_DIRS`, `LAPACKE_LIBRARY_DIRS`, `LAPACKE_LIBRARIES`, or `MKL_DIR`.
Providers that nest their headers under `<prefix>/include/openblas/` (such as
OpenBLAS) are found automatically when the prefix is on `CMAKE_PREFIX_PATH`.
`LAPACKE_LIBRARIES` is a semicolon-separated complete link line and may contain
absolute paths, library names, imported targets, and linker items such as `-lm`.
The standard FetchContent overrides `FETCHCONTENT_SOURCE_DIR_KOKKOSKERNELS` and
Expand Down
30 changes: 12 additions & 18 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ endif()
# ------------------------------------------------------------------------------
# Catalyst (libcatalyst SDK and bundled Conduit parser)
# ------------------------------------------------------------------------------
if(IPPL_ENABLE_CATALYST OR IPPL_ENABLE_FEL)
if(IPPL_ENABLE_CATALYST)
enable_language(C)

if(NOT Catalyst_VERSION)
Expand All @@ -514,17 +514,16 @@ if(IPPL_ENABLE_CATALYST OR IPPL_ENABLE_FEL)
endforeach()
unset(_cat_dir_var)

# Do not mistake the package generated by an earlier FetchContent configure
# for a user-provided Catalyst installation on a subsequent configure.
# Do not mistake the package generated by an earlier FetchContent configure for a user-provided
# Catalyst installation on a subsequent configure.
set(_ippl_reuse_fetched_catalyst OFF)
set(_ippl_catalyst_dir_is_in_build_tree OFF)
if(catalyst_DIR)
cmake_path(IS_PREFIX CMAKE_BINARY_DIR "${catalyst_DIR}" NORMALIZE
_ippl_catalyst_dir_is_in_build_tree)
endif()
if(NOT Catalyst_DIR AND NOT CATALYST_DIR
AND (_ippl_catalyst_dir_is_in_build_tree
OR (IPPL_CATALYST_FETCHED AND NOT catalyst_DIR)))
if(NOT Catalyst_DIR AND NOT CATALYST_DIR AND (_ippl_catalyst_dir_is_in_build_tree
OR (IPPL_CATALYST_FETCHED AND NOT catalyst_DIR)))
set(_ippl_reuse_fetched_catalyst ON)
unset(catalyst_DIR CACHE)
unset(catalyst_FOUND)
Expand Down Expand Up @@ -556,22 +555,18 @@ if(IPPL_ENABLE_CATALYST OR IPPL_ENABLE_FEL)
set(CATALYST_WITH_EXTERNAL_CONDUIT OFF CACHE BOOL "" FORCE)
set(CATALYST_USE_MPI ON CACHE BOOL "" FORCE)

FetchContent_Declare(
catalyst
GIT_REPOSITORY "https://gitlab.kitware.com/paraview/catalyst.git"
GIT_TAG "${CATALYST_VERSION_GIT}"
DOWNLOAD_EXTRACT_TIMESTAMP ON)
FetchContent_Declare(catalyst GIT_REPOSITORY "https://gitlab.kitware.com/paraview/catalyst.git"
GIT_TAG "${CATALYST_VERSION_GIT}" DOWNLOAD_EXTRACT_TIMESTAMP ON)
FetchContent_MakeAvailable(catalyst)

if(NOT TARGET catalyst::catalyst)
message(FATAL_ERROR "Catalyst FetchContent did not provide catalyst::catalyst")
endif()

file(
STRINGS "${catalyst_SOURCE_DIR}/CMakeLists.txt" _catalyst_project_line
REGEX "^[ \t]*project\\(CATALYST VERSION [0-9]+\\.[0-9]+")
string(REGEX MATCH "VERSION[ \t]+([0-9]+\\.[0-9]+(\\.[0-9]+)?)"
_catalyst_version_match "${_catalyst_project_line}")
file(STRINGS "${catalyst_SOURCE_DIR}/CMakeLists.txt" _catalyst_project_line
REGEX "^[ \t]*project\\(CATALYST VERSION [0-9]+\\.[0-9]+")
string(REGEX MATCH "VERSION[ \t]+([0-9]+\\.[0-9]+(\\.[0-9]+)?)" _catalyst_version_match
"${_catalyst_project_line}")
if(NOT CMAKE_MATCH_1)
message(FATAL_ERROR "Could not determine the fetched Catalyst project version")
endif()
Expand All @@ -581,8 +576,7 @@ if(IPPL_ENABLE_CATALYST OR IPPL_ENABLE_FEL)
unset(_catalyst_version_match)
endif()

string(REGEX MATCH "^([0-9]+)\\.([0-9]+)" _catalyst_major_minor
"${IPPL_CATALYST_VERSION}")
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)" _catalyst_major_minor "${IPPL_CATALYST_VERSION}")
if(NOT _catalyst_major_minor)
message(FATAL_ERROR "Could not determine Catalyst's major/minor version")
endif()
Expand Down
Loading
Loading