Notification time stamped 2022-02-22 10:10:35 UTC
From 57709be0724426354a8d4a23b4aadcf3e5b7cfc1 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
Date: Feb 22 2022 10:09:35 +0000
Subject: Fix detection of installed Pythia HepMC3 interface
Fix endian issue in HEPEVT wrappers
Fix doxygen markup syntax
---
diff --git a/HepMC3-dox.patch b/HepMC3-dox.patch
new file mode 100644
index 0000000..ac08f72
--- /dev/null
+++ b/HepMC3-dox.patch
@@ -0,0 +1,47 @@
+From c9ed7dd11e79151497c3001c0ae0ba0ed1165503 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Tue, 22 Feb 2022 10:21:50 +0100
+Subject: [PATCH] Fix doxygen markup
+
+Fixes warnings:
+
+.../HepMC3-3.2.5/include/HepMC3/HEPEVT_Wrapper_Runtime.h:62: warning: Member
allocate_internal_storage() (function) of class HepMC3::HEPEVT_Wrapper_Runtime is not
documented.
+.../HepMC3-3.2.5/include/HepMC3/HEPEVT_Wrapper_Template.h:62: warning: Member
allocate_internal_storage() (function) of class HepMC3::HEPEVT_Wrapper_Template is not
documented.
+---
+ include/HepMC3/HEPEVT_Wrapper_Runtime.h | 4 ++--
+ include/HepMC3/HEPEVT_Wrapper_Template.h | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/include/HepMC3/HEPEVT_Wrapper_Runtime.h
b/include/HepMC3/HEPEVT_Wrapper_Runtime.h
+index 6bbb0b6..d640314 100644
+--- a/include/HepMC3/HEPEVT_Wrapper_Runtime.h
++++ b/include/HepMC3/HEPEVT_Wrapper_Runtime.h
+@@ -59,8 +59,8 @@ private:
+ // Accessors
+ //
+ public:
+- void allocate_internal_storage(); ///!< Allocates m_internal_storage storage in
smart pointer to hold HEPEVT of fixed size
+- void copy_to_internal_storage(char *c, int N); ///!< Copies the content of
foreight common block into the internal storage
++ void allocate_internal_storage(); //!< Allocates m_internal_storage storage in
smart pointer to hold HEPEVT of fixed size
++ void copy_to_internal_storage( char *c, int N ); //!< Copies the content of
foreight common block into the internal storage
+ void set_max_number_entries( unsigned int size ) { m_max_particles = size;
}//!< Set block size
+ void set_hepevt_address(char *c); //!< Set Fortran block address
+ int max_number_entries() const { return m_max_particles;
} //!< Block size
+diff --git a/include/HepMC3/HEPEVT_Wrapper_Template.h
b/include/HepMC3/HEPEVT_Wrapper_Template.h
+index 0761596..7571097 100644
+--- a/include/HepMC3/HEPEVT_Wrapper_Template.h
++++ b/include/HepMC3/HEPEVT_Wrapper_Template.h
+@@ -59,8 +59,8 @@ private:
+ // Accessors
+ //
+ public:
+- void allocate_internal_storage(); ///!< Allocates m_internal_storage storage in
smart pointer to hold HEPEVT of fixed size
+- void copy_to_internal_storage(char *c, int N); ///!< Copies the content of
foreight common block into the internal storage
++ void allocate_internal_storage(); //!< Allocates m_internal_storage storage in
smart pointer to hold HEPEVT of fixed size
++ void copy_to_internal_storage( char *c, int N ); //!< Copies the content of
foreight common block into the internal storage
+ void set_max_number_entries( unsigned int size ) { if (size != max_particles)
printf("This implementation does not support change of the block size.\n");
assert(size == max_particles); }//!< Set block size
+ void set_hepevt_address(char *c) { m_hepevtptr = (struct
HEPEVT_Templated<max_particles, momentum_type>*)c; } //!< Set Fortran
block address
+ int max_number_entries() const { return max_particles;
} //!< Block size
+--
+2.35.1
+
diff --git a/HepMC3-endian.patch b/HepMC3-endian.patch
new file mode 100644
index 0000000..c015788
--- /dev/null
+++ b/HepMC3-endian.patch
@@ -0,0 +1,57 @@
+From 0aff73ff0236612903ed02e5aad9e524f9382022 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Tue, 22 Feb 2022 09:24:49 +0100
+Subject: [PATCH] Fix test failures on big endian architectures (s390x)
+
+97% tests passed, 2 tests failed out of 70
+Total Test time (real) = 150.69 sec
+The following tests FAILED:
+ 20 - testHEPEVTWrapper1 (Failed)
+ 55 - memcheck_testHEPEVTWrapper1 (Failed)
+Errors while running CTest
+error: Bad exit status from /var/tmp/rpm-tmp.vsrbYS (%check)
+
+18/70 Test #20: testHEPEVTWrapper1 ...........................***Failed 0.01 sec
+ Event No.: 0
+ Nr Type Parent(s) Daughter(s) Px Py Pz E Inv. M.
+ 1 1 0 - 0 0 - 0 0.75 -1.57 32.19 32.24 0.06
+[ ... ]
+ 65 2212 18 - 18 0 - 0 0.00 0.00 7000.45 7000.00 -79.37
+Run comparison
+Run comparison
+3/3-th strings are not equal testHEPEVTWrapper1output2.txt testHEPEVTWrapper1output3.txt
+ ->E 0 32 65<-
+ ->E 0 0 0<-
+Run comparison
+3/3-th strings are not equal testHEPEVTWrapper1output3.txt testHEPEVTWrapper1output4.txt
+ ->E 0 0 0<-
+ ->E 0 32 65<-
+Run comparison
+Run comparison
+
+This will also fix issues on little endian architectures if nevhep or
+nhep is > 255, since the old code only considered the least
+significant byte in that case.
+---
+ include/HepMC3/HEPEVT_Wrapper_Template.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/HepMC3/HEPEVT_Wrapper_Template.h
b/include/HepMC3/HEPEVT_Wrapper_Template.h
+index 0761596..ac11dd7 100644
+--- a/include/HepMC3/HEPEVT_Wrapper_Template.h
++++ b/include/HepMC3/HEPEVT_Wrapper_Template.h
+@@ -137,9 +137,9 @@ void HEPEVT_Wrapper_Template<max_particles,
momentum_type>::copy_to_internal_sto
+ m_internal_storage = std::make_shared<struct HEPEVT_Templated<max_particles,
momentum_type>>();
+ m_hepevtptr = m_internal_storage.get();
+ char* x = c;
+- m_hepevtptr->nevhep=(int)(*x);
++ m_hepevtptr->nevhep = *((int*)x);
+ x += sizeof(int);
+- m_hepevtptr->nhep=(int)(*x);
++ m_hepevtptr->nhep = *((int*)x);
+ x += sizeof(int);
+ memcpy(m_hepevtptr->isthep, x, N*sizeof(int));
+ x += sizeof(int)*N;
+--
+2.35.1
+
diff --git a/HepMC3-pythia8-version.patch b/HepMC3-pythia8-version.patch
new file mode 100644
index 0000000..7f9f447
--- /dev/null
+++ b/HepMC3-pythia8-version.patch
@@ -0,0 +1,54 @@
+From ae5f9273b32dbe25fdb4c60490f4b82e961b16f8 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Mon, 21 Feb 2022 21:54:39 +0100
+Subject: [PATCH] Use the correct CMake variable name for PYTHIA8_VERSION
+
+-- Found Pythia8: /usr/include (found suitable version "8.306", minimum
required is "8.220")
+-- HepMC3 test: Pythia8 package found. /usr/lib64/libpythia8.so 8.306
+-- HepMC3 test: WARNING: Will use deprecated built-in HepMC3 interface for Pythia8.
+
+With this change the warning about using the deprecated built-in
+version disappears.
+---
+ examples/Pythia8Example/CMakeLists.txt | 4 ++--
+ test/CMakeLists.txt | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/examples/Pythia8Example/CMakeLists.txt
b/examples/Pythia8Example/CMakeLists.txt
+index c02dd96..695ceb9 100644
+--- a/examples/Pythia8Example/CMakeLists.txt
++++ b/examples/Pythia8Example/CMakeLists.txt
+@@ -5,7 +5,7 @@ if (USE_INSTALLED_HEPMC3)
+ if(Pythia8_FOUND)
+ message(STATUS "HepMC3 Pythia8Example: Pythia8 package found. pythia8_example
enabled")
+ add_executable(pythia8_example.exe ${CMAKE_CURRENT_SOURCE_DIR}/pythia8_example.cc )
+- if (Pythia8_VERSION VERSION_GREATER "8.300")
++ if (PYTHIA8_VERSION VERSION_GREATER "8.300")
+ target_compile_definitions(pythia8_example.exe PRIVATE
"-DHEPMC3_USE_INTERFACE_FROM_PYTHIA8")
+ target_include_directories(pythia8_example.exe PRIVATE ${PYTHIA8_INCLUDE_DIR})
+ else()
+@@ -19,7 +19,7 @@ else()
+ if(Pythia8_FOUND)
+ message(STATUS "HepMC3 Pythia8Example: Pythia8 package found. pythia8_example
enabled")
+ add_executable(pythia8_example.exe ${CMAKE_CURRENT_SOURCE_DIR}/pythia8_example.cc )
+- if (Pythia8_VERSION VERSION_GREATER "8.300")
++ if (PYTHIA8_VERSION VERSION_GREATER "8.300")
+ target_compile_definitions(pythia8_example.exe PRIVATE
"-DHEPMC3_USE_INTERFACE_FROM_PYTHIA8")
+ target_include_directories(pythia8_example.exe PRIVATE ${PYTHIA8_INCLUDE_DIR})
+ else()
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index a8eb3b1..bd049a8 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -272,7 +272,7 @@ else()
+ list( APPEND libMCEG_sources "PythiaValidationTool.cc" )
+ list( APPEND libMCEG_link_libraries_HEPMC2 "${PYTHIA8_LIBRARIES}")
+ list( APPEND libMCEG_link_libraries_HEPMC3 "${PYTHIA8_LIBRARIES}")
+- if (Pythia8_VERSION VERSION_GREATER "8.300")
++ if (PYTHIA8_VERSION VERSION_GREATER "8.300")
+ list( APPEND libMCEG_compile_definitions
"-DHEPMC3_USE_INTERFACE_FROM_PYTHIA8")
+ else()
+ message(STATUS "HepMC3 test: WARNING: Will use deprecated built-in HepMC3
interface for Pythia8.")
+--
+2.35.1
+
diff --git a/HepMC3.spec b/HepMC3.spec
index 8be53d1..b92023d 100644
--- a/HepMC3.spec
+++ b/HepMC3.spec
@@ -3,7 +3,7 @@
Name: HepMC3
Version: 3.2.5
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: C++ Event Record for Monte Carlo Generators
# HepMC3 itself is GPLv3+
@@ -11,6 +11,15 @@ Summary: C++ Event Record for Monte Carlo Generators
License: GPLv3+ and MPLv2.0
URL:
https://hepmc.web.cern.ch/hepmc/
Source0:
https://hepmc.web.cern.ch/hepmc/releases/%{name}-%{version}.tar.gz
+# Use the correct CMake variable name for PYTHIA8_VERSION
+#
https://gitlab.cern.ch/hepmc/HepMC3/-/merge_requests/166
+Patch0: %{name}-pythia8-version.patch
+# Fix test failures on big endian architectures (s390x)
+#
https://gitlab.cern.ch/hepmc/HepMC3/-/merge_requests/167
+Patch1: %{name}-endian.patch
+# Fix doxygen markup
+#
https://gitlab.cern.ch/hepmc/HepMC3/-/merge_requests/168
+Patch2: %{name}-dox.patch
# The ROOT cmake file used by this project requires cmake 3.9
%if %{?rhel}%{!?rhel:0} == 7
@@ -186,6 +195,9 @@ This package provides HepMC manuals and examples.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
%build
%cmake3 \
@@ -388,6 +400,11 @@ rm %{buildroot}%{_includedir}/%{name}/bxzstr/LICENSE
%license COPYING
%changelog
+* Tue Feb 22 2022 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 3.2.5-2
+- Fix detection of installed Pythia HepMC3 interface
+- Fix endian issue in HEPEVT wrappers
+- Fix doxygen markup syntax
+
* Mon Feb 21 2022 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 3.2.5-1
- Update to version 3.2.5
- Update License tag for bxzstr
https://src.fedoraproject.org/rpms/HepMC3/c/57709be0724426354a8d4a23b4aad...