-
Notifications
You must be signed in to change notification settings - Fork 186
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 celeritas as an external package #8867
Comments
A new Issue was created by @whokion Soon Yung Jun. @sextonkennedy, @smuzaffar, @makortel, @rappoccio, @antoniovilela, @Dr15Jones can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
FYI @cms-sw/simulation-l2 |
One fix is that there should be no "final" libraries when compiling without cuda |
Thanks. I updated the attached |
@whokion @sethrj , couple of questions
|
Thanks @smuzaffar !
|
@whokion I suggest making the following changes to make the external dependencies more explicit (avoid linking against things we don't need nor want, e.g. MPI and ROOT) and avoiding --- celeritas.spec.txt 2023-12-13 14:02:18
+++ celeritas.spec.mod 2023-12-13 14:05:19
@@ -6,7 +6,7 @@
Source: git+https://github.com/celeritas-project/celeritas?obj=develop/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz
BuildRequires: cmake
-%define build_flags -Wall -Wextra -pedantic -Werror %{?arch_build_flags} %{?lto_build_flags} %{?pgo_build_flags}
+%define build_flags -Wall -Wextra -pedantic %{?arch_build_flags} %{?lto_build_flags} %{?pgo_build_flags}
Requires: geant4
Requires: vecgeom
@@ -28,10 +28,17 @@
-DCMAKE_BUILD_TYPE=%{cmake_build_type} \
-DCMAKE_CXX_FLAGS="%{build_flags}" \
-DCMAKE_PREFIX_PATH="${VECGEOM_ROOT};${GEANT4_ROOT}" \
+ -DCELERITAS_BUILD_TESTS=OFF \
+ -DCELERITAS_DEBUG=OFF \
-DCELERITAS_USE_CUDA=OFF \
+ -DCELERITAS_USE_Geant4=ON \
-DCELERITAS_USE_HIP=OFF \
- -DCELERITAS_USE_VecGeom=ON \
- -DCELERITAS_USE_Geant4=ON
+ -DCELERITAS_USE_HepMC3=OFF \
+ -DCELERITAS_USE_JSON=ON \
+ -DCELERITAS_USE_MPI=OFF \
+ -DCELERITAS_USE_ROOT=OFF \
+ -DCELERITAS_USE_SWIG=OFF \
+ -DCELERITAS_USE_VecGeom=ON
make %{makeprocesses} VERBOSE=1
|
@smuzaffar I try to link celeritas from SimG4Core/Application using CMSSW_14_0_X_2023-12-27-1100 for the next step, which failed with the following error,
Compiling with -fPIC (scram b USER_CXXFLAGS="-fPIC") (not sure whether this flag should be added at this line when building celeritas) still fails with linking errors,
Looking at celeritas.spec, I find that celerias is built with the cmake option, BUILD_SHARED_LIBS=OFF. Should we also build celeritas with shared libs or is there any other work around? Thank you for your advice. |
@whokion , probably having shared library is a correct step. Concerning SimG4Core/Application - it is not a place to include Celeritas. Please, have a look into SimG4Core/PhysicsLists - there is FTPPCMS_BERT_EMMT and CMSEmStandardPhysicsEMMT, in which G4HepEm is included. The main sub-library SimG4Core/Application should not depend on type of EM physics. |
Thanks @civanch! As we discussed earlier, we will use |
@whokion @civanch , the |
@whokion Instead of adding the flag manually, please set |
Following up #8864, this is a request to add celeritas in CMSSW:
) under scram-tools.file/tools
Requires: celeritas
)Please modify celeritas.spec and celeritas.xml as needed or advise If this request should go through a PR.
Thank you for your help for an initial integration of Celeritas/CPU into CMSSW!
The text was updated successfully, but these errors were encountered: