Skip to content

Commit 01ca53d

Browse files
committed
Integrate ACTS v44.0.1 (with minimal changes) as an external
Enable the plugins for SVG, Json, Root, DD4Hep, Geant4, Covfie, and Detray, and define individual tools for each Acts plugin and external library. Backport acts-project/acts#4357 to the v44.0.x branch: implement the Gen3 geometry to detray conversion. Backport acts-project/acts#4727 to the v44.0.x branch: update Traccc to v0.25.0 to be compatible with Acts v44.0.x, with the corresponding external updates: - detary v0.103.0 - covfie v0.15.2 - vecmem v1.21.0 - algebra plugins v0.28.0 Target the CUDA and ROCm architectures supported by CMSSW.
1 parent c0ee1c8 commit 01ca53d

20 files changed

Lines changed: 249 additions & 0 deletions

acts.spec

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
### RPM external acts 44.0.1-cms2
2+
## INCLUDE cpp-standard
3+
## INCLUDE microarch_flags
4+
## INCLUDE compilation_flags
5+
## INCLUDE compilation_flags_lto
6+
## INCLUDE cuda-flags
7+
## INCLUDE rocm-flags
8+
9+
Source: https://github.com/fwyzard/%{n}/archive/refs/tags/v%{realversion}.tar.gz
10+
Source99: scram-tools.file/tools/eigen/env
11+
12+
BuildRequires: cmake
13+
Requires: python3
14+
Requires: xerces-c
15+
Requires: dd4hep
16+
Requires: json
17+
Requires: expat
18+
Requires: zlib
19+
Requires: geant4
20+
Requires: boost
21+
Requires: eigen
22+
Requires: root
23+
%{!?without_cuda:Requires: cuda}
24+
%{!?without_rocm:Requires: rocm}
25+
26+
%prep
27+
%setup -n %{n}-%{realversion}
28+
29+
%build
30+
rm -rf ../build
31+
mkdir ../build
32+
cd ../build
33+
source %{_sourcedir}/env
34+
35+
%define cuda_enabled %{?without_cuda:OFF}%{!?without_cuda:ON}
36+
%define rocm_enabled %{?without_rocm:OFF}%{!?without_rocm:ON}
37+
38+
cmake ../%{n}-%{realversion} \
39+
-DCMAKE_CXX_FLAGS="-fPIC $CMS_EIGEN_CXX_FLAGS %{arch_build_flags} %{selected_microarch} %{lto_build_flags}" \
40+
-DCMAKE_CXX_STANDARD=%{cms_cxx_standard} \
41+
-DCMAKE_INSTALL_PREFIX="%{i}" \
42+
-DCMAKE_BUILD_TYPE=Release \
43+
-DCMAKE_PREFIX_PATH="${PYTHON3_ROOT};${XERCES_C_ROOT};${DD4HEP_ROOT};${JSON_ROOT};${EXPAT_ROOT};${ZLIB_ROOT};${GEANT4_ROOT};${BOOST_ROOT};${EIGEN_ROOT};${ROOT_ROOT}%{!?without_cuda:;${CUDA_ROOT}}%{!?without_rocm:;${ROCM_ROOT}}" \
44+
-DCMAKE_SKIP_RPATH=ON \
45+
-DCMAKE_CUDA_ARCHITECTURES=$(echo %{cuda_arch} | sed -e 's/ \+/;/g') \
46+
-DCMAKE_CUDA_FLAGS="--threads 0" \
47+
-DCMAKE_HIP_ARCHITECTURES=$(echo %{rocm_archs} | sed -e 's/ \+/;/g') \
48+
-DBUILD_SHARED_LIBS=ON \
49+
-DACTS_USE_SYSTEM_NLOHMANN_JSON=ON \
50+
-DACTS_BUILD_PLUGIN_ACTSVG=ON \
51+
-DACTS_BUILD_PLUGIN_JSON=ON \
52+
-DACTS_BUILD_PLUGIN_ROOT=ON \
53+
-DACTS_BUILD_PLUGIN_DD4HEP=ON \
54+
-DACTS_BUILD_PLUGIN_GEANT4=ON \
55+
-DACTS_BUILD_PLUGIN_TRACCC=ON \
56+
-DACTS_ENABLE_LOG_FAILURE_THRESHOLD=ON \
57+
-DCOVFIE_PLATFORM_CPU=ON \
58+
-DCOVFIE_PLATFORM_CUDA=%{cuda_enabled} \
59+
-DCOVFIE_PLATFORM_HIP=%{rocm_enabled} \
60+
-DDETRAY_BUILD_HOST=ON \
61+
-DDETRAY_BUILD_CUDA=%{cuda_enabled} \
62+
-DDETRAY_BUILD_HIP=%{cuda_enabled} \
63+
-DTRACCC_BUILD_CUDA=%{cuda_enabled} \
64+
-DTRACCC_BUILD_HIP=%{rocm_enabled} \
65+
-DTRACCC_USE_SYSTEM_THRUST=ON \
66+
-DTRACCC_USE_SYSTEM_ROCTHRUST=ON \
67+
-DVECMEM_BUILD_CUDA_LIBRARY=%{cuda_enabled} \
68+
-DVECMEM_BUILD_HIP_LIBRARY=%{rocm_enabled} \
69+
-L
70+
71+
make %{makeprocesses} VERBOSE=1
72+
73+
%install
74+
make -C ../build install VERBOSE=1
75+
76+
%post
77+
%{relocateConfig}lib64/cmake/*/*.cmake
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<tool name="acts-common" version="@TOOL_VERSION@" revision="1">
2+
<!-- common tool that defines the directories and common flags for all Acts tool -->
3+
<info url="https://acts.readthedocs.io/en/latest/index.html"/>
4+
<flags CXXFLAGS="-Wno-missing-braces"/>
5+
<flags CXXFLAGS="-DACTS_ENABLE_LOG_FAILURE_THRESHOLD"/>
6+
<client>
7+
<environment name="@TOOL_BASE@" default="@TOOL_ROOT@"/>
8+
<environment name="LIBDIR" default="$@TOOL_BASE@/lib64"/>
9+
<environment name="INCLUDE" default="$@TOOL_BASE@/include"/>
10+
</client>
11+
</tool>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<tool name="acts-core" version="@TOOL_VERSION@" revision="1">
2+
<info url="https://acts.readthedocs.io/en/latest/index.html"/>
3+
<lib name="ActsCore"/>
4+
<use name="acts-common"/>
5+
<use name="boost_header"/>
6+
<use name="eigen"/>
7+
</tool>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<tool name="acts-covfie" version="@TOOL_VERSION@" revision="1">
2+
<info url="https://acts.readthedocs.io/en/latest/plugins/plugins.html"/>
3+
<lib name="ActsPluginCovfie"/>
4+
<use name="acts-core"/>
5+
<use name="covfie"/>
6+
</tool>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<tool name="acts-dd4hep" version="@TOOL_VERSION@" revision="1">
2+
<info url="https://acts.readthedocs.io/en/latest/plugins/dd4hep.html"/>
3+
<lib name="ActsPluginDD4hep"/>
4+
<use name="acts-core"/>
5+
<use name="acts-root"/>
6+
<use name="dd4hep-core"/>
7+
<use name="rootcling"/>
8+
<use name="rootcore"/>
9+
<use name="rootgeom"/>
10+
<use name="roothistmatrix"/>
11+
<use name="rootimt"/>
12+
<use name="rootmath"/>
13+
<use name="rootphysics"/>
14+
<use name="rootrint"/>
15+
<use name="rootrio"/>
16+
<use name="rootthread"/>
17+
<use name="xerces-c"/>
18+
<!-- If this is really needed, move it to xerces-c/xerces-c.xml -->
19+
<runtime name="LC_ALL" value="C"/>
20+
</tool>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<tool name="acts-detray" version="@TOOL_VERSION@" revision="1">
2+
<info url="https://github.com/acts-project/detray"/>
3+
<lib name="ActsPluginDetray"/>
4+
<use name="acts-core"/>
5+
<use name="actsvg"/>
6+
<use name="detray"/>
7+
<use name="vecmem"/>
8+
</tool>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<tool name="acts-geant4" version="@TOOL_VERSION@" revision="1">
2+
<info url="https://acts.readthedocs.io/en/latest/plugins/geant4.html"/>
3+
<lib name="ActsPluginGeant4"/>
4+
<use name="acts-core"/>
5+
<use name="acts-root"/>
6+
<use name="clhep"/>
7+
<use name="expat"/>
8+
<use name="geant4core"/>
9+
<use name="geant4vis"/>
10+
<use name="xerces-c"/>
11+
<use name="zlib"/>
12+
</tool>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<tool name="acts-json" version="@TOOL_VERSION@" revision="1">
2+
<info url="https://acts.readthedocs.io/en/latest/plugins/json.html"/>
3+
<lib name="ActsPluginJson"/>
4+
<use name="acts-core"/>
5+
<use name="json"/>
6+
</tool>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<tool name="acts-root" version="@TOOL_VERSION@" revision="1">
2+
<info url="https://acts.readthedocs.io/en/latest/plugins/root.html"/>
3+
<lib name="ActsPluginRoot"/>
4+
<use name="acts-core"/>
5+
<use name="rootcling"/>
6+
<use name="rootcore"/>
7+
<use name="rootgeom"/>
8+
<use name="roothistmatrix"/>
9+
<use name="rootimt"/>
10+
<use name="rootmathcore"/>
11+
<use name="rootrio"/>
12+
<use name="rootthread"/>
13+
</tool>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<tool name="acts-svg" version="@TOOL_VERSION@" revision="1">
2+
<info url="https://acts.readthedocs.io/en/latest/plugins/plugins.html"/>
3+
<lib name="ActsPluginActSVG"/>
4+
<use name="acts-core"/>
5+
<use name="actsvg"/>
6+
</tool>

0 commit comments

Comments
 (0)