-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JLSE CMake preset and a few small fixes (#1611)
* Work around maybe-uninitialized warning: In file included from /soft/compilers/gcc/12.2.0/x86_64-suse-linux/include/c++/12.2.0/string:40, from /home/alund/celeritas_project/celeritas/src/corecel/io/Label.hh:12, from /home/alund/celeritas_project/celeritas/test/corecel/io/Label.test.cc:7: In static member function ‘static constexpr int std::char_traits<char>::compare(const char_type*, const char_type*, std::size_t)’, inlined from ‘int std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /soft/compilers/gcc/12.2.0/x86_64-suse-linux/include/c++/12.2.0/bits/basic_string.h:3148:32, inlined from ‘bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]’ at /soft/compilers/gcc/12.2.0/x86_64-suse-linux/include/c++/12.2.0/bits/basic_string.h:3694:27, inlined from ‘bool celeritas::operator<(const Label&, const Label&)’ at /home/alund/celeritas_project/celeritas/src/corecel/io/Label.hh:98:17, inlined from ‘bool celeritas::operator<(const Label&, const Label&)’ at /home/alund/celeritas_project/celeritas/src/corecel/io/Label.hh:92:13, inlined from ‘virtual void celeritas::test::LabelTest_ordering_Test::TestBody()’ at /home/alund/celeritas_project/celeritas/test/corecel/io/Label.test.cc:28:5: /soft/compilers/gcc/12.2.0/x86_64-suse-linux/include/c++/12.2.0/bits/char_traits.h:385:32: error: ‘*(const unsigned char*)((char*)&<unnamed> + offsetof(celeritas::Label, celeritas::Label::ext.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::<unnamed>))’ may be used uninitialized [-Werror=maybe-uninitialized] 385 | return __builtin_memcmp(__s1, __s2, __n); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /home/alund/spack/var/spack/environments/celeritas/.spack-env/view/include/gtest/gtest-printers.h:122, from /home/alund/spack/var/spack/environments/celeritas/.spack-env/view/include/gtest/gtest-matchers.h:49, from /home/alund/spack/var/spack/environments/celeritas/.spack-env/view/include/gtest/internal/gtest-death-test-internal.h:47, from /home/alund/spack/var/spack/environments/celeritas/.spack-env/view/include/gtest/gtest-death-test.h:43, from /home/alund/spack/var/spack/environments/celeritas/.spack-env/view/include/gtest/gtest.h:64, from /home/alund/celeritas_project/celeritas/test/Test.hh:12, from /home/alund/celeritas_project/celeritas/test/celeritas_test.hh:16, from /home/alund/celeritas_project/celeritas/test/corecel/io/Label.test.cc:9: /home/alund/celeritas_project/celeritas/test/corecel/io/Label.test.cc: In member function ‘virtual void celeritas::test::LabelTest_ordering_Test::TestBody()’: /home/alund/celeritas_project/celeritas/test/corecel/io/Label.test.cc:28:50: note: ‘<anonymous>’ declared here 28 | EXPECT_FALSE(Label("a", "2") < Label("a", "1")); | ^ * Fix broken links * Fix and test NormalDistribution copy constructor * Add JLSE cmake preset * Address feedback
- Loading branch information
1 parent
168ddc9
commit b607c51
Showing
6 changed files
with
137 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ | ||
"version": 3, | ||
"cmakeMinimumRequired": {"major": 3, "minor": 21, "patch": 0}, | ||
"configurePresets": [ | ||
{ | ||
"name": ".base", | ||
"hidden": true, | ||
"inherits": ["full"], | ||
"binaryDir": "${sourceDir}/build-${presetName}", | ||
"generator": "Ninja", | ||
"cacheVariables": { | ||
"BUILD_SHARED_LIBS": {"type": "BOOL", "value": "ON"}, | ||
"CELERITAS_BUILD_DOCS": {"type": "BOOL", "value": "OFF"}, | ||
"CELERITAS_USE_OpenMP": {"type": "BOOL", "value": "ON"}, | ||
"CELERITAS_USE_Geant4": {"type": "BOOL", "value": "ON"}, | ||
"CELERITAS_USE_HepMC3": {"type": "BOOL", "value": "ON"}, | ||
"CELERITAS_USE_CUDA": {"type": "BOOL", "value": "ON"}, | ||
"CELERITAS_USE_HIP": {"type": "BOOL", "value": "OFF"}, | ||
"CELERITAS_USE_MPI": {"type": "BOOL", "value": "OFF"}, | ||
"CELERITAS_USE_ROOT": {"type": "BOOL", "value": "ON"}, | ||
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "ON"}, | ||
"CMAKE_CXX_FLAGS": "-Wall -Wextra -pedantic -Werror", | ||
"CMAKE_CXX_STANDARD": "17", | ||
"CMAKE_CXX_EXTENSIONS": {"type": "BOOL", "value": "OFF"}, | ||
"CMAKE_CUDA_FLAGS": "-Werror all-warnings", | ||
"CMAKE_CUDA_ARCHITECTURES": "70;80;90", | ||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install-${presetName}", | ||
"CMAKE_EXPORT_COMPILE_COMMANDS": {"type": "BOOL", "value": "ON"} | ||
} | ||
}, | ||
{ | ||
"name": "base", | ||
"displayName": "JLSE default options (CUDA, VecGeom)", | ||
"inherits": [".base"], | ||
"binaryDir": "${sourceDir}/build" | ||
}, | ||
{ | ||
"name": "release", | ||
"displayName": "Build with optimizations and disable debug assertions", | ||
"inherits": [".base", ".ndebug"], | ||
"binaryDir": "${sourceDir}/build-release" | ||
}, | ||
{ | ||
"name": "reldeb", | ||
"displayName": "Build with basic optimizations and debug assertions", | ||
"inherits": [".base", ".reldeb"], | ||
"binaryDir": "${sourceDir}/build-reldeb", | ||
"cacheVariables": { | ||
"CELERITAS_DEVICE_DEBUG":{"type": "BOOL", "value": "ON"} | ||
} | ||
}, | ||
{ | ||
"name": "debug", | ||
"displayName": "Build with debug assertions", | ||
"inherits": [".base", ".debug"], | ||
"binaryDir": "${sourceDir}/build-debug", | ||
"cacheVariables": { | ||
"CELERITAS_DEVICE_DEBUG":{"type": "BOOL", "value": "ON"} | ||
} | ||
}, | ||
{ | ||
"name": "release-orange", | ||
"displayName": "Build with optimizations and disable VecGeom and debug assertions", | ||
"inherits": [".base", "release"], | ||
"binaryDir": "${sourceDir}/build-release-orange", | ||
"cacheVariables": { | ||
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "OFF"} | ||
} | ||
}, | ||
{ | ||
"name": "reldeb-orange", | ||
"displayName": "Build with debug assertions and disable VecGeom", | ||
"inherits": [".base", "reldeb"], | ||
"binaryDir": "${sourceDir}/build-reldeb-orange", | ||
"cacheVariables": { | ||
"CELERITAS_USE_VecGeom": {"type": "BOOL", "value": "OFF"} | ||
} | ||
}, | ||
{ | ||
"name": "float", | ||
"displayName": "Build with single precision and disable VecGeom", | ||
"inherits": ["reldeb-orange"], | ||
"binaryDir": "${sourceDir}/build-float", | ||
"cacheVariables": { | ||
"CELERITAS_REAL_TYPE": "float" | ||
} | ||
} | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "base", | ||
"configurePreset": "base", | ||
"jobs": 8, | ||
"nativeToolOptions": ["-k0"] | ||
}, | ||
{"name": "release", "configurePreset": "release", "inherits": "base"}, | ||
{"name": "reldeb", "configurePreset": "reldeb", "inherits": "base"}, | ||
{"name": "debug", "configurePreset": "debug", "inherits": "base"}, | ||
{"name": "release-orange", "configurePreset": "release-orange", "inherits": "base"}, | ||
{"name": "reldeb-orange", "configurePreset": "reldeb-orange", "inherits": "base"}, | ||
{"name": "float", "configurePreset": "float", "inherits": "base"} | ||
], | ||
"testPresets": [ | ||
{ | ||
"name": "base", | ||
"configurePreset": "base", | ||
"output": {"outputOnFailure": true}, | ||
"execution": {"noTestsAction": "error", "stopOnFailure": false, "jobs": 8} | ||
}, | ||
{"name": "release", "configurePreset": "release", "inherits": "base"}, | ||
{"name": "reldeb", "configurePreset": "reldeb", "inherits": "base"}, | ||
{"name": "debug", "configurePreset": "debug", "inherits": "base"}, | ||
{"name": "release-orange", "configurePreset": "release-orange", "inherits": "base"}, | ||
{"name": "reldeb-orange", "configurePreset": "reldeb-orange", "inherits": "base"}, | ||
{"name": "float", "configurePreset": "float", "inherits": "base"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters