Skip to content

Conversation

@whokion
Copy link

@whokion whokion commented Dec 17, 2025

Currently, g4vg is installed internally as part of the celeritas and adept builds. Making g4vg available as a standalone external package will allow both celeritas and adept to use a common external library. Once this external is successfully added, celeritas will be updated to use the g4vg external accordingly. This change was requested by @kpedro88.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @whokion for branch IB/CMSSW_16_0_X/master.

@akritkbehera, @cmsbuild, @iarspider, @raoatifshad, @smuzaffar can you please review it and eventually sign? Thanks.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.
cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cms-bot internal usage

@kpedro88
Copy link
Contributor

@whokion ideally the update to celeritas.spec would also be made in this PR

@whokion
Copy link
Author

whokion commented Dec 17, 2025

@kpedro88 I would like to proceed in two steps, as the first step should not affect anything, and make sure it build successfully.

@smuzaffar smuzaffar changed the base branch from IB/CMSSW_16_0_X/master to IB/CMSSW_16_1_X/master December 18, 2025 13:45
@whokion
Copy link
Author

whokion commented Dec 22, 2025

@smuzaffar Thanks for changing the base branch to IB/CMSSW_16_1_X/master. Please let me know if there is anything else I should follow up on.

@@ -0,0 +1,40 @@
### RPM external g4vg v1.0.5
%define g4vg_gitversion %(echo %{realversion} | sed -e 's|^v||;s|-.*||')
Copy link
Contributor

Choose a reason for hiding this comment

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

@whokion , looks like this is not needed ( at least I do not see it's use in the spec file).


%define package_build_flags -Wall -Wextra -pedantic
## INCLUDE geant4-deps
Requires: geant4 vecgeom
Copy link
Contributor

Choose a reason for hiding this comment

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

@whokion , please removed vecgeom dependency from here. It should be conditionally added via geant4-deps if geant4 was built with vecgeom.

</client>
<use name="geant4core"/>
<use name="vecgeom_interface"/>
<use name="vecgeom"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

@whokion , please remove these two dependencies. They will be automaticlaly added via geant4core is geant4 was built with vecgeom

@kpedro88
Copy link
Contributor

kpedro88 commented Jan 5, 2026

@smuzaffar in the case when Geant4 is not built with VecGeom, is VecGeom still built? The point of this external is specifically to "build a VecGeom geometry representation from a Geant4 user application using the in-memory Geant4 volume representation", so I'm not sure if it even makes sense to provide it in the non-VecGeom Geant4 case...

@smuzaffar
Copy link
Contributor

@smuzaffar in the case when Geant4 is not built with VecGeom, is VecGeom still built?

No, as vecgeom dependency is only added via geant4 so in that case we do not build vecgeom.

This external is used by celeritas ... right? I would suggest that we update celeritas.spec to have something like

%{?enable_vecgeom:Requires g4vg}

and then in the cmake configure command enable it

%if %{enable_vecgeom}
  -DCELERITAS_USE_VecGeom=ON
  #flags to enable G4VG
%else
  -DCELERITAS_USE_VecGeom=OFF
  #flags to disable G4VG
%endif

@smuzaffar
Copy link
Contributor

note that having a spec file in cmsdist does not mean that we will built it. We only build externals which are directly of indirectly dependencies of cmssw-tool-conf. So having something like %{?enable_vecgeom:Requires g4vg} in celeritas.spec will built it if vecgeom is enabled.

@whokion
Copy link
Author

whokion commented Jan 5, 2026

@smuzaffar, @kpedro88 Thank you very much for your suggestion and the related comments. I will close this MR for now and reopen a new one with the suggested changes in Celeritas later after further testing.

@whokion whokion closed this Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants