Skip to content
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

Add a VecGeom+RelWithDebInfo+debug build to the CI #715

Merged
merged 9 commits into from
May 10, 2023
16 changes: 16 additions & 0 deletions .jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@ pipeline {
}
}
}
stage('vecgeom-reldeb') {
agent {
docker {
image 'celeritas/ci-jammy-cuda11:2023-03-13'
label 'NVIDIA_Tesla_V100-PCIE-32GB && nvidia-docker && large_images'
}
}
steps {
sh 'entrypoint-shell ./scripts/ci/run-ci.sh ubuntu-cuda vecgeom-reldeb'
}
post {
always {
xunit reduceLog: false, tools:[CTest(deleteOutputFiles: true, failIfNotNew: true, pattern: 'build/Testing/**/Test.xml', skipNoTestFiles: false, stopProcessingIfError: true)]
}
}
}
stage('vecgeom-demos') {
agent {
docker {
Expand Down
7 changes: 7 additions & 0 deletions scripts/cmake-presets/ci-ubuntu-cuda.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
"description": "Build everything but VecGeom in release mode",
"inherits": [".ndebug", "full-novg"]
},
{
"name": "vecgeom-reldeb",
"description": "Build with RelWithDebInfo, assertions, and VecGeom",
"inherits": [".reldeb", ".vecgeom", "base"]
},
{
"name": "vecgeom-tests",
"description": "Build tests in debug with vecgeom",
Expand Down Expand Up @@ -88,6 +93,7 @@
},
{"name": "full-novg" , "configurePreset": "full-novg" , "inherits": "base"},
{"name": "full-novg-ndebug", "configurePreset": "full-novg-ndebug", "inherits": "base", "targets": ["all", "install"]},
{"name": "vecgeom-reldeb" , "configurePreset": "vecgeom-reldeb" , "inherits": "base", "targets": ["all", "install"]},
{"name": "vecgeom-tests" , "configurePreset": "vecgeom-tests" , "inherits": "base", "jobs": 8},
{"name": "vecgeom-demos" , "configurePreset": "vecgeom-demos" , "inherits": "base", "jobs": 8, "targets": ["app/all", "install"]}
],
Expand All @@ -109,6 +115,7 @@
},
{"name": "full-novg" , "configurePreset": "full-novg" , "inherits": "base"},
{"name": "full-novg-ndebug", "configurePreset": "full-novg-ndebug", "inherits": "base"},
{"name": "vecgeom-reldeb" , "configurePreset": "vecgeom-reldeb" , "inherits": "base"},
{"name": "vecgeom-tests" , "configurePreset": "vecgeom-tests" , "inherits": "base"},
{"name": "vecgeom-demos" , "configurePreset": "vecgeom-demos" , "inherits": "base",
"filter": {
Expand Down
2 changes: 1 addition & 1 deletion src/accel/detail/HitProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ bool HitProcessor::update_touchable(Real3 const& pos,
// Check that physical and logical volumes are consistent
G4VPhysicalVolume* pv = touchable->GetVolume(0);
CELER_ASSERT(pv);
if (!CELER_UNLIKELY(pv->GetLogicalVolume() != lv))
if (!CELER_UNLIKELY((pv->GetLogicalVolume() != lv)))
{
return true;
}
Expand Down
10 changes: 2 additions & 8 deletions src/celeritas/ext/detail/GenericPlacedVolume.hh
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,7 @@ class GenericPlacedVolume : public vecgeom::VPlacedVolume
}

#ifdef VECGEOM_ROOT
virtual TGeoShape const* ConvertToRoot() const override
{
return nullptr;
}
virtual TGeoShape const* ConvertToRoot() const override { return nullptr; }
#endif

//! Dispatch to VecGeom function for shape's bounding box in its local
Expand Down Expand Up @@ -272,10 +269,7 @@ class GenericPlacedVolume : public vecgeom::VPlacedVolume
//
// These implementations are required when CUDA is enabled.
// A trivialimplementation is okay, since won't be called from GPU.
virtual size_t DeviceSizeOf() const override
{
return 0;
}
virtual size_t DeviceSizeOf() const override { return 0; }

DevicePtr<CudaVPlacedVolume>
CopyToGpu(DevicePtr<CudaLogicalVolume> const,
Expand Down
5 changes: 1 addition & 4 deletions src/celeritas/ext/detail/GenericSolid.hh
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ class GenericSolid : public GenericSolidBase
//
// These implementations are required when CUDA is enabled.
// A trivialimplementation is okay, since won't be called from GPU.
size_t DeviceSizeOf() const
{
return 0;
}
size_t DeviceSizeOf() const { return 0; }
DevicePtr<CudaUnplacedVolume> CopyToGpu() const
{
CELER_NOT_IMPLEMENTED("GenericSolid with CUDA");
Expand Down
6 changes: 3 additions & 3 deletions src/celeritas/user/SimpleCaloData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ namespace celeritas
*/
template<MemSpace M>
void resize(SimpleCaloStateData<Ownership::value, M>* state,
HostCRef<SimpleCaloParamsData> const& params,
StreamId,
size_type num_track_slots)
HostCRef<SimpleCaloParamsData> const& params,
StreamId,
size_type num_track_slots)
{
CELER_EXPECT(params);
resize(&state->energy_deposition, params.num_detectors);
Expand Down
3 changes: 2 additions & 1 deletion src/corecel/data/CollectionAlgorithms.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ namespace celeritas
template<class T, Ownership W, MemSpace M, class I>
void fill(T&& value, Collection<T, W, M, I>* col)
{
static_assert(W != Ownership::const_reference, "const references cannot be filled");
static_assert(W != Ownership::const_reference,
"const references cannot be filled");
CELER_EXPECT(col);
detail::Filler<T, M> fill_impl{value};
fill_impl((*col)[AllItems<T, M>{}]);
Expand Down