diff --git a/rivet-analysis.patch b/rivet-analysis.patch deleted file mode 100644 index b1302b1cf0d..00000000000 --- a/rivet-analysis.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/analyses/pluginATLAS/ATLAS_2023_I2663725.cc b/analyses/pluginATLAS/ATLAS_2023_I2663725.cc -index 41d39daad7645a563654a55f423ebe4a71a23ef1..e0c1e538ce9d4ddd793ed202db53d7294d3b8144 100644 ---- a/analyses/pluginATLAS/ATLAS_2023_I2663725.cc -+++ b/analyses/pluginATLAS/ATLAS_2023_I2663725.cc -@@ -5,6 +5,7 @@ - #include "Rivet/Projections/DressedLeptons.hh" - #include "Rivet/Projections/PromptFinalState.hh" - #include "Rivet/Projections/InvisibleFinalState.hh" -+#include "Rivet/Projections/VetoedFinalState.hh" - - namespace Rivet { - diff --git a/rivet-duplicate-libs.patch b/rivet-duplicate-libs.patch new file mode 100644 index 00000000000..6121fa1cd68 --- /dev/null +++ b/rivet-duplicate-libs.patch @@ -0,0 +1,37 @@ +diff --git a/include/Rivet/AnalysisLoader.hh b/include/Rivet/AnalysisLoader.hh +index d95c5d3a5..7ed7db87d 100644 +--- a/include/Rivet/AnalysisLoader.hh ++++ b/include/Rivet/AnalysisLoader.hh +@@ -98,6 +98,7 @@ namespace Rivet { + + /// List of Rivet*.so plugin library paths to load from + static vector _pluginpaths; ++ static vector _pluginnames; + + typedef map AnalysisBuilderMap; + /// Canonical analysis builder functors +diff --git a/src/Core/AnalysisLoader.cc b/src/Core/AnalysisLoader.cc +index 137383b12..e2a1cc91a 100644 +--- a/src/Core/AnalysisLoader.cc ++++ b/src/Core/AnalysisLoader.cc +@@ -14,6 +14,7 @@ namespace Rivet { + + // Initialise static-function ptrs + vector AnalysisLoader::_pluginpaths; ++ vector AnalysisLoader::_pluginnames; + AnalysisLoader::AnalysisBuilderMap AnalysisLoader::_ptrs; + AnalysisLoader::AnalysisBuilderMap AnalysisLoader::_aliasptrs; + +@@ -159,6 +160,11 @@ namespace Rivet { + if (filename.find("Rivet") != 0) continue; + size_t posn = filename.find(libsuffix); + if (posn == string::npos || posn != filename.length()-libsuffix.length()) continue; ++ // Ensure not duplicate libs ++ if (find(_pluginnames.begin(), _pluginnames.end(), filename) != _pluginnames.end()) { ++ continue; ++ } ++ _pluginnames += filename; + /// @todo Make sure this is an abs path + /// @todo Sys-dependent path separator instead of "/" + const string path = d + "/" + filename; + diff --git a/rivet.spec b/rivet.spec index 16baa1a6e14..6eac860fc84 100644 --- a/rivet.spec +++ b/rivet.spec @@ -1,12 +1,12 @@ -### RPM external rivet 3.1.10 +### RPM external rivet 4.0.0 ## INCLUDE cpp-standard ## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES} ## OLD GENSER Source: http://cern.ch/service-spi/external/MCGenerators/distribution/rivet/rivet-%{realversion}-src.tgz Source: git+https://gitlab.com/hepcedar/rivet.git?obj=master/%{n}-%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz Source99: scram-tools.file/tools/eigen/env -Patch0: rivet-analysis +Patch0: rivet-duplicate-libs -Requires: hepmc fastjet fastjet-contrib yoda +Requires: hepmc3 fastjet fastjet-contrib yoda hdf5 highfive onnxruntime BuildRequires: python3 py3-cython autotools %prep @@ -46,13 +46,14 @@ CXXFLAGS="-std=c++%{cms_cxx_standard} $CMS_EIGEN_CXX_FLAGS" sed -i "/_pow10 only defined for positive powers/d" include/Rivet/Tools/ParticleIdUtils.hh PYTHON=$(which python3) \ -./configure --disable-silent-rules --prefix=%{i} --with-hepmc=${HEPMC_ROOT} \ +./configure --disable-silent-rules --prefix=%{i} --with-hepmc=${HEPMC3_ROOT} \ --with-fastjet=${FASTJET_ROOT} --with-fjcontrib=${FASTJET_CONTRIB_ROOT} --with-yoda=${YODA_ROOT} \ --disable-doxygen --disable-pdfmanual --with-pic \ - CXX="$(which g++)" CPPFLAGS="-I${BOOST_ROOT}/include" CXXFLAGS="${CXXFLAGS}" + --with-hdf5=${HDF5_ROOT}/bin/h5pcc --with-highfive=${HIGHFIVE_ROOT} --enable-onnxrt=${ONNXRUNTIME_ROOT} \ + CXX="mpicxx" CPPFLAGS="-I${BOOST_ROOT}/include" CXXFLAGS="${CXXFLAGS}" # The following hack insures that the bins with the library linked explicitly # rather than indirectly, as required by the gold linker -perl -p -i -e "s|LIBS = $|LIBS = -lHepMC|g" bin/Makefile +perl -p -i -e "s|LIBS = $|LIBS = -lHepMC3|g" bin/Makefile make %{makeprocesses} all %install @@ -61,5 +62,4 @@ sed -i -e 's|^#!.*python.*|#!/usr/bin/env python3|' %{i}/bin/* %post %{relocateConfig}bin/rivet-config -%{relocateConfig}bin/rivet-buildplugin %{relocateConfig}bin/rivet-build diff --git a/scram-tools.file/tools/hepmc3/hepmc3.xml b/scram-tools.file/tools/hepmc3/hepmc3.xml index 1bec426f62c..399d9173829 100644 --- a/scram-tools.file/tools/hepmc3/hepmc3.xml +++ b/scram-tools.file/tools/hepmc3/hepmc3.xml @@ -7,4 +7,5 @@ + diff --git a/scram-tools.file/tools/rivet/rivet.xml b/scram-tools.file/tools/rivet/rivet.xml index 962cabdb5af..f0d4eb311d1 100644 --- a/scram-tools.file/tools/rivet/rivet.xml +++ b/scram-tools.file/tools/rivet/rivet.xml @@ -9,10 +9,12 @@ - + + + diff --git a/yoda.spec b/yoda.spec index b9835ef0d1c..4e6ef526631 100644 --- a/yoda.spec +++ b/yoda.spec @@ -1,4 +1,4 @@ -### RPM external yoda 1.9.10 +### RPM external yoda 2.0.0 ## INITENV +PATH PYTHON3PATH %i/${PYTHON3_LIB_SITE_PACKAGES} Source: git+https://gitlab.com/hepcedar/yoda.git?obj=main/%{n}-%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz