From 917674361c0708e9b0e4a176fc11a9d4f268ad88 Mon Sep 17 00:00:00 2001 From: Markus Seidel Date: Mon, 15 Jan 2024 13:38:04 +0000 Subject: [PATCH 1/3] Pythia 8.310 --- pythia8.spec | 4 +--- pythia8_309-289.patch | 31 ------------------------------- 2 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 pythia8_309-289.patch diff --git a/pythia8.spec b/pythia8.spec index c6500fc95f4..0774ca01587 100644 --- a/pythia8.spec +++ b/pythia8.spec @@ -1,14 +1,12 @@ -### RPM external pythia8 309 +### RPM external pythia8 310 Source: https://pythia.org/download/pythia83/%{n}%{realversion}.tgz # https://gitlab.com/Pythia8/releases/-/issues/289: fix compilation of C++20 code with pythia8 -Patch0: pythia8_309-289 Requires: hepmc hepmc3 lhapdf %prep %setup -q -n %{n}%{realversion} -%patch0 -p1 ./configure --prefix=%i --enable-shared --with-hepmc2=${HEPMC_ROOT} --with-hepmc3=${HEPMC3_ROOT} --with-lhapdf6=${LHAPDF_ROOT} --enable-mg5mes diff --git a/pythia8_309-289.patch b/pythia8_309-289.patch deleted file mode 100644 index ec5ba6655bc..00000000000 --- a/pythia8_309-289.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/include/Pythia8/SusyLesHouches.h b/include/Pythia8/SusyLesHouches.h -index 43d6d621..5a57a968 100644 ---- a/include/Pythia8/SusyLesHouches.h -+++ b/include/Pythia8/SusyLesHouches.h -@@ -28,7 +28,7 @@ namespace Pythia8 { - public: - - //Constructor. -- LHblock() : idnow(0), qDRbar(), i(), val() {} ; -+ LHblock() : idnow(0), qDRbar(), i(), val() {} ; - - //Does block exist? - bool exists() { return int(entry.size()) == 0 ? false : true ; }; -@@ -129,7 +129,7 @@ namespace Pythia8 { - template class LHmatrixBlock { - public: - //Constructor. Set uninitialized and explicitly zero. -- LHmatrixBlock() : entry(), qDRbar(), val() { -+ LHmatrixBlock() : entry(), qDRbar(), val() { - initialized=false; - for (i=1;i<=size;i++) { - for (j=1;j<=size;j++) { -@@ -208,7 +208,7 @@ namespace Pythia8 { - template class LHtensor3Block { - public: - //Constructor. Set uninitialized and explicitly zero. -- LHtensor3Block() : entry(), qDRbar(), val() { -+ LHtensor3Block() : entry(), qDRbar(), val() { - initialized=false; - for (i=1;i<=size;i++) { - for (j=1;j<=size;j++) { From e1f776e94fd7c87dd17dfaa7138a9bbacb44fa7a Mon Sep 17 00:00:00 2001 From: Markus Seidel Date: Mon, 22 Jan 2024 08:57:20 +0000 Subject: [PATCH 2/3] EvtGen patch for Pythia 8.310 --- evtgen-2.0.0.patch | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/evtgen-2.0.0.patch b/evtgen-2.0.0.patch index b5670c4a30c..88902f4e290 100644 --- a/evtgen-2.0.0.patch +++ b/evtgen-2.0.0.patch @@ -37,3 +37,42 @@ template class EvtMatrix { + +--- a/EvtGenExternal/EvtPythiaEngine.hh ++++ b/EvtGenExternal/EvtPythiaEngine.hh +@@ -82,7 +82,7 @@ + + bool _convertPhysCodes, _initialised, _useEvtGenRandom; + +- std::unique_ptr _evtgenRandom; ++ std::shared_ptr _evtgenRandom; + + std::map _addedPDGCodes; + }; + +--- a/src/EvtGenExternal/EvtPythiaEngine.cpp ++++ b/src/EvtGenExternal/EvtPythiaEngine.cpp +@@ -75,7 +75,7 @@ + // from EvtGen for Pythia 8. + _useEvtGenRandom = useEvtGenRandom; + +- _evtgenRandom = std::make_unique(); ++ _evtgenRandom = std::make_shared(); + + _initialised = false; + } +@@ -128,8 +128,13 @@ + + // Set the random number generator + if ( _useEvtGenRandom == true ) { ++#if PYTHIA_VERSION_INTEGER < 8310 + _genericPythiaGen->setRndmEnginePtr( _evtgenRandom.get() ); + _aliasPythiaGen->setRndmEnginePtr( _evtgenRandom.get() ); ++#else ++ _genericPythiaGen->setRndmEnginePtr( _evtgenRandom ); ++ _aliasPythiaGen->setRndmEnginePtr( _evtgenRandom ); ++#endif + } + + _genericPythiaGen->init(); + From 615e2508cd8f33d83b56b13fad876b8d0d019523 Mon Sep 17 00:00:00 2001 From: Markus Seidel Date: Wed, 27 Mar 2024 18:01:05 +0100 Subject: [PATCH 3/3] Pythia 8.311 --- pythia8.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pythia8.spec b/pythia8.spec index 0774ca01587..9d5c0cc076a 100644 --- a/pythia8.spec +++ b/pythia8.spec @@ -1,7 +1,6 @@ -### RPM external pythia8 310 +### RPM external pythia8 311 Source: https://pythia.org/download/pythia83/%{n}%{realversion}.tgz -# https://gitlab.com/Pythia8/releases/-/issues/289: fix compilation of C++20 code with pythia8 Requires: hepmc hepmc3 lhapdf