Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions acts.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### RPM external acts v44.0.1
## INITENV +PATH PYTHON3PATH %{i}/python
## INCLUDE microarch_flags
## INCLUDE cuda-flags
## INCLUDE rocm-flags
Expand All @@ -10,27 +11,33 @@
Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz
Source99: scram-tools.file/tools/eigen/env

# Do not build the Acts and Traccc tests
%define build_test 0
# Build the Acts and Traccc tests
%define build_test 1

BuildRequires: cmake
Copy link
Contributor

Choose a reason for hiding this comment

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

@fwyzard , please also explicitly add gmake in BuildRequires

BuildRequires: gmake
Requires: boost
Requires: bz2lib
Requires: dd4hep
Requires: eigen
Requires: expat
Requires: fastjet
Requires: geant4
Requires: json
Requires: python3
Requires: py3-pybind11
Requires: root
Requires: xerces-c
Requires: zlib
%{!?without_cuda:Requires: cuda}
%{!?without_rocm:Requires: rocm}
%if %{build_test}
# These are ony used to build the examples and unit tests
Requires: hepmc3
Requires: tbb
# These are used through hepmc3, and need to be available to CMake
Requires: bz2lib
Requires: zlib
Requires: zstd
Requires: xz
%endif

%prep
Expand Down Expand Up @@ -63,7 +70,7 @@ cmake ../%{n}-%{realversion} \
-DCMAKE_SKIP_INSTALL_RPATH="ON" \
%if 0%{!?without_cuda:1}
-DCMAKE_CUDA_ARCHITECTURES="$(echo %{cuda_arch} | sed -e 's/ \+/;/g')" \
-DCMAKE_CUDA_FLAGS="-Wno-deprecated-gpu-targets --threads 0" \
-DCMAKE_CUDA_FLAGS="-Wno-deprecated-gpu-targets" \
%endif
%if 0%{!?without_rocm:1}
-DCMAKE_HIP_ARCHITECTURES="$(echo %{rocm_archs} | sed -e 's/ \+/;/g')" \
Expand All @@ -72,13 +79,16 @@ cmake ../%{n}-%{realversion} \
-DBUILD_SHARED_LIBS="ON" \
-DACTS_NLOHMANNJSON_SOURCE="" \
-DACTS_USE_SYSTEM_NLOHMANN_JSON="ON" \
-DACTS_USE_SYSTEM_PYBIND11="ON" \
-DACTS_BUILD_PLUGIN_ACTSVG="ON" \
-DACTS_BUILD_PLUGIN_FASTJET="ON" \
-DACTS_BUILD_PLUGIN_JSON="ON" \
-DACTS_BUILD_PLUGIN_ROOT="ON" \
-DACTS_BUILD_PLUGIN_DD4HEP="ON" \
-DACTS_BUILD_PLUGIN_GEANT4="ON" \
-DACTS_BUILD_PLUGIN_TRACCC="ON" \
-DACTS_ENABLE_LOG_FAILURE_THRESHOLD="ON" \
-DACTSVG_USE_SYSTEM_PYBIND11="ON" \
-DCOVFIE_PLATFORM_CPU="ON" \
-DCOVFIE_PLATFORM_CUDA="%{cuda_enabled}" \
-DCOVFIE_PLATFORM_HIP="%{rocm_enabled}" \
Expand Down Expand Up @@ -110,12 +120,6 @@ make %{makeprocesses} VERBOSE=1
cd ../build
make install VERBOSE=1

%if %{build_test}
# download the traccc test data file to the .../data directory
mkdir -p %{i}/data
./_deps/traccc-src/data/traccc_data_get_files.sh -o %{i}/data
%endif

# remove the scripts used to set the Acts environment variables
rm %{i}/bin/this_acts.sh
rm %{i}/bin/this_acts_withdeps.sh
Expand Down
23 changes: 23 additions & 0 deletions actsdata.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### RPM external actsdata v10
## NOCOMPILER

%define archive traccc-data-%{realversion}.tar.gz
Source: https://acts.web.cern.ch/traccc/data/%{archive}

%prep

%build

%install
cp %{SOURCE0} %{i}/%{archive}

%post
LOCAL_PKG=${RPM_INSTALL_PREFIX}/%{pkgrel}
SHARE_PKG=${RPM_INSTALL_PREFIX}/share/%{pkgcategory}/%{n}/%{realversion}
if ! [ -d ${SHARE_PKG} ]; then
mkdir -p ${SHARE_PKG}
tar xvzf ${LOCAL_PKG}/%{archive} -C ${SHARE_PKG}
fi
rm -f ${LOCAL_PKG}/%{archive}
cd ${LOCAL_PKG}/
ln -s ../../../../share/%{pkgcategory}/%{n}/%{realversion}/* .
1 change: 1 addition & 0 deletions cmssw-tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Requires: TOPO
Requires: CICADA
Requires: OpenBLAS
Requires: acts
Requires: actsdata
%if %{enable_vecgeom}
Requires: celeritas
%endif
Expand Down
6 changes: 6 additions & 0 deletions scram-tools.file/tools/acts/acts-fastjet.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<tool name="@TOOL_FILENAME@" version="@TOOL_VERSION@" revision="1">
<info url="https://acts.readthedocs.io/en/latest/plugins/plugins.html"/>
<lib name="ActsPluginFastJet"/>
<use name="acts-core"/>
<use name="fastjet"/>
</tool>
8 changes: 8 additions & 0 deletions scram-tools.file/tools/actsdata/actsdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<tool name="@TOOL_FILENAME@" version="@TOOL_VERSION@" revision="1">
<!-- set the environment for the Traccc test data -->
<info url="https://github.com/acts-project/traccc/"/>
<client>
<environment name="@TOOL_BASE@" default="@TOOL_ROOT@"/>
</client>
<runtime name="TRACCC_TEST_DATA_DIR" value="$@TOOL_BASE@"/>
</tool>