diff --git a/acts.spec b/acts.spec new file mode 100644 index 00000000000..1452dc8d260 --- /dev/null +++ b/acts.spec @@ -0,0 +1,123 @@ +### RPM external acts v44.0.1 +## INCLUDE cpp-standard +## INCLUDE microarch_flags +## INCLUDE compilation_flags +## INCLUDE compilation_flags_lto +## INCLUDE cuda-flags +## INCLUDE rocm-flags + +%define tag 2d4cf6938 +%define branch cms/%{realversion} +%define github_user cms-externals +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 + +# ROCm support is not yet building correctly +%define without_rocm 1 + +BuildRequires: cmake +Requires: boost +Requires: dd4hep +Requires: eigen +Requires: expat +Requires: geant4 +Requires: json +Requires: python3 +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 +%endif + +%prep +%setup -n %{n}-%{realversion} + +%build +rm -rf ../build +mkdir ../build +cd ../build +source %{_sourcedir}/env + +%define cuda_enabled %{?without_cuda:OFF}%{!?without_cuda:ON} +%define rocm_enabled %{?without_rocm:OFF}%{!?without_rocm:ON} + +# Notes: +# - gcc-ar and gcc-ranlib are needed to build static libraries with LTO support. +# - building with RPATH enabled is necessary to build and run the tests; set CMAKE_SKIP_INSTALL_RPATH to strip the RPATH +# information after installing the libraries. +# - HIP/ROCm support is not yet working correctly. + +cmake ../%{n}-%{realversion} \ + -DCMAKE_PREFIX_PATH="%{cmake_prefix_path}" \ + -DCMAKE_CXX_COMPILER="$GCC_ROOT/bin/g++" \ + -DCMAKE_CXX_STANDARD="%{cms_cxx_standard}" \ + -DCMAKE_CXX_FLAGS="-fPIC $CMS_EIGEN_CXX_FLAGS %{arch_build_flags} %{selected_microarch} %{lto_build_flags}" \ + -DCMAKE_AR="$GCC_ROOT/bin/gcc-ar" \ + -DCMAKE_RANLIB="$GCC_ROOT/bin/gcc-ranlib" \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_INSTALL_PREFIX="%{i}" \ + -DCMAKE_SKIP_INSTALL_RPATH="ON" \ + -DCMAKE_CUDA_ARCHITECTURES="$(echo %{cuda_arch} | sed -e 's/ \+/;/g')" \ + -DCMAKE_CUDA_FLAGS="-Wno-deprecated-gpu-targets --threads 0" \ + -DCMAKE_HIP_ARCHITECTURES="$(echo %{rocm_archs} | sed -e 's/ \+/;/g')" \ + -DAMDGPU_TARGETS="$(echo %{rocm_archs} | sed -e 's/ \+/;/g')" \ + -DBUILD_SHARED_LIBS="ON" \ + -DACTS_NLOHMANNJSON_SOURCE="" \ + -DACTS_USE_SYSTEM_NLOHMANN_JSON="ON" \ + -DACTS_BUILD_PLUGIN_ACTSVG="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" \ + -DCOVFIE_PLATFORM_CPU="ON" \ + -DCOVFIE_PLATFORM_CUDA="%{cuda_enabled}" \ + -DCOVFIE_PLATFORM_HIP="%{rocm_enabled}" \ + -DDETRAY_SETUP_NLOHMANN="ON" \ + -DDETRAY_USE_SYSTEM_NLOHMANN="ON" \ + -DDETRAY_BUILD_HOST="ON" \ + -DDETRAY_BUILD_CUDA="%{cuda_enabled}" \ + -DDETRAY_BUILD_HIP="%{rocm_enabled}" \ + -DTRACCC_BUILD_CUDA="%{cuda_enabled}" \ + -DTRACCC_BUILD_HIP="%{rocm_enabled}" \ + -DTRACCC_SETUP_THRUST="%{cuda_enabled}" \ + -DTRACCC_SETUP_ROCTHRUST="%{rocm_enabled}" \ + -DTRACCC_USE_SYSTEM_THRUST="%{cuda_enabled}" \ + -DTRACCC_USE_SYSTEM_ROCTHRUST="%{rocm_enabled}" \ + -DVECMEM_BUILD_CUDA_LIBRARY="%{cuda_enabled}" \ + -DVECMEM_BUILD_HIP_LIBRARY="%{rocm_enabled}" \ +%if %{build_test} + -DACTS_BUILD_UNITTESTS="ON" \ + -DACTS_BUILD_INTEGRATIONTESTS="ON" \ + -DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS="ON" \ + -DTRACCC_BUILD_TESTING="ON" \ +%endif + -L + +make %{makeprocesses} VERBOSE=1 + +%install +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 + +%post +%{relocateConfig}lib64/cmake/*/*.cmake diff --git a/cmssw-tools.spec b/cmssw-tools.spec index 19abc3797b2..4ae9ce2b035 100644 --- a/cmssw-tools.spec +++ b/cmssw-tools.spec @@ -8,6 +8,7 @@ Requires: AXOL1TL Requires: TOPO Requires: CICADA Requires: OpenBLAS +Requires: acts Requires: celeritas Requires: crab Requires: cmssw-wm-tools diff --git a/scram-tools.file/tools/acts/acts-common.xml b/scram-tools.file/tools/acts/acts-common.xml new file mode 100644 index 00000000000..212f34bc1a2 --- /dev/null +++ b/scram-tools.file/tools/acts/acts-common.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/scram-tools.file/tools/acts/acts-core.xml b/scram-tools.file/tools/acts/acts-core.xml new file mode 100644 index 00000000000..ad7e5f708a3 --- /dev/null +++ b/scram-tools.file/tools/acts/acts-core.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/scram-tools.file/tools/acts/acts-covfie.xml b/scram-tools.file/tools/acts/acts-covfie.xml new file mode 100644 index 00000000000..01da6e60484 --- /dev/null +++ b/scram-tools.file/tools/acts/acts-covfie.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/scram-tools.file/tools/acts/acts-dd4hep.xml b/scram-tools.file/tools/acts/acts-dd4hep.xml new file mode 100644 index 00000000000..c78f7e8d4ea --- /dev/null +++ b/scram-tools.file/tools/acts/acts-dd4hep.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/scram-tools.file/tools/acts/acts-detray.xml b/scram-tools.file/tools/acts/acts-detray.xml new file mode 100644 index 00000000000..224e2f0da67 --- /dev/null +++ b/scram-tools.file/tools/acts/acts-detray.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/scram-tools.file/tools/acts/acts-geant4.xml b/scram-tools.file/tools/acts/acts-geant4.xml new file mode 100644 index 00000000000..8bf051f99e8 --- /dev/null +++ b/scram-tools.file/tools/acts/acts-geant4.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/scram-tools.file/tools/acts/acts-json.xml b/scram-tools.file/tools/acts/acts-json.xml new file mode 100644 index 00000000000..a629c3147fc --- /dev/null +++ b/scram-tools.file/tools/acts/acts-json.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/scram-tools.file/tools/acts/acts-root.xml b/scram-tools.file/tools/acts/acts-root.xml new file mode 100644 index 00000000000..ba7926ab5b1 --- /dev/null +++ b/scram-tools.file/tools/acts/acts-root.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/scram-tools.file/tools/acts/acts-svg.xml b/scram-tools.file/tools/acts/acts-svg.xml new file mode 100644 index 00000000000..ecae63eb1df --- /dev/null +++ b/scram-tools.file/tools/acts/acts-svg.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/scram-tools.file/tools/acts/actsvg.xml b/scram-tools.file/tools/acts/actsvg.xml new file mode 100644 index 00000000000..7bde1e38a69 --- /dev/null +++ b/scram-tools.file/tools/acts/actsvg.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/scram-tools.file/tools/acts/covfie.xml b/scram-tools.file/tools/acts/covfie.xml new file mode 100644 index 00000000000..cb7e1127b30 --- /dev/null +++ b/scram-tools.file/tools/acts/covfie.xml @@ -0,0 +1,4 @@ + + + + diff --git a/scram-tools.file/tools/acts/detray.xml b/scram-tools.file/tools/acts/detray.xml new file mode 100644 index 00000000000..1c44e5e1ac4 --- /dev/null +++ b/scram-tools.file/tools/acts/detray.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/scram-tools.file/tools/acts/traccc-cuda.xml b/scram-tools.file/tools/acts/traccc-cuda.xml new file mode 100644 index 00000000000..ff22808a092 --- /dev/null +++ b/scram-tools.file/tools/acts/traccc-cuda.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/scram-tools.file/tools/acts/traccc-io.xml b/scram-tools.file/tools/acts/traccc-io.xml new file mode 100644 index 00000000000..6d5c28d6b16 --- /dev/null +++ b/scram-tools.file/tools/acts/traccc-io.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/scram-tools.file/tools/acts/traccc-performance.xml b/scram-tools.file/tools/acts/traccc-performance.xml new file mode 100644 index 00000000000..1029e59824d --- /dev/null +++ b/scram-tools.file/tools/acts/traccc-performance.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/scram-tools.file/tools/acts/traccc.xml b/scram-tools.file/tools/acts/traccc.xml new file mode 100644 index 00000000000..c37725cab14 --- /dev/null +++ b/scram-tools.file/tools/acts/traccc.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/scram-tools.file/tools/acts/vecmem-cuda.xml b/scram-tools.file/tools/acts/vecmem-cuda.xml new file mode 100644 index 00000000000..61acbafd447 --- /dev/null +++ b/scram-tools.file/tools/acts/vecmem-cuda.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/scram-tools.file/tools/acts/vecmem-rocm.xml b/scram-tools.file/tools/acts/vecmem-rocm.xml new file mode 100644 index 00000000000..aeca8501f5d --- /dev/null +++ b/scram-tools.file/tools/acts/vecmem-rocm.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/scram-tools.file/tools/acts/vecmem.xml b/scram-tools.file/tools/acts/vecmem.xml new file mode 100644 index 00000000000..b5f722f8ce5 --- /dev/null +++ b/scram-tools.file/tools/acts/vecmem.xml @@ -0,0 +1,8 @@ + + + + + + + +