Skip to content
Merged
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
58 changes: 34 additions & 24 deletions scripts/cmake-presets/executor.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,21 @@
"name": ".base",
"hidden": true,
"generator": "Ninja",
"inherits": [".spack-env"],
"binaryDir": "${sourceDir}/build-${presetName}",
"cacheVariables": {
"BUILD_SHARED_LIBS": {"type": "BOOL", "value": "ON"},
"BUILD_TESTING": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_covfie": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_CUDA": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_DD4hep": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_LArSoft": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_HepMC3": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_HIP": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_Geant4": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_MPI": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_OpenMP": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_PNG": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_Python": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILD_TESTS": {"type": "BOOL", "value": "ON"},
"CELERITAS_BUILTIN_CLI11": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILTIN_G4VG": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILTIN_nlohmann_json": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILTIN_GTest": {"type": "BOOL", "value": "OFF"},
"CMAKE_C_COMPILER_LAUNCHER": null,
"CMAKE_CXX_COMPILER_LAUNCHER": null,
"CMAKE_EXPORT_COMPILE_COMMANDS": {"type": "BOOL", "value": "ON"},
Expand All @@ -47,18 +41,37 @@
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Werror -Wno-error=deprecated -pedantic -fdiagnostics-color=always"
}
},
{
"name": ".spackbase",
"hidden": true,
"generator": "Ninja",
"inherits": [".base", ".spack-env"],
"binaryDir": "${sourceDir}/build-${presetName}",
"cacheVariables": {
"CELERITAS_USE_covfie": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_HepMC3": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_Geant4": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_PNG": {"type": "BOOL", "value": "ON"},
"CELERITAS_USE_Python": {"type": "BOOL", "value": "ON"},
"CELERITAS_BUILD_TESTS": {"type": "BOOL", "value": "ON"},
"CELERITAS_BUILTIN_CLI11": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILTIN_G4VG": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILTIN_nlohmann_json": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILTIN_GTest": {"type": "BOOL", "value": "OFF"}
}
},
{
"name": "iwyu",
"displayName": "Include-what-you-use (see scripts/dev/run-iwyu.sh)",
"inherits": [".base"],
"inherits": [".spackbase"],
"cacheVariables": {
"CELERITAS_BUILD_TESTS": {"type": "BOOL", "value": "OFF"},
"CELERITAS_DEBUG": {"type": "BOOL", "value": "OFF"}
}
},
{
"name": "min",
"displayName": "Goldfinger minimal build",
"displayName": "Executor minimal build",
"inherits": [".base", ".debug", "default"],
"environment": {
"CMAKE_PREFIX_PATH": "$env{SPACK_ROOT}/var/spack/environments/celeritas-min/.spack-env/view"
Expand All @@ -72,7 +85,7 @@
{
"name": "base",
"displayName": "Goldfinger default options",
"inherits": [".ccache", ".base", ".debug", "default"],
"inherits": [".ccache", ".spackbase", ".debug", "default"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CELERITAS_BUILD_DOCS": {"type": "BOOL", "value": "ON"},
Expand All @@ -91,15 +104,10 @@
"CELERITAS_REAL_TYPE": "float"
}
},
{
"name": "mini",
"displayName": "Minimal deps",
"inherits": ["minimal", ".base", ".debug"]
},
{
"name": "si",
"displayName": "With SI units",
"inherits": [".base", ".debug", "default"],
"inherits": [".spackbase", ".debug", "default"],
"cacheVariables": {
"CELERITAS_UNITS": "SI",
"CELERITAS_CORE_GEO": "VecGeom",
Expand All @@ -109,7 +117,7 @@
{
"name": "vecgeom",
"displayName": "With vecgeom",
"inherits": [".ccache", ".base", ".debug", "default"],
"inherits": [".ccache", ".spackbase", ".debug", "default"],
"cacheVariables": {
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"}
}
Expand All @@ -119,16 +127,18 @@
"displayName": "With local vecgeom",
"inherits": [".ccache", ".base", ".debug", "default"],
"environment": {
"CMAKE_PREFIX_PATH": "/opt/spack/opt/spack/tahoe/geant4/11.3.2/7oydgus:/opt/spack/opt/spack/tahoe/googletest/1.17.0/c332ssk:/opt/spack/opt/spack/tahoe/cli11/2.5.0/pmtt6hb:/opt/spack/opt/spack/tahoe/nlohmann-json/3.12.0/dkrlqn3:/opt/spack/opt/spack/tahoe/covfie/0.15.3/tlzukkw:/opt/spack/opt/spack/tahoe/zlib-ng/2.2.4/qbbzbte"
"CMAKE_PREFIX_PATH": "/opt/spack/opt/spack/tahoe/geant4/11.3.2/gykadvh:/opt/spack/opt/spack/tahoe/covfie/0.15.4/r5g2psb:/opt/spack/opt/spack/tahoe/nlohmann-json/3.12.0/7mlcviu:/opt/spack/opt/spack/tahoe/cli11/2.6.1/znuwv76:/opt/spack/opt/spack/tahoe/googletest/1.17.0/rmxgcak"
},
"cacheVariables": {
"CELERITAS_BUILTIN_CLI11": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILTIN_G4VG": {"type": "BOOL", "value": "ON"},
"CELERITAS_BUILTIN_GTest": {"type": "BOOL", "value": "OFF"},
"CELERITAS_BUILTIN_nlohmann_json": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_HepMC3": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"},
"CELERITAS_VecGeom_SURFACE": {"type": "BOOL", "value": "ON"},
"VecGeom_DIR": {"type": "PATH", "value": "/Users/seth/Code/vecgeom/install/lib/cmake/VecGeom"}

}
},
{
Expand All @@ -150,7 +160,7 @@
{
"name": "geant4",
"displayName": "Using Geant4 navigation",
"inherits": [".base", ".debug", "default"],
"inherits": [".spackbase", ".debug", "default"],
"cacheVariables": {
"CELERITAS_CORE_GEO": "Geant4",
"CELERITAS_UNITS": "CLHEP",
Expand All @@ -162,7 +172,7 @@
{
"name": "reldeb",
"displayName": "With ORANGE in optimized+errcheck mode",
"inherits": [".reldeb", ".base"],
"inherits": [".reldeb", ".spackbase"],
"cacheVariables": {
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "OFF"}
}
Expand All @@ -178,15 +188,15 @@
{
"name": "ndebug",
"displayName": "With ORANGE in optimized mode",
"inherits": [".ccache", ".ndebug", ".base"],
"inherits": [".ccache", ".ndebug", ".spackbase"],
"cacheVariables": {
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "OFF"}
}
},
{
"name": "ndebug-vecgeom",
"displayName": "With vecgeom, clhep, dev g4 in optimized mode",
"inherits": [".ccache", ".base", ".ndebug", "vecgeom"],
"inherits": [".ccache", ".spackbase", ".ndebug", "vecgeom"],
"cacheVariables": {
"CELERITAS_USE_HepMC3": {"type": "BOOL", "value": "OFF"},
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "OFF"},
Expand Down
2 changes: 2 additions & 0 deletions src/corecel/math/Algorithms.hh
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,8 @@ inline CELER_FUNCTION T fastpow(T a, T b)
/*!
* Use fused multiply-add for generic calculations.
*
* \f[ x \gets a \times b + y \f]
*
* This provides a floating point specialization so that \c fma can be used in
* code that is accelerated for floating point calculations but still works
* correctly with integer arithmetic.
Expand Down
7 changes: 2 additions & 5 deletions test/celeritas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ endif()
#-----------------------------------------------------------------------------#
# Field

if(CELERITAS_USE_VecGeom)
if(CELERITAS_CORE_GEO STREQUAL "VecGeom"
AND (CELERITAS_USE_CUDA OR VecGeom_VERSION VERSION_GREATER_EQUAL "2.0"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't the VG 2.0 solids-based geometry be rebuilt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alas no...

# VecGeom surface cannot rebuild the geometry
set(_fieldprop_filter
FILTER
Expand All @@ -257,10 +258,6 @@ if(CELERITAS_USE_VecGeom)
"SimpleCms*"
"Cmse*"
)
else()
# Other geometries should run everything (and some tests e.g. CMSE are
# disabled)
set(_fieldprop_filter)
endif()

celeritas_add_device_test(field/Fields
Expand Down
Loading
Loading