Skip to content

Commit

Permalink
Update scripts from upstream/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sethrj committed Jul 13, 2024
1 parent bfc0f41 commit 12426ae
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 17 deletions.
89 changes: 81 additions & 8 deletions scripts/cmake-presets/esseivaj.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"cmakeMinimumRequired": {"major": 3, "minor": 21, "patch": 0},
"configurePresets": [
{
"name": "base",
"name": ".base",
"hidden": true,
"inherits": ["default", ".debug"],
"displayName": "esseivaj default options",
"binaryDir": "${sourceDir}/build-${presetName}",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-${presetName}",
"cacheVariables": {
"CELERITAS_BUILD_DOCS": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILD_DEMOS": {"type": "BOOL", "value": "ON"},
Expand All @@ -17,12 +17,71 @@
"CELERITAS_USE_JSON": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_HepMC3": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_OpenMP": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_SWIG": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_Perfetto": {"type": "BOOL", "value": "ON"},
"PERFETTO_ROOT": {"type": "PATH", "value": "$env{PERFETTO_ROOT}/perfetto/sdk"},
"CMAKE_CXX_STANDARD": {"type": "STRING", "value": "17"},
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Werror -Wno-error=deprecated -pedantic -fdiagnostics-color=always"
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Werror -Wno-error=deprecated -pedantic -fdiagnostics-color=always",
"CMAKE_EXPORT_COMPILE_COMMANDS": {"type": "BOOL", "value": "ON"}
}
},
{
"name": ".no-vg",
"hidden": true,
"cacheVariables": {
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "OFF"}
}
}, {
"name": ".profile",
"hidden": true,
"cacheVariables": {
"BUILD_SHARED_LIBS":{"type": "BOOL", "value": "ON"},
"CELERITAS_DEBUG": {"type": "BOOL", "value": "OFF"},
"CMAKE_BUILD_TYPE": {"type": "STRING", "value": "RelWithDebInfo"},
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-O2 -g -DNDEBUG -fno-omit-frame-pointer"
}
},
{
"name": "base",
"displayName": "Vecgeom debug",
"inherits": [".base"]
},
{
"name": "base-novg",
"displayName": "ORANGE debug",
"inherits": [".no-vg", ".base"]
},
{
"name": "reldeb",
"displayName": "Vecgeom release debug",
"inherits": [".reldeb", ".base"]
},
{
"name": "reldeb-profile",
"displayName": "Vecgeom profile mode",
"inherits": [".profile", "reldeb"]
},
{
"name": "reldeb-novg",
"displayName": "ORANGE release debug",
"inherits": [".no-vg", ".reldeb", ".base"]
},
{
"name": "reldeb-novg-profile",
"displayName": "ORANGE profile mode",
"inherits": [".profile", "reldeb-novg"]
},
{
"name": "ndebug",
"displayName": "Vecgeom release",
"inherits": [".ndebug", ".base"]
},
{
"name": "ndebug-novg",
"displayName": "ORANGE release",
"inherits": [".no-vg", ".ndebug", ".base"]
}
],
"buildPresets": [
Expand All @@ -31,14 +90,28 @@
"configurePreset": "base",
"jobs": 16,
"nativeToolOptions": ["-k0"]
}
},
{"name": "base-novg", "configurePreset": "base-novg", "inherits": "base"},
{"name": "ndebug", "configurePreset": "ndebug", "inherits": "base"},
{"name": "ndebug-novg", "configurePreset": "ndebug-novg", "inherits": "base"},
{"name": "reldeb", "configurePreset": "reldeb", "inherits": "base"},
{"name": "reldeb-profile", "configurePreset": "reldeb-profile", "inherits": "base"},
{"name": "reldeb-novg", "configurePreset": "reldeb-novg", "inherits": "base"},
{"name": "reldeb-novg-profile", "configurePreset": "reldeb-novg-profile", "inherits": "base"}
],
"testPresets": [
{
"name": "base",
"configurePreset": "base",
"output": {"outputOnFailure": true},
"execution": {"noTestsAction": "error", "stopOnFailure": false}
}
"execution": {"noTestsAction": "error", "stopOnFailure": false, "jobs": 8}
},
{"name": "base-novg", "configurePreset": "base-novg", "inherits": "base"},
{"name": "ndebug", "configurePreset": "ndebug", "inherits": "base"},
{"name": "ndebug-novg", "configurePreset": "ndebug-novg", "inherits": "base"},
{"name": "reldeb", "configurePreset": "reldeb", "inherits": "base"},
{"name": "reldeb-profile", "configurePreset": "reldeb-profile", "inherits": "base"},
{"name": "reldeb-novg", "configurePreset": "reldeb-novg", "inherits": "base"},
{"name": "reldeb-novg-profile", "configurePreset": "reldeb-novg-profile", "inherits": "base"}
]
}
20 changes: 20 additions & 0 deletions scripts/cmake-presets/goldfinger.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"CMAKE_CXX_STANDARD": {"type": "STRING", "value": "17"},
"CMAKE_CXX_EXTENSIONS": {"type": "BOOL", "value": "OFF"},
"CMAKE_FIND_FRAMEWORK": {"type": "STRING", "value": "LAST"},
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install-${presetName}",
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-O2 -g -DNDEBUG -fno-inline -fno-omit-frame-pointer",
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Werror -Wno-error=deprecated -pedantic -fdiagnostics-color=always"
}
Expand Down Expand Up @@ -58,6 +59,25 @@
"CELERITAS_REAL_TYPE": "float"
}
},
{
"name": "clhep",
"displayName": "With CLHEP units",
"inherits": [".base", ".debug", "default"],
"cacheVariables": {
"CELERITAS_UNITS": "CLHEP",
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"}
}
},
{
"name": "si",
"displayName": "With SI units",
"inherits": [".base", ".debug", "default"],
"cacheVariables": {
"CELERITAS_UNITS": "SI",
"CELERITAS_CORE_GEO": "VecGeom",
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"}
}
},
{
"name": "vecgeom",
"displayName": "With vecgeom",
Expand Down
3 changes: 3 additions & 0 deletions scripts/cmake-presets/perlmutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"CMAKE_CUDA_ARCHITECTURES": {"type": "STRING", "value": "80"},
"CMAKE_CXX_STANDARD": {"type": "STRING", "value": "17"},
"CMAKE_CXX_EXTENSIONS": {"type": "BOOL", "value": "OFF"},
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
"CMAKE_C_COMPILER": {"type": "PATH", "value": "cc"},
"CMAKE_CXX_COMPILER": {"type": "PATH", "value": "CC"},
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install-${presetName}",
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG -march=znver3 -mtune=znver3",
"CMAKE_EXPORT_COMPILE_COMMANDS": {"type": "BOOL", "value": "ON"}
Expand Down
9 changes: 9 additions & 0 deletions scripts/cmake-presets/wildstyle.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"}
}
},
{
"name": "clhep",
"displayName": "Debug with VecGeom and clhep units",
"inherits": [".debug", ".base"],
"cacheVariables": {
"CELERITAS_UNITS": "CLHEP",
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"}
}
},
{
"name": "reldeb",
"displayName": "Everything but vecgeom in release mode with debug symbols and assertions",
Expand Down
2 changes: 1 addition & 1 deletion scripts/dev/iwyu-apple-clang.imp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{ include: ["@<__algorithm/.*>", private, "<algorithm>", public ] },
{ include: ["@<__chrono/.*>", private, "<chrono>", public ] },
{ include: ["@<__functional/.*>", private, "<functional>", public ] },
{ include: ["@<__fwd/string_view.h>", private, "<string_view>", public ] },
{ include: ["@<__fwd/(.*)\\.h>", private, "<\\1>", public ] },
{ include: ["@<__iterator/.*>", private, "<iterator>", public ] },
{ include: ["@<__memory/.*>", private, "<memory>", public ] },
{ include: ["@<__mutex_base>", private, "<mutex>", public ] },
Expand Down
1 change: 0 additions & 1 deletion scripts/dev/run-iwyu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ if [ -z "${SKIP_FORMAT}" ]; then
git add -u :/
SKIP_GCF=1 git commit --amend -m "IWYU+Clean" >/dev/null
git reset HEAD^
git co HEAD -- ":/src/celeritas/*/generated/*"
fi
4 changes: 3 additions & 1 deletion scripts/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ case $CONFIG in
VECGEOM=
;;
jammy-cuda11)
# ***IMPORTANT***: update cuda external version in dev/jammy-cuda11!
# ***IMPORTANT***: update the following after modification
# - cuda external version in dev/jammy-cuda11
# - CI versions listed in README.md
DOCKERFILE_DISTRO=ubuntu
BASE_TAG=nvidia/cuda:11.8.0-devel-ubuntu22.04
VECGEOM=v1.2.5
Expand Down
14 changes: 8 additions & 6 deletions scripts/env/perlmutter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
# If using Spack, this will cause a compile error in VecGeom+cuda.
# Spack uses this CUDA install as external CUDA package and doesn't look in the math_libs directory for extra headers.
# --> the fix for now is to unload these modules and install our own cudatoolkit using Spack.
module unload gpu cudatoolkit
module load PrgEnv-gnu/8.3.3
module unload gpu
module load PrgEnv-gnu

# Spack module on Perlmutter currently fails to create the spack env from spack.yaml, we need Spack v0.18.0; use our own install instead.
# Expects the spack git repo to have been cloned at _SPACK_INSTALL and the environment celeritas to exist
_SPACK_INSTALL=${SCRATCH}/spack

# Expects the spack git repo to have been cloned at _SPACK_INSTALL (default to $SPACK_ROOT)
# The environment named celeritas must exists
_SPACK_INSTALL=${SPACK_ROOT:-$SCRATCH/spack}
_SPACK_SOURCE_FILE=${_SPACK_INSTALL}/share/spack/setup-env.sh
if [ ! -f "${_SPACK_SOURCE_FILE}" ]; then
echo "Expected to find a spack install at ${_SPACK_INSTALL}" >&2
Expand All @@ -18,4 +19,5 @@ fi

. ${_SPACK_SOURCE_FILE}
spack env activate celeritas
export LD_LIBRARY_PATH=$SPACK_ENV/.spack-env/view/lib64:$LD_LIBRARY_PATH

export PKG_CONFIG_PATH=/opt/cray/xpmem/default/lib64/pkgconfig:"${PKG_CONFIG_PATH}"

0 comments on commit 12426ae

Please sign in to comment.