Skip to content

Commit 37dd679

Browse files
authored
Merge pull request #10156 from fwyzard/IB/CMSSW_16_0_X/master_acts_for_cms
Integrate ACTS v44.0.1 (with minimal changes) as an external
2 parents b3a7b9b + bc3b548 commit 37dd679

21 files changed

+294
-0
lines changed

acts.spec

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
### RPM external acts v44.0.1
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+
%define tag 2d4cf6938
10+
%define branch cms/%{realversion}
11+
%define github_user cms-externals
12+
Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz
13+
Source99: scram-tools.file/tools/eigen/env
14+
15+
# Do not build the Acts and Traccc tests
16+
%define build_test 0
17+
18+
# ROCm support is not yet building correctly
19+
%define without_rocm 1
20+
21+
BuildRequires: cmake
22+
Requires: boost
23+
Requires: dd4hep
24+
Requires: eigen
25+
Requires: expat
26+
Requires: geant4
27+
Requires: json
28+
Requires: python3
29+
Requires: root
30+
Requires: xerces-c
31+
Requires: zlib
32+
%{!?without_cuda:Requires: cuda}
33+
%{!?without_rocm:Requires: rocm}
34+
%if %{build_test}
35+
# These are ony used to build the examples and unit tests
36+
Requires: hepmc3
37+
Requires: tbb
38+
%endif
39+
40+
%prep
41+
%setup -n %{n}-%{realversion}
42+
43+
%build
44+
rm -rf ../build
45+
mkdir ../build
46+
cd ../build
47+
source %{_sourcedir}/env
48+
49+
%define cuda_enabled %{?without_cuda:OFF}%{!?without_cuda:ON}
50+
%define rocm_enabled %{?without_rocm:OFF}%{!?without_rocm:ON}
51+
52+
# Notes:
53+
# - gcc-ar and gcc-ranlib are needed to build static libraries with LTO support.
54+
# - building with RPATH enabled is necessary to build and run the tests; set CMAKE_SKIP_INSTALL_RPATH to strip the RPATH
55+
# information after installing the libraries.
56+
# - HIP/ROCm support is not yet working correctly.
57+
58+
cmake ../%{n}-%{realversion} \
59+
-DCMAKE_PREFIX_PATH="%{cmake_prefix_path}" \
60+
-DCMAKE_CXX_COMPILER="$GCC_ROOT/bin/g++" \
61+
-DCMAKE_CXX_STANDARD="%{cms_cxx_standard}" \
62+
-DCMAKE_CXX_FLAGS="-fPIC $CMS_EIGEN_CXX_FLAGS %{arch_build_flags} %{selected_microarch} %{lto_build_flags}" \
63+
-DCMAKE_AR="$GCC_ROOT/bin/gcc-ar" \
64+
-DCMAKE_RANLIB="$GCC_ROOT/bin/gcc-ranlib" \
65+
-DCMAKE_BUILD_TYPE="Release" \
66+
-DCMAKE_INSTALL_PREFIX="%{i}" \
67+
-DCMAKE_SKIP_INSTALL_RPATH="ON" \
68+
-DCMAKE_CUDA_ARCHITECTURES="$(echo %{cuda_arch} | sed -e 's/ \+/;/g')" \
69+
-DCMAKE_CUDA_FLAGS="-Wno-deprecated-gpu-targets --threads 0" \
70+
-DCMAKE_HIP_ARCHITECTURES="$(echo %{rocm_archs} | sed -e 's/ \+/;/g')" \
71+
-DAMDGPU_TARGETS="$(echo %{rocm_archs} | sed -e 's/ \+/;/g')" \
72+
-DBUILD_SHARED_LIBS="ON" \
73+
-DACTS_NLOHMANNJSON_SOURCE="" \
74+
-DACTS_USE_SYSTEM_NLOHMANN_JSON="ON" \
75+
-DACTS_BUILD_PLUGIN_ACTSVG="ON" \
76+
-DACTS_BUILD_PLUGIN_JSON="ON" \
77+
-DACTS_BUILD_PLUGIN_ROOT="ON" \
78+
-DACTS_BUILD_PLUGIN_DD4HEP="ON" \
79+
-DACTS_BUILD_PLUGIN_GEANT4="ON" \
80+
-DACTS_BUILD_PLUGIN_TRACCC="ON" \
81+
-DACTS_ENABLE_LOG_FAILURE_THRESHOLD="ON" \
82+
-DCOVFIE_PLATFORM_CPU="ON" \
83+
-DCOVFIE_PLATFORM_CUDA="%{cuda_enabled}" \
84+
-DCOVFIE_PLATFORM_HIP="%{rocm_enabled}" \
85+
-DDETRAY_SETUP_NLOHMANN="ON" \
86+
-DDETRAY_USE_SYSTEM_NLOHMANN="ON" \
87+
-DDETRAY_BUILD_HOST="ON" \
88+
-DDETRAY_BUILD_CUDA="%{cuda_enabled}" \
89+
-DDETRAY_BUILD_HIP="%{rocm_enabled}" \
90+
-DTRACCC_BUILD_CUDA="%{cuda_enabled}" \
91+
-DTRACCC_BUILD_HIP="%{rocm_enabled}" \
92+
-DTRACCC_SETUP_THRUST="%{cuda_enabled}" \
93+
-DTRACCC_SETUP_ROCTHRUST="%{rocm_enabled}" \
94+
-DTRACCC_USE_SYSTEM_THRUST="%{cuda_enabled}" \
95+
-DTRACCC_USE_SYSTEM_ROCTHRUST="%{rocm_enabled}" \
96+
-DVECMEM_BUILD_CUDA_LIBRARY="%{cuda_enabled}" \
97+
-DVECMEM_BUILD_HIP_LIBRARY="%{rocm_enabled}" \
98+
%if %{build_test}
99+
-DACTS_BUILD_UNITTESTS="ON" \
100+
-DACTS_BUILD_INTEGRATIONTESTS="ON" \
101+
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS="ON" \
102+
-DTRACCC_BUILD_TESTING="ON" \
103+
%endif
104+
-L
105+
106+
make %{makeprocesses} VERBOSE=1
107+
108+
%install
109+
cd ../build
110+
make install VERBOSE=1
111+
112+
%if %{build_test}
113+
# download the traccc test data file to the .../data directory
114+
mkdir -p %{i}/data
115+
./_deps/traccc-src/data/traccc_data_get_files.sh -o %{i}/data
116+
%endif
117+
118+
# remove the scripts used to set the Acts environment variables
119+
rm %{i}/bin/this_acts.sh
120+
rm %{i}/bin/this_acts_withdeps.sh
121+
122+
%post
123+
%{relocateConfig}lib64/cmake/*/*.cmake

cmssw-tools.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Requires: AXOL1TL
88
Requires: TOPO
99
Requires: CICADA
1010
Requires: OpenBLAS
11+
Requires: acts
1112
Requires: celeritas
1213
Requires: crab
1314
Requires: cmssw-wm-tools
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
</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>

0 commit comments

Comments
 (0)