Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
daf8bdab01 | ||
|
|
5b433dea92 | ||
|
|
7add16520d |
56 changed files with 5089 additions and 2983 deletions
142
root-32bit-dataframe.patch
Normal file
142
root-32bit-dataframe.patch
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
diff -ur root-6.24.02.orig/bindings/pyroot_legacy/ROOT.py root-6.24.02/bindings/pyroot_legacy/ROOT.py
|
||||
--- root-6.24.02.orig/bindings/pyroot_legacy/ROOT.py 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/bindings/pyroot_legacy/ROOT.py 2021-08-11 10:44:16.895804556 +0200
|
||||
@@ -438,9 +438,7 @@
|
||||
# This function is injected as method to the respective classes in Pythonize.cxx.
|
||||
_root._RDataFrameAsNumpy = _RDataFrameAsNumpy
|
||||
|
||||
-# This Pythonisation is there only for 64 bits builds
|
||||
-if (sys.maxsize > 2**32): # https://docs.python.org/3/library/platform.html#cross-platform
|
||||
- _root.CreateScopeProxy( "TTree" ).AsMatrix = _TTreeAsMatrix
|
||||
+_root.CreateScopeProxy( "TTree" ).AsMatrix = _TTreeAsMatrix
|
||||
|
||||
|
||||
### RINT command emulation ------------------------------------------------------
|
||||
diff -ur root-6.24.02.orig/build/unix/makepchinput.py root-6.24.02/build/unix/makepchinput.py
|
||||
--- root-6.24.02.orig/build/unix/makepchinput.py 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/build/unix/makepchinput.py 2021-08-11 10:44:16.926804638 +0200
|
||||
@@ -252,9 +252,6 @@
|
||||
"math/vdt",
|
||||
"tmva/rmva"]
|
||||
|
||||
- if (sys.platform != 'win32' and sys.maxsize <= 2**32): # https://docs.python.org/3/library/platform.html#cross-platform
|
||||
- PCHPatternsBlacklist.append("tree/dataframe")
|
||||
-
|
||||
accepted = isAnyPatternInString(PCHPatternsWhitelist,dirName) and \
|
||||
not isAnyPatternInString(PCHPatternsBlacklist,dirName)
|
||||
|
||||
diff -ur root-6.24.02.orig/tree/dataframe/test/dataframe_cache.cxx root-6.24.02/tree/dataframe/test/dataframe_cache.cxx
|
||||
--- root-6.24.02.orig/tree/dataframe/test/dataframe_cache.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/tree/dataframe/test/dataframe_cache.cxx 2021-08-11 10:44:16.927804641 +0200
|
||||
@@ -224,8 +224,6 @@
|
||||
|
||||
}
|
||||
|
||||
-#ifdef R__B64
|
||||
-
|
||||
TEST(Cache, Regex)
|
||||
{
|
||||
|
||||
@@ -335,8 +333,6 @@
|
||||
gSystem->Unlink(fileName);
|
||||
}
|
||||
|
||||
-#endif // R__B64
|
||||
-
|
||||
// ROOT-10563
|
||||
TEST(Cache, Alias)
|
||||
{
|
||||
diff -ur root-6.24.02.orig/tree/dataframe/test/datasource_arrow.cxx root-6.24.02/tree/dataframe/test/datasource_arrow.cxx
|
||||
--- root-6.24.02.orig/tree/dataframe/test/datasource_arrow.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/tree/dataframe/test/datasource_arrow.cxx 2021-08-11 10:44:16.927804641 +0200
|
||||
@@ -177,8 +177,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef R__B64
|
||||
-
|
||||
TEST(RArrowDS, FromARDF)
|
||||
{
|
||||
std::unique_ptr<RDataSource> tds(new RArrowDS(createTestTable(), {}));
|
||||
@@ -250,5 +248,3 @@
|
||||
}
|
||||
|
||||
#endif // R__USE_IMT
|
||||
-
|
||||
-#endif // R__B64
|
||||
diff -ur root-6.24.02.orig/tree/dataframe/test/datasource_csv.cxx root-6.24.02/tree/dataframe/test/datasource_csv.cxx
|
||||
--- root-6.24.02.orig/tree/dataframe/test/datasource_csv.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/tree/dataframe/test/datasource_csv.cxx 2021-08-11 10:44:16.927804641 +0200
|
||||
@@ -207,8 +207,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef R__B64
|
||||
-
|
||||
TEST(RCsvDS, FromARDF)
|
||||
{
|
||||
std::unique_ptr<RDataSource> tds(new RCsvDS(fileName0));
|
||||
@@ -321,5 +319,3 @@
|
||||
}
|
||||
|
||||
#endif // R__USE_IMT
|
||||
-
|
||||
-#endif // R__B64
|
||||
diff -ur root-6.24.02.orig/tree/dataframe/test/datasource_root.cxx root-6.24.02/tree/dataframe/test/datasource_root.cxx
|
||||
--- root-6.24.02.orig/tree/dataframe/test/datasource_root.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/tree/dataframe/test/datasource_root.cxx 2021-08-11 10:44:16.928804644 +0200
|
||||
@@ -117,8 +117,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef R__B64
|
||||
-
|
||||
TEST(TRootTDS, FromARDF)
|
||||
{
|
||||
std::unique_ptr<RDataSource> tds(new RRootDS(treeName, fileGlob));
|
||||
@@ -190,5 +188,3 @@
|
||||
}
|
||||
|
||||
#endif // R__USE_IMT
|
||||
-
|
||||
-#endif // R__B64
|
||||
diff -ur root-6.24.02.orig/tree/dataframe/test/datasource_trivial.cxx root-6.24.02/tree/dataframe/test/datasource_trivial.cxx
|
||||
--- root-6.24.02.orig/tree/dataframe/test/datasource_trivial.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/tree/dataframe/test/datasource_trivial.cxx 2021-08-11 10:44:16.928804644 +0200
|
||||
@@ -141,8 +141,6 @@
|
||||
EXPECT_EQ(df.Range(10).Count().GetValue(), 10);
|
||||
}
|
||||
|
||||
-#ifdef R__B64
|
||||
-
|
||||
TEST(RTrivialDS, FromARDFWithJitting)
|
||||
{
|
||||
std::unique_ptr<RDataSource> tds(new RTrivialDS(32));
|
||||
@@ -245,5 +243,3 @@
|
||||
}
|
||||
|
||||
#endif // R__USE_IMT
|
||||
-
|
||||
-#endif // R__B64
|
||||
diff -ur root-6.24.02.orig/tutorials/CMakeLists.txt root-6.24.02/tutorials/CMakeLists.txt
|
||||
--- root-6.24.02.orig/tutorials/CMakeLists.txt 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/tutorials/CMakeLists.txt 2021-08-11 10:44:16.974804766 +0200
|
||||
@@ -279,10 +279,6 @@
|
||||
list(APPEND root7_veto ${v7_veto_files})
|
||||
endif()
|
||||
|
||||
-if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
- set(bits32_veto dataframe/*.C graphs/timeSeriesFrom*.C v7/ntuple/ntpl004_dimuon.C)
|
||||
-endif()
|
||||
-
|
||||
#---These ones are disabled !!! ------------------------------------
|
||||
set(extra_veto
|
||||
legacy/benchmarks.C
|
||||
@@ -335,7 +331,6 @@
|
||||
${classic_veto}
|
||||
${pythia_veto}
|
||||
${root7_veto}
|
||||
- ${bits32_veto}
|
||||
${xrootd_veto}
|
||||
${mlp_veto}
|
||||
${spectrum_veto}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 55446dcd6eabc1fff218f266c11f31697fe99f09 Mon Sep 17 00:00:00 2001
|
||||
From 70d941cd6ebbc3726e08ef7f52d0135453f0b840 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Fri, 13 Mar 2020 16:21:55 +0100
|
||||
Subject: [PATCH] Run tests on 32 bit
|
||||
Subject: [PATCH 2/3] Run tests on 32 bit
|
||||
|
||||
---
|
||||
test/stressGeometry.cxx | 8 --------
|
||||
|
|
@ -9,7 +9,7 @@ Subject: [PATCH] Run tests on 32 bit
|
|||
2 files changed, 3 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/test/stressGeometry.cxx b/test/stressGeometry.cxx
|
||||
index f8d78f4f54..617b9e1644 100644
|
||||
index 5e81f5f2ca..18e41a6f45 100644
|
||||
--- a/test/stressGeometry.cxx
|
||||
+++ b/test/stressGeometry.cxx
|
||||
@@ -257,14 +257,6 @@ void stressGeometry(const char *exp="*", Bool_t generate_ref=kFALSE, Bool_t vecg
|
||||
|
|
@ -28,26 +28,26 @@ index f8d78f4f54..617b9e1644 100644
|
|||
TString fname;
|
||||
for (i=0; i<NG; i++) {
|
||||
diff --git a/tree/tree/test/CMakeLists.txt b/tree/tree/test/CMakeLists.txt
|
||||
index 5bb222edc5..f29a17801d 100644
|
||||
index 0c1a39d01e..3bafe47934 100644
|
||||
--- a/tree/tree/test/CMakeLists.txt
|
||||
+++ b/tree/tree/test/CMakeLists.txt
|
||||
@@ -17,13 +17,9 @@ endif()
|
||||
@@ -12,13 +12,9 @@ ROOT_ADD_GTEST(testTOffsetGeneration TOffsetGeneration.cxx ElementStruct.cxx Ele
|
||||
target_include_directories(testTOffsetGeneration PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
ROOT_STANDARD_LIBRARY_PACKAGE(SillyStruct NO_INSTALL_HEADERS HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/SillyStruct.h SOURCES SillyStruct.cxx LINKDEF SillyStructLinkDef.h DEPENDENCIES RIO)
|
||||
ROOT_ADD_GTEST(testBulkApi BulkApi.cxx LIBRARIES RIO Tree TreePlayer)
|
||||
-#FIXME: tests are having timeout on 32bit CERN VM (in docker container everything is fine),
|
||||
-# to be reverted after investigation.
|
||||
-if(NOT CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
- ROOT_ADD_GTEST(testBulkApiMultiple BulkApiMultiple.cxx LIBRARIES RIO Tree TreePlayer TIMEOUT 3000)
|
||||
- ROOT_ADD_GTEST(testBulkApiMultiple BulkApiMultiple.cxx LIBRARIES RIO Tree TreePlayer)
|
||||
- ROOT_ADD_GTEST(testBulkApiVarLength BulkApiVarLength.cxx LIBRARIES RIO Tree TreePlayer)
|
||||
- ROOT_ADD_GTEST(testBulkApiSillyStruct BulkApiSillyStruct.cxx LIBRARIES RIO Tree TreePlayer SillyStruct)
|
||||
-endif()
|
||||
+ROOT_ADD_GTEST(testBulkApiMultiple BulkApiMultiple.cxx LIBRARIES RIO Tree TreePlayer TIMEOUT 3000)
|
||||
+ROOT_ADD_GTEST(testBulkApiMultiple BulkApiMultiple.cxx LIBRARIES RIO Tree TreePlayer)
|
||||
+ROOT_ADD_GTEST(testBulkApiVarLength BulkApiVarLength.cxx LIBRARIES RIO Tree TreePlayer)
|
||||
+ROOT_ADD_GTEST(testBulkApiSillyStruct BulkApiSillyStruct.cxx LIBRARIES RIO Tree TreePlayer SillyStruct)
|
||||
ROOT_ADD_GTEST(testTBasket TBasket.cxx LIBRARIES RIO Tree)
|
||||
ROOT_ADD_GTEST(testTBranch TBranch.cxx LIBRARIES RIO Tree MathCore)
|
||||
ROOT_ADD_GTEST(testTIOFeatures TIOFeatures.cxx LIBRARIES RIO Tree)
|
||||
--
|
||||
2.45.1
|
||||
2.24.1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
From f7bfa429deb9dbae9058998888bbcaa84af0ca08 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Tue, 2 Dec 2025 05:33:31 +0100
|
||||
Subject: [PATCH] Adjust test/stressGraphics.ref
|
||||
|
||||
---
|
||||
test/stressGraphics.ref | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/test/stressGraphics.ref b/test/stressGraphics.ref
|
||||
index 2498ec6d755..4520a5ab113 100644
|
||||
--- a/test/stressGraphics.ref
|
||||
+++ b/test/stressGraphics.ref
|
||||
@@ -10,11 +10,11 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
|
||||
9 9253 100 14377 150 19851 2400 12199 900 9283 100
|
||||
10 8863 70 13645 100 24343 1100 23278 1700 8894 70
|
||||
11 12971 100 14750 50 34063 2000 32033 1200 13070 150
|
||||
- 12 7674 100 13533 50 83557 3000 38505 4000 7720 150
|
||||
- 13 5600 400 13242 300 16881 400 15063 800 5638 400
|
||||
+ 12 7674 100 13533 100 83557 3000 38505 4000 7720 150
|
||||
+ 13 5600 400 13242 400 16881 400 15063 800 5638 400
|
||||
14 14190539 4000000 12926 100 23076 9500 25987 3000 14190704 4000000
|
||||
15 15690 5000 17179 200 23076 9500 14232 1500 10437 5000
|
||||
- 16 28072 400 23520 200 44462 11000 30062 5000 38007 400
|
||||
+ 16 28072 400 23520 250 44462 11000 30062 5000 38007 400
|
||||
17 20444 400 21520 150 27511 11000 16867 600 20721 400
|
||||
18 15894 100 19305 200 27187 10300 15925 350 15925 100
|
||||
19 22521 300 42926 250 43868 17000 19232 11000 22729 300
|
||||
@@ -44,7 +44,7 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
|
||||
43 207729 750 87126 750 76094 38000 54717 11000 210497 800
|
||||
44 401670 6500 156361 2000 62719 34100 45592 14000 410114 6500
|
||||
45 566142 5000 225206 2000 65828 31800 53934 6500 573396 5000
|
||||
- 46 3738751 35000 1292739 12000 60580 9900 133547 3500 3783013 35000
|
||||
+ 46 3738751 35000 1292739 13000 60580 9900 133547 3500 3783013 35000
|
||||
47 1466028 9000 853193 50000 38425 13500 91242 18100 1463263 7500
|
||||
48 38312 200 56877 750 36524 11800 119641 8000 38121 200
|
||||
49 19556 1000 31967 1000 36859 10000 37602 8000 19900 3000
|
||||
@@ -53,7 +53,7 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
|
||||
52 270825 10000 115500 1000 45496 11000 34685 5000 272950 10000
|
||||
53 15025 3000 29289 500 42525 11300 33336 3900 14787 4000
|
||||
54 254604 5000 383258 7000 55666 30400 46534 6500 259594 7000
|
||||
- 55 4846 150 14075 150 33239 600 25303 500 4877 150
|
||||
+ 55 4846 150 14075 200 33239 600 25303 500 4877 150
|
||||
56 1435879 150000 12837 100 25830 100 365000 15000 1085792 250000
|
||||
57 5884 500 16577 200 40706 14000 30026 4000 5884 500
|
||||
58 5723 700 15720 200 32236 11000 16916 3200 5670 800
|
||||
--
|
||||
2.52.0
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 40f8cd0adeb7257778c789e1ae639f260780402b Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Sun, 7 Dec 2025 19:30:55 +0100
|
||||
Subject: [PATCH] Fix a numpy test for 32 bit archs
|
||||
|
||||
The default dtype used in numpy array is "int". This type has
|
||||
different sizes on 32 and 64 bit architectures. The test tries to use
|
||||
the numpy array as a Long64_t dataframe. On 32 bit architectures this
|
||||
results in an error.
|
||||
|
||||
This commit explicitly changes the numpy array's dtype to "int64" to
|
||||
match the Long64_t dataframe type on all architectyres.
|
||||
---
|
||||
bindings/pyroot/pythonizations/test/rdataframe_misc.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bindings/pyroot/pythonizations/test/rdataframe_misc.py b/bindings/pyroot/pythonizations/test/rdataframe_misc.py
|
||||
index 1a1efd21b3e..150828613b3 100644
|
||||
--- a/bindings/pyroot/pythonizations/test/rdataframe_misc.py
|
||||
+++ b/bindings/pyroot/pythonizations/test/rdataframe_misc.py
|
||||
@@ -132,7 +132,7 @@ class RDataFrameMisc(unittest.TestCase):
|
||||
return
|
||||
out_path = "dataframe_misc_regression_gh20291.root"
|
||||
try:
|
||||
- x, y = numpy.array([1, 2, 3]), numpy.array([4, 5, 6])
|
||||
+ x, y = numpy.array([1, 2, 3], dtype='int64'), numpy.array([4, 5, 6], dtype='int64')
|
||||
df = ROOT.RDF.FromNumpy({"x": x, "y": y})
|
||||
|
||||
df.Snapshot("tree", out_path)
|
||||
--
|
||||
2.52.0
|
||||
|
||||
72
root-Fixes-for-garbage-collection-in-Python-3.11.patch
Normal file
72
root-Fixes-for-garbage-collection-in-Python-3.11.patch
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
From e77bcb0fdd0bc622213c33ad7094d28737fe51e7 Mon Sep 17 00:00:00 2001
|
||||
From: Enric Tejedor Saavedra <enric.tejedor.saavedra@cern.ch>
|
||||
Date: Wed, 28 Sep 2022 14:20:46 +0200
|
||||
Subject: [PATCH] [PyROOT] Fixes for garbage collection in Python 3.11
|
||||
|
||||
According to the list of changes in Python 3.11:
|
||||
|
||||
https://docs.python.org/3.11/whatsnew/3.11.html
|
||||
|
||||
types defined with the Py_TPFLAGS_HAVE_GC flag set but with no
|
||||
traverse function (PyTypeObject.tp_traverse) will cause an error.
|
||||
|
||||
The above is true for a few types that are defined in cppyy.
|
||||
This commit removes the aforementioned flag from those type
|
||||
definitions with no traverse function. It also sets the right
|
||||
flags for the nonified object type; this fixes the teardown GC
|
||||
crashes observed when the internal memory management of ROOT
|
||||
was involved (e.g. the garbage collection of a tree that belongs
|
||||
to a file).
|
||||
---
|
||||
.../pyroot/cppyy/CPyCppyy/src/CPPInstance.cxx | 1 -
|
||||
.../cppyy/CPyCppyy/src/CustomPyTypes.cxx | 3 +--
|
||||
.../cppyy/CPyCppyy/src/MemoryRegulator.cxx | 3 ++-
|
||||
4 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/CPPInstance.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/CPPInstance.cxx
|
||||
index 73fb8099b5dd..f2eea396af1b 100644
|
||||
--- a/bindings/pyroot/cppyy/CPyCppyy/src/CPPInstance.cxx
|
||||
+++ b/bindings/pyroot/cppyy/CPyCppyy/src/CPPInstance.cxx
|
||||
@@ -764,7 +764,6 @@ PyTypeObject CPPInstance_Type = {
|
||||
0, // tp_as_buffer
|
||||
Py_TPFLAGS_DEFAULT |
|
||||
Py_TPFLAGS_BASETYPE |
|
||||
- Py_TPFLAGS_HAVE_GC |
|
||||
Py_TPFLAGS_CHECKTYPES, // tp_flags
|
||||
(char*)"cppyy object proxy (internal)", // tp_doc
|
||||
0, // tp_traverse
|
||||
diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/CustomPyTypes.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/CustomPyTypes.cxx
|
||||
index 97ce06daa717..ed41b1637c67 100644
|
||||
--- a/bindings/pyroot/cppyy/CPyCppyy/src/CustomPyTypes.cxx
|
||||
+++ b/bindings/pyroot/cppyy/CPyCppyy/src/CustomPyTypes.cxx
|
||||
@@ -78,8 +78,7 @@ PyTypeObject TypedefPointerToClass_Type = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
(ternaryfunc)tpc_call, // tp_call
|
||||
0, 0, 0, 0,
|
||||
- Py_TPFLAGS_DEFAULT |
|
||||
- Py_TPFLAGS_HAVE_GC, // tp_flags
|
||||
+ Py_TPFLAGS_DEFAULT, // tp_flags
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
#if PY_VERSION_HEX >= 0x02030000
|
||||
, 0 // tp_del
|
||||
diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/MemoryRegulator.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/MemoryRegulator.cxx
|
||||
index f9e92f9c8c1b..510d65f88a8d 100644
|
||||
--- a/bindings/pyroot/cppyy/CPyCppyy/src/MemoryRegulator.cxx
|
||||
+++ b/bindings/pyroot/cppyy/CPyCppyy/src/MemoryRegulator.cxx
|
||||
@@ -45,7 +45,7 @@ struct InitCPyCppyy_NoneType_t {
|
||||
((PyVarObject&)CPyCppyy_NoneType).ob_size = 0;
|
||||
|
||||
CPyCppyy_NoneType.tp_name = const_cast<char*>("CPyCppyy_NoneType");
|
||||
- CPyCppyy_NoneType.tp_flags = Py_TPFLAGS_HAVE_RICHCOMPARE | Py_TPFLAGS_HAVE_GC;
|
||||
+ CPyCppyy_NoneType.tp_flags = Py_TPFLAGS_HAVE_RICHCOMPARE;
|
||||
|
||||
CPyCppyy_NoneType.tp_traverse = (traverseproc)0;
|
||||
CPyCppyy_NoneType.tp_clear = (inquiry)0;
|
||||
@@ -135,6 +135,7 @@ bool CPyCppyy::MemoryRegulator::RecursiveRemove(
|
||||
CPyCppyy_NoneType.tp_traverse = Py_TYPE(pyobj)->tp_traverse;
|
||||
CPyCppyy_NoneType.tp_clear = Py_TYPE(pyobj)->tp_clear;
|
||||
CPyCppyy_NoneType.tp_free = Py_TYPE(pyobj)->tp_free;
|
||||
+ CPyCppyy_NoneType.tp_flags = Py_TYPE(pyobj)->tp_flags;
|
||||
} else if (CPyCppyy_NoneType.tp_traverse != Py_TYPE(pyobj)->tp_traverse) {
|
||||
// TODO: SystemError?
|
||||
std::cerr << "in CPyCppyy::MemoryRegulater, unexpected object of type: "
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
From 0e1e1f0ba1908ae1020337ed7ec0565bf979b92c Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Tue, 2 Dec 2025 04:57:30 +0100
|
||||
Subject: [PATCH] [Geom] Add missing includes of TMath.h
|
||||
|
||||
---
|
||||
geom/geombuilder/src/TGeoParaEditor.cxx | 1 +
|
||||
geom/geombuilder/src/TGeoPconEditor.cxx | 1 +
|
||||
geom/geombuilder/src/TGeoPgonEditor.cxx | 1 +
|
||||
geom/geombuilder/src/TGeoTrapEditor.cxx | 1 +
|
||||
4 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/geom/geombuilder/src/TGeoParaEditor.cxx b/geom/geombuilder/src/TGeoParaEditor.cxx
|
||||
index fdc344ba4d2..bd173607d2c 100644
|
||||
--- a/geom/geombuilder/src/TGeoParaEditor.cxx
|
||||
+++ b/geom/geombuilder/src/TGeoParaEditor.cxx
|
||||
@@ -27,6 +27,7 @@ Editor for a TGeoPara.
|
||||
#include "TVirtualGeoPainter.h"
|
||||
#include "TVirtualPad.h"
|
||||
#include "TView.h"
|
||||
+#include "TMath.h"
|
||||
#include "TGButton.h"
|
||||
#include "TGTextEntry.h"
|
||||
#include "TGNumberEntry.h"
|
||||
diff --git a/geom/geombuilder/src/TGeoPconEditor.cxx b/geom/geombuilder/src/TGeoPconEditor.cxx
|
||||
index a66359853be..50598d2cb90 100644
|
||||
--- a/geom/geombuilder/src/TGeoPconEditor.cxx
|
||||
+++ b/geom/geombuilder/src/TGeoPconEditor.cxx
|
||||
@@ -27,6 +27,7 @@ Editor for a TGeoPcon.
|
||||
#include "TVirtualGeoPainter.h"
|
||||
#include "TVirtualPad.h"
|
||||
#include "TView.h"
|
||||
+#include "TMath.h"
|
||||
#include "TGCanvas.h"
|
||||
#include "TGButton.h"
|
||||
#include "TGTextEntry.h"
|
||||
diff --git a/geom/geombuilder/src/TGeoPgonEditor.cxx b/geom/geombuilder/src/TGeoPgonEditor.cxx
|
||||
index 949d0045a66..33638d66b2b 100644
|
||||
--- a/geom/geombuilder/src/TGeoPgonEditor.cxx
|
||||
+++ b/geom/geombuilder/src/TGeoPgonEditor.cxx
|
||||
@@ -27,6 +27,7 @@ Editor for a TGeoPgon.
|
||||
#include "TVirtualGeoPainter.h"
|
||||
#include "TVirtualPad.h"
|
||||
#include "TView.h"
|
||||
+#include "TMath.h"
|
||||
#include "TGTextEntry.h"
|
||||
#include "TGNumberEntry.h"
|
||||
#include "TGLabel.h"
|
||||
diff --git a/geom/geombuilder/src/TGeoTrapEditor.cxx b/geom/geombuilder/src/TGeoTrapEditor.cxx
|
||||
index d9c2916d075..459e0191117 100644
|
||||
--- a/geom/geombuilder/src/TGeoTrapEditor.cxx
|
||||
+++ b/geom/geombuilder/src/TGeoTrapEditor.cxx
|
||||
@@ -27,6 +27,7 @@ Editor for a TGeoTrap.
|
||||
#include "TVirtualGeoPainter.h"
|
||||
#include "TVirtualPad.h"
|
||||
#include "TView.h"
|
||||
+#include "TMath.h"
|
||||
#include "TGButton.h"
|
||||
#include "TGTextEntry.h"
|
||||
#include "TGNumberEntry.h"
|
||||
--
|
||||
2.52.0
|
||||
|
||||
30
root-Guard-gInterpreterMutex-in-TClingClassInfo-IsEnum.patch
Normal file
30
root-Guard-gInterpreterMutex-in-TClingClassInfo-IsEnum.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
From 25fcf69c0662b09fbd9dc1c0446b7679ae020ed5 Mon Sep 17 00:00:00 2001
|
||||
From: Vincenzo Eduardo Padulano <v.e.padulano@gmail.com>
|
||||
Date: Sat, 8 Oct 2022 03:12:06 +0200
|
||||
Subject: [PATCH] [core] Guard gInterpreterMutex in TClingClassInfo::IsEnum
|
||||
|
||||
Fixes https://github.com/root-project/root/issues/11515
|
||||
|
||||
This method leads to contention in some specific scenarios (see linked
|
||||
issue).
|
||||
|
||||
Co-authored-by: Philippe Canal <pcanal@fnal.gov>
|
||||
---
|
||||
core/metacling/src/TClingClassInfo.cxx | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/core/metacling/src/TClingClassInfo.cxx b/core/metacling/src/TClingClassInfo.cxx
|
||||
index c0c061dfca..ce6e82d388 100644
|
||||
--- a/core/metacling/src/TClingClassInfo.cxx
|
||||
+++ b/core/metacling/src/TClingClassInfo.cxx
|
||||
@@ -815,6 +815,7 @@ bool TClingClassInfo::IsBase(const char *name) const
|
||||
|
||||
bool TClingClassInfo::IsEnum(cling::Interpreter *interp, const char *name)
|
||||
{
|
||||
+ R__LOCKGUARD(gInterpreterMutex);
|
||||
// Note: This is a static member function.
|
||||
TClingClassInfo info(interp, name);
|
||||
if (info.IsValid() && (info.Property() & kIsEnum)) {
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
From f09b4ce027b31dcd19ea8a398c35c5dfbcc0507f Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Thu, 18 Dec 2025 11:49:12 +0100
|
||||
Subject: [PATCH] [PyROOT] Don't install the python modules twice
|
||||
|
||||
The binary python modules were moved one directory level down into the
|
||||
ROOT and cppyy directories, so that they reside alongside the python
|
||||
files in the same directories. The install rule for the python files
|
||||
must therefore be extended to exclude the binary modules (PATTERN *.so
|
||||
EXCLUDE) so that these are not installed a second time overwriting the
|
||||
files installed by the install rule for the binary modules with another
|
||||
copy with the wrong file permissions.
|
||||
|
||||
Also use the no-version option for the cppyy binary module as is
|
||||
already done for the pythonization binary module, since it is now
|
||||
installed in the python directory. Before it was installed in the
|
||||
library directory with an unversioned symlink in the python directory.
|
||||
---
|
||||
bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt | 2 +-
|
||||
bindings/pyroot/cppyy/cppyy/CMakeLists.txt | 5 +++--
|
||||
bindings/pyroot/pythonizations/CMakeLists.txt | 3 ++-
|
||||
3 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
|
||||
index bb48c032974..065a89348ff 100644
|
||||
--- a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
|
||||
+++ b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
|
||||
@@ -73,7 +73,7 @@ endif()
|
||||
add_library(cppyy SHARED src/CPyCppyyPyModule.cxx)
|
||||
|
||||
# Set the suffix to '.so' and the prefix to 'lib'
|
||||
-set_target_properties(cppyy PROPERTIES ${ROOT_LIBRARY_PROPERTIES}
|
||||
+set_target_properties(cppyy PROPERTIES ${ROOT_LIBRARY_PROPERTIES_NO_VERSION}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${localruntimedir}/cppyy)
|
||||
if(MSVC)
|
||||
target_link_libraries(cppyy PRIVATE CPyCppyy)
|
||||
diff --git a/bindings/pyroot/cppyy/cppyy/CMakeLists.txt b/bindings/pyroot/cppyy/cppyy/CMakeLists.txt
|
||||
index 3a29b4525f7..842ad12df97 100644
|
||||
--- a/bindings/pyroot/cppyy/cppyy/CMakeLists.txt
|
||||
+++ b/bindings/pyroot/cppyy/cppyy/CMakeLists.txt
|
||||
@@ -31,8 +31,9 @@ endforeach()
|
||||
# Install Python sources and bytecode
|
||||
install(DIRECTORY ${localruntimedir}/cppyy
|
||||
DESTINATION ${CMAKE_INSTALL_PYTHONDIR}
|
||||
- COMPONENT libraries)
|
||||
+ COMPONENT libraries
|
||||
+ PATTERN *.so EXCLUDE)
|
||||
|
||||
if(NOT MSVC)
|
||||
ROOT_ADD_TEST_SUBDIRECTORY(test)
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+endif()
|
||||
diff --git a/bindings/pyroot/pythonizations/CMakeLists.txt b/bindings/pyroot/pythonizations/CMakeLists.txt
|
||||
index 1230f18ca47..b415ba13697 100644
|
||||
--- a/bindings/pyroot/pythonizations/CMakeLists.txt
|
||||
+++ b/bindings/pyroot/pythonizations/CMakeLists.txt
|
||||
@@ -239,7 +239,8 @@ install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
|
||||
# Install Python sources and bytecode
|
||||
install(DIRECTORY ${localruntimedir}/ROOT
|
||||
DESTINATION ${CMAKE_INSTALL_PYTHONDIR}
|
||||
- COMPONENT libraries)
|
||||
+ COMPONENT libraries
|
||||
+ PATTERN *.so EXCLUDE)
|
||||
|
||||
# Install headers required by pythonizations
|
||||
install(FILES ${PYROOT_EXTRA_HEADERS}
|
||||
--
|
||||
2.52.0
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
From a12f3b736a9c69e0d69e7f483e50e7cdf59d9fd2 Mon Sep 17 00:00:00 2001
|
||||
From: Enric Tejedor Saavedra <enric.tejedor.saavedra@cern.ch>
|
||||
Date: Fri, 10 Jun 2022 16:42:49 +0200
|
||||
Subject: [PATCH] [PyROOT] Prevent cast error when calling PyTuple_SET_ITEM in
|
||||
3.11
|
||||
|
||||
PyTuple_SET_ITEM ends up calling _PyObject_CAST(nullptr) which
|
||||
causes "error: invalid cast from type 'std::nullptr_t' to type
|
||||
'const PyObject*' {aka 'const _object*'}
|
||||
---
|
||||
bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx
|
||||
index 685ad3dc60..2189348594 100644
|
||||
--- a/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx
|
||||
+++ b/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx
|
||||
@@ -580,7 +580,7 @@ PyObject* CPyCppyy::CPPMethod::ProcessKeywords(PyObject* self, PyObject* args, P
|
||||
// set all values to zero to be able to check them later (this also guarantees normal
|
||||
// cleanup by the tuple deallocation)
|
||||
for (Py_ssize_t i = 0; i < nArgs+nKeys; ++i)
|
||||
- PyTuple_SET_ITEM(newArgs, i, nullptr);
|
||||
+ PyTuple_SET_ITEM(newArgs, i, static_cast<PyObject*>(nullptr));
|
||||
|
||||
// next, insert the keyword values
|
||||
PyObject *key, *value;
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
From c4175cb2fa0daf07ef03f460f2026c8bbc34b6a5 Mon Sep 17 00:00:00 2001
|
||||
From: Enric Tejedor Saavedra <enric.tejedor.saavedra@cern.ch>
|
||||
Date: Fri, 4 Mar 2022 11:32:29 +0100
|
||||
Subject: [PATCH] [PyROOT] Py_TYPE is changed to an inline static function in
|
||||
Py3.11
|
||||
|
||||
As mentioned in the Python docs:
|
||||
https://docs.python.org/3.11/whatsnew/3.11.html
|
||||
|
||||
Already available upstream in:
|
||||
https://github.com/wlav/CPyCppyy/commit/a8f41df0618f40ecc9a2a0b5a51fd12ddf2e6673
|
||||
---
|
||||
bindings/pyroot/cppyy/CPyCppyy/src/CPPConstructor.cxx | 2 +-
|
||||
bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyy.h | 7 +++++++
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/CPPConstructor.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/CPPConstructor.cxx
|
||||
index 0c564aff83..60b91d0b96 100644
|
||||
--- a/bindings/pyroot/cppyy/CPyCppyy/src/CPPConstructor.cxx
|
||||
+++ b/bindings/pyroot/cppyy/CPyCppyy/src/CPPConstructor.cxx
|
||||
@@ -122,7 +122,7 @@ PyObject* CPyCppyy::CPPConstructor::Call(
|
||||
if (pyclass) {
|
||||
self->SetSmart((PyObject*)Py_TYPE(self));
|
||||
Py_DECREF((PyObject*)Py_TYPE(self));
|
||||
- Py_TYPE(self) = (PyTypeObject*)pyclass;
|
||||
+ Py_SET_TYPE(self, (PyTypeObject*)pyclass);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyy.h b/bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyy.h
|
||||
index 375ea1cb95..11221cd7ef 100644
|
||||
--- a/bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyy.h
|
||||
+++ b/bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyy.h
|
||||
@@ -304,6 +304,13 @@ inline Py_ssize_t PyNumber_AsSsize_t(PyObject* obj, PyObject*) {
|
||||
#define CPyCppyy_PyCFunction_Call PyCFunction_Call
|
||||
#endif
|
||||
|
||||
+// Py_TYPE is changed to an inline static function in 3.11
|
||||
+#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_TYPE)
|
||||
+static inline
|
||||
+void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type) { ob->ob_type = type; }
|
||||
+#define Py_SET_TYPE(ob, type) _Py_SET_TYPE((PyObject*)(ob), type)
|
||||
+#endif
|
||||
+
|
||||
// C++ version of the cppyy API
|
||||
#include "Cppyy.h"
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From 484deb056dacf768aba4954073b41105c431bffc Mon Sep 17 00:00:00 2001
|
||||
From: Enric Tejedor Saavedra <enric.tejedor.saavedra@cern.ch>
|
||||
Date: Thu, 9 Jun 2022 12:24:07 +0200
|
||||
Subject: [PATCH] [PyROOT] code.h must not be included directly in 3.11
|
||||
|
||||
It has been moved to Include/cpython, and it is included by Python.h.
|
||||
|
||||
See:
|
||||
https://docs.python.org/3.11/whatsnew/3.11.html
|
||||
---
|
||||
bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx
|
||||
index 59997e390d..28bbd635c2 100644
|
||||
--- a/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx
|
||||
+++ b/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx
|
||||
@@ -1,10 +1,10 @@
|
||||
// Bindings
|
||||
#include "CPyCppyy.h"
|
||||
#include "structmember.h" // from Python
|
||||
-#if PY_VERSION_HEX >= 0x02050000
|
||||
-#include "code.h" // from Python
|
||||
-#else
|
||||
+#if PY_VERSION_HEX < 0x02050000
|
||||
#include "compile.h" // from Python
|
||||
+#elif PY_VERSION_HEX < 0x030b0000
|
||||
+#include "code.h" // from Python
|
||||
#endif
|
||||
#ifndef CO_NOFREE
|
||||
// python2.2 does not have CO_NOFREE defined
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
From d5135f7869406396b3ba8e944c71dbdd67d3ea01 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Rembser <jonas.rembser@cern.ch>
|
||||
Date: Tue, 23 Dec 2025 19:04:45 +0100
|
||||
Subject: [PATCH] [Python] Fix TF1 Pythonization test for NumPy 2.4.0
|
||||
|
||||
The new NumPy 2.4.0 is more strict when implicitly converting 1-element
|
||||
arrays to scalars. It doesn't do that anymore, causing the TF1
|
||||
Pythonization tests to fail (see log below).
|
||||
|
||||
This actually pointed to a real mistake in setting up the test, where a
|
||||
2D array was used to define the TFormula parameters while it should be a
|
||||
1D array.
|
||||
|
||||
```txt
|
||||
962/3718 Test #93: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..............................***Failed 3.05 sec
|
||||
test_callable (tf_pycallables.TF1.test_callable)
|
||||
Test function provided as callable ... ok
|
||||
test_evalpar (tf_pycallables.TF1.test_evalpar)
|
||||
Test the 2D Numpy array pythonizations for TF1::EvalPar ... ERROR
|
||||
test_evalpar_dynamic (tf_pycallables.TF1.test_evalpar_dynamic)
|
||||
Test the 2D NumPy pythonizations with dynamic TF1 data dimensions ... ok
|
||||
test_fitgauss (tf_pycallables.TF1.test_fitgauss)
|
||||
Test fitting a histogram to a Python function ... ok
|
||||
test_identity (tf_pycallables.TF1.test_identity)
|
||||
Test simple function without parameters ... ok
|
||||
test_params (tf_pycallables.TF1.test_params)
|
||||
Test function with parameters ... ok
|
||||
test_params (tf_pycallables.TF2.test_params)
|
||||
Test function with parameters ... ok
|
||||
test_params (tf_pycallables.TF3.test_params)
|
||||
Test function with parameters ... ok
|
||||
|
||||
======================================================================
|
||||
ERROR: test_evalpar (tf_pycallables.TF1.test_evalpar)
|
||||
Test the 2D Numpy array pythonizations for TF1::EvalPar
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 129, in test_evalpar
|
||||
expected_value = pyf_tf1_coulomb(x[i, ::2], params)
|
||||
File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 33, in pyf_tf1_coulomb
|
||||
return p[1] * x[0] * x[1] / (p[0]**2) * math.exp(-p[2] / p[0])
|
||||
~~~~~~~~^^^^^^^^^^^^^^
|
||||
TypeError: only 0-dimensional arrays can be converted to Python scalars
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 8 tests in 1.469s
|
||||
|
||||
FAILED (errors=1)
|
||||
CMake Error at /github/home/ROOT-CI/src/cmake/modules/RootTestDriver.cmake:232 (message):
|
||||
error code: 1
|
||||
|
||||
```
|
||||
---
|
||||
.../pyroot/pythonizations/test/tf_pycallables.py | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/bindings/pyroot/pythonizations/test/tf_pycallables.py b/bindings/pyroot/pythonizations/test/tf_pycallables.py
|
||||
index 2a7d6b72462..5a223030ec9 100644
|
||||
--- a/bindings/pyroot/pythonizations/test/tf_pycallables.py
|
||||
+++ b/bindings/pyroot/pythonizations/test/tf_pycallables.py
|
||||
@@ -116,11 +116,13 @@ class TF1(unittest.TestCase):
|
||||
[3.0, 10, 4.0]
|
||||
])
|
||||
|
||||
- params = np.array([
|
||||
- [1.0], # Distance between charges r
|
||||
- [8.99e9], # Coulomb constant k (in N·m²/C²)
|
||||
- [0.1] # Additional factor for modulation
|
||||
- ])
|
||||
+ params = np.array(
|
||||
+ [
|
||||
+ 1.0, # Distance between charges r
|
||||
+ 8.99e9, # Coulomb constant k (in N·m²/C²)
|
||||
+ 0.1, # Additional factor for modulation
|
||||
+ ]
|
||||
+ )
|
||||
|
||||
# Slice to avoid the dummy column of 10's
|
||||
res = rtf1_coulomb.EvalPar(x[:, ::2], params)
|
||||
--
|
||||
2.52.0
|
||||
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
From e1f42658629ad67ce7cb224a1379d133f61f2e35 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Rembser <jonas.rembser@cern.ch>
|
||||
Date: Sun, 11 Jan 2026 10:25:51 +0100
|
||||
Subject: [PATCH] [RF] Use TRandom3 in test RooFuncWrapper
|
||||
|
||||
Use TRandom3 instead of the `<random>` to get compiler-independent,
|
||||
reproducible behavior.
|
||||
---
|
||||
roofit/roofitcore/test/testRooFuncWrapper.cxx | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/roofit/roofitcore/test/testRooFuncWrapper.cxx b/roofit/roofitcore/test/testRooFuncWrapper.cxx
|
||||
index 2ebdf95333f..189e8f2e266 100644
|
||||
--- a/roofit/roofitcore/test/testRooFuncWrapper.cxx
|
||||
+++ b/roofit/roofitcore/test/testRooFuncWrapper.cxx
|
||||
@@ -34,12 +34,12 @@
|
||||
#include <RooWorkspace.h>
|
||||
|
||||
#include <ROOT/StringUtils.hxx>
|
||||
+#include <TMath.h>
|
||||
#include <TROOT.h>
|
||||
+#include <TRandom3.h>
|
||||
#include <TSystem.h>
|
||||
-#include <TMath.h>
|
||||
|
||||
#include <functional>
|
||||
-#include <random>
|
||||
|
||||
#include "gtest_wrapper.h"
|
||||
|
||||
@@ -66,13 +66,13 @@ double getNumDerivative(const RooAbsReal &pdf, RooRealVar &var, const RooArgSet
|
||||
|
||||
void randomizeParameters(const RooArgSet ¶meters)
|
||||
{
|
||||
+ TRandom3 rng(1337);
|
||||
+
|
||||
double lowerBound = -0.1;
|
||||
double upperBound = 0.1;
|
||||
- std::uniform_real_distribution<double> unif(lowerBound, upperBound);
|
||||
- std::default_random_engine re;
|
||||
|
||||
for (auto *param : parameters) {
|
||||
- double mul = unif(re);
|
||||
+ double mul = rng.Uniform(lowerBound, upperBound);
|
||||
|
||||
auto par = dynamic_cast<RooAbsRealLValue *>(param);
|
||||
if (!par)
|
||||
--
|
||||
2.52.0
|
||||
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
From 4da50ef374cd231163dff77493f9367cd62583d9 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Sun, 30 Mar 2025 21:23:14 +0200
|
||||
Subject: [PATCH] Revert "[test] Fetch the geometries from EOS and not from the
|
||||
website"
|
||||
|
||||
This reverts commit a8a879ce252e45405452db38d9178c7883582a7d.
|
||||
---
|
||||
test/stressGeometry.cxx | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/test/stressGeometry.cxx b/test/stressGeometry.cxx
|
||||
index 7fb6bf97e7..f8d78f4f54 100644
|
||||
--- a/test/stressGeometry.cxx
|
||||
+++ b/test/stressGeometry.cxx
|
||||
@@ -1,6 +1,6 @@
|
||||
// Program to check a TGeo geometry
|
||||
// The first time you run this program, the geometry files will be taken
|
||||
-// from /eos/root-eos/testfiles/ (previously from http://root.cern/files)
|
||||
+// from http://root.cern/files
|
||||
//
|
||||
// How the program works
|
||||
// If the file <geom_name>_ref.root does not exist, it is generated. The file
|
||||
@@ -274,13 +274,13 @@ void stressGeometry(const char *exp="*", Bool_t generate_ref=kFALSE, Bool_t vecg
|
||||
delete gGeoManager;
|
||||
gGeoManager = 0;
|
||||
}
|
||||
- TGeoManager::Import(Form("root://eospublic.cern.ch//eos/root-eos/testfiles/%s",fname.Data()));
|
||||
+ TGeoManager::Import(Form("http://root.cern/files/%s",fname.Data()));
|
||||
if (!gGeoManager) return;
|
||||
if (vecgeom) TVirtualGeoConverter::Instance()->ConvertGeometry();
|
||||
|
||||
fname = TString::Format("files/%s_ref_%d.root", exps[i],versions[i]);
|
||||
|
||||
- if (gen_ref || !TFile::Open(Form("root://eospublic.cern.ch//eos/root-eos/testfiles//%s_ref_%d.root",exps[i],versions[i]),"CACHEREAD")) {
|
||||
+ if (gen_ref || !TFile::Open(Form("http://root.cern/files/%s_ref_%d.root",exps[i],versions[i]),"CACHEREAD")) {
|
||||
if (!gen_ref) fprintf(stderr,"File: %s does not exist, generating it\n", fname.Data());
|
||||
else fprintf(stderr,"Generating reference file %s\n", fname.Data());
|
||||
WriteRef(i);
|
||||
@@ -320,7 +320,7 @@ void ReadRef(Int_t kexp) {
|
||||
TFile *f = 0;
|
||||
//use ref_[version[i]] files
|
||||
if (!gen_ref)
|
||||
- fname = TString::Format("root://eospublic.cern.ch//eos/root-eos/testfiles//%s_ref_%d.root", exps[kexp],versions[kexp]);
|
||||
+ fname = TString::Format("http://root.cern/files/%s_ref_%d.root", exps[kexp],versions[kexp]);
|
||||
else
|
||||
fname.Format("files/%s_ref_%d.root", exps[kexp],versions[kexp]);
|
||||
|
||||
@@ -546,7 +546,7 @@ void InspectDiff(const char* exp="alice",Long64_t ientry=-1) {
|
||||
Float_t rad = 0.;
|
||||
TString fname(TString::Format("%s.root",exp));
|
||||
if (gSystem->AccessPathName(fname)) {
|
||||
- TGeoManager::Import(Form("root://eospublic.cern.ch//eos/root-eos/testfiles//%s",fname.Data()));
|
||||
+ TGeoManager::Import(Form("http://root.cern/files/%s",fname.Data()));
|
||||
} else {
|
||||
TGeoManager::Import(fname);
|
||||
}
|
||||
--
|
||||
2.49.0
|
||||
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
From 98a5042a02dd7c1aaa9fbd5e54c8620c6b72484f Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Mon, 2 Jun 2025 21:22:39 +0200
|
||||
Subject: [PATCH] Save memory. Do not link to LLVM libraries in parallel
|
||||
|
||||
---
|
||||
core/clingutils/test/CMakeLists.txt | 3 +++
|
||||
interpreter/CppInterOp/unittests/CppInterOp/CMakeLists.txt | 6 ++++++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/core/clingutils/test/CMakeLists.txt b/core/clingutils/test/CMakeLists.txt
|
||||
index a6c7aedac99..90ac0139c24 100644
|
||||
--- a/core/clingutils/test/CMakeLists.txt
|
||||
+++ b/core/clingutils/test/CMakeLists.txt
|
||||
@@ -36,3 +36,6 @@ if(NOT builtin_clang)
|
||||
endif()
|
||||
|
||||
ROOT_ADD_UNITTEST_DIR(Core ${CLING_LIBRARIES} $<TARGET_OBJECTS:ClingUtils>)
|
||||
+
|
||||
+# Save memory. Do not link to LLVM libraries in parallel
|
||||
+add_dependencies(coreclingutilstestUnit CppInterOpTests)
|
||||
diff --git a/interpreter/CppInterOp/unittests/CppInterOp/CMakeLists.txt b/interpreter/CppInterOp/unittests/CppInterOp/CMakeLists.txt
|
||||
index 4b4b43bdd29..a028802fedc 100644
|
||||
--- a/interpreter/CppInterOp/unittests/CppInterOp/CMakeLists.txt
|
||||
+++ b/interpreter/CppInterOp/unittests/CppInterOp/CMakeLists.txt
|
||||
@@ -66,6 +66,9 @@ target_link_libraries(CppInterOpTests
|
||||
clangCppInterOp
|
||||
)
|
||||
|
||||
+# Save memory. Do not link to LLVM libraries in parallel
|
||||
+add_dependencies(CppInterOpTests DynamicLibraryManagerTests)
|
||||
+
|
||||
set_output_directory(CppInterOpTests
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${EXTRA_PATH_TEST_BINARIES}
|
||||
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${EXTRA_PATH_TEST_BINARIES}
|
||||
@@ -129,5 +132,8 @@ set_output_directory(DynamicLibraryManagerTests
|
||||
|
||||
add_dependencies(DynamicLibraryManagerTests TestSharedLib)
|
||||
|
||||
+# Save memory. Do not link to LLVM libraries in parallel
|
||||
+add_dependencies(DynamicLibraryManagerTests Cling)
|
||||
+
|
||||
#export_executable_symbols_for_plugins(TestSharedLib)
|
||||
add_subdirectory(TestSharedLib)
|
||||
--
|
||||
2.52.0
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From fd18e83ae79760f7e8cca6f28b6d0f89d912b152 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Rembser <jonas.rembser@cern.ch>
|
||||
Date: Wed, 26 Nov 2025 12:40:03 +0100
|
||||
Subject: [PATCH] [VecOps] Remove outdated `IsSmall` helper function in tests
|
||||
|
||||
The commit 2605710bea7b1 changed from using the `ROOT::Detail::VecOps::`
|
||||
namespace explicitly for `IsSmall` to a `using` statement. However,
|
||||
there was also a remnant `IsSmall` function with an outdated
|
||||
implementation in the test file itself, which we can now remove.
|
||||
---
|
||||
math/vecops/test/vecops_rvec.cxx | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/math/vecops/test/vecops_rvec.cxx b/math/vecops/test/vecops_rvec.cxx
|
||||
index 034f06ca211..432c673a553 100644
|
||||
--- a/math/vecops/test/vecops_rvec.cxx
|
||||
+++ b/math/vecops/test/vecops_rvec.cxx
|
||||
@@ -1493,13 +1493,6 @@ TEST(VecOps, Construct)
|
||||
EXPECT_TRUE(fourVects[2] == ref2);
|
||||
}
|
||||
|
||||
-bool IsSmall(const RVec<int> &v)
|
||||
-{
|
||||
- // the first array element is right after the 3 data members of SmallVectorBase
|
||||
- return reinterpret_cast<std::uintptr_t>(v.begin()) - reinterpret_cast<std::uintptr_t>(&v) ==
|
||||
- sizeof(void *) + 2 * sizeof(int);
|
||||
-}
|
||||
-
|
||||
// this is a regression test for https://github.com/root-project/root/issues/6796
|
||||
TEST(VecOps, MemoryAdoptionAndClear)
|
||||
{
|
||||
--
|
||||
2.52.0
|
||||
|
||||
26
root-add-RCutFlowReport-to-LinkDef-file.patch
Normal file
26
root-add-RCutFlowReport-to-LinkDef-file.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
From 2e3fabbe5423f50ee98ce848d8e85ec7a2a2106d Mon Sep 17 00:00:00 2001
|
||||
From: Enrico Guiraud <enrico.guiraud@cern.ch>
|
||||
Date: Thu, 15 Jul 2021 12:17:56 +0200
|
||||
Subject: [PATCH] [DF] Add RCutFlowReport to LinkDef
|
||||
|
||||
This should fix some sporadic failures in cling's symbol resolution
|
||||
in builds without runtime cxx modules.
|
||||
---
|
||||
tree/dataframe/inc/LinkDef.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tree/dataframe/inc/LinkDef.h b/tree/dataframe/inc/LinkDef.h
|
||||
index 8103468082..684fc3b6f1 100644
|
||||
--- a/tree/dataframe/inc/LinkDef.h
|
||||
+++ b/tree/dataframe/inc/LinkDef.h
|
||||
@@ -58,6 +58,7 @@
|
||||
#pragma link C++ class ROOT::Detail::RDF::RMergeableValue<TProfile>+;
|
||||
#pragma link C++ class ROOT::Detail::RDF::RMergeableValue<TProfile2D>+;
|
||||
#pragma link C++ class TNotifyLink<ROOT::Internal::RDF::RDataBlockFlag>;
|
||||
+#pragma link C++ class ROOT::RDF::RCutFlowReport;
|
||||
|
||||
#endif
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
||||
25
root-add-RDisplay-to-LinkDef-file.patch
Normal file
25
root-add-RDisplay-to-LinkDef-file.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From d9e15857c189edcfa75af5c6244ff68fac74f06f Mon Sep 17 00:00:00 2001
|
||||
From: Enrico Guiraud <enrico.guiraud@cern.ch>
|
||||
Date: Thu, 10 Jun 2021 10:00:32 +0200
|
||||
Subject: [PATCH] [DF] Add RDisplay to LinkDef
|
||||
|
||||
To help cling autoloading.
|
||||
---
|
||||
tree/dataframe/inc/LinkDef.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tree/dataframe/inc/LinkDef.h b/tree/dataframe/inc/LinkDef.h
|
||||
index 3879ac8d5d..8103468082 100644
|
||||
--- a/tree/dataframe/inc/LinkDef.h
|
||||
+++ b/tree/dataframe/inc/LinkDef.h
|
||||
@@ -20,6 +20,7 @@
|
||||
#pragma link C++ namespace ROOT::Internal::RDF::GraphDrawing;
|
||||
#pragma link C++ namespace ROOT::Detail::RDF;
|
||||
#pragma link C++ namespace ROOT::RDF;
|
||||
+#pragma link C++ class ROOT::RDF::RDisplay-;
|
||||
#pragma link C++ class ROOT::Internal::RDF::RActionBase-;
|
||||
#pragma link C++ class ROOT::Internal::RDF::RJittedAction-;
|
||||
#pragma link C++ class ROOT::Detail::RDF::RFilterBase-;
|
||||
--
|
||||
2.31.1
|
||||
|
||||
36
root-add-TTreeProcessorMP-to-LinkDef-file.patch
Normal file
36
root-add-TTreeProcessorMP-to-LinkDef-file.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
From 56d52ccf2fad2736e49d3cfc4c9df22492e1dbfc Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Tue, 8 Jun 2021 02:46:18 +0200
|
||||
Subject: [PATCH] Add TTreeProcessorMP to LinkDef
|
||||
|
||||
This fixes test failure:
|
||||
|
||||
745/1157 Test #729: tutorial-multicore-mp102_readNtuplesFillHistosAndFit ................***Failed 1.55 sec
|
||||
Processing /builddir/build/BUILD/root-6.25.01/tutorials/multicore/mp102_readNtuplesFillHistosAndFit.C...
|
||||
IncrementalExecutor::executeFunction: symbol '_ZN4ROOT16TTreeProcessorMPC1Ej' unresolved while linking [cling interface function]!
|
||||
You are probably missing the definition of ROOT::TTreeProcessorMP::TTreeProcessorMP(unsigned int)
|
||||
Maybe you need to load the corresponding shared library?
|
||||
IncrementalExecutor::executeFunction: symbol '_ZN4ROOT16TTreeProcessorMP11ReplyToIdleEP7TSocket' unresolved while linking [cling interface function]!
|
||||
You are probably missing the definition of ROOT::TTreeProcessorMP::ReplyToIdle(TSocket*)
|
||||
Maybe you need to load the corresponding shared library?
|
||||
CMake Error at /builddir/build/BUILD/root-6.25.01/x86_64-redhat-linux-gnu/RootTestDriver.cmake:237 (message):
|
||||
error code: 1
|
||||
---
|
||||
tree/treeplayer/inc/LinkDef.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tree/treeplayer/inc/LinkDef.h b/tree/treeplayer/inc/LinkDef.h
|
||||
index e7fdd7c9bf..d195536a40 100644
|
||||
--- a/tree/treeplayer/inc/LinkDef.h
|
||||
+++ b/tree/treeplayer/inc/LinkDef.h
|
||||
@@ -30,6 +30,7 @@
|
||||
#pragma link C++ class TSimpleAnalysis+;
|
||||
#ifndef _MSC_VER
|
||||
#pragma link C++ class TMPWorkerTree+;
|
||||
+#pragma link C++ class ROOT::TTreeProcessorMP-;
|
||||
#endif
|
||||
#ifdef R__USE_IMT
|
||||
#pragma link C++ class ROOT::TTreeProcessorMT-;
|
||||
--
|
||||
2.31.1
|
||||
|
||||
37
root-avoid-deleting-TFormulas-twice.patch
Normal file
37
root-avoid-deleting-TFormulas-twice.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
From c7dd58f3bc012690bab16763b1d73a4b7106ced9 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Tue, 29 Mar 2022 15:40:35 +0200
|
||||
Subject: [PATCH] Avoid deleting TFormulas twice
|
||||
|
||||
Example failure:
|
||||
|
||||
562/1224 Test #541: tutorial-gl-gltf3 ...................................................***Failed Error regular expression found in output. Regex=[Error in <] 1.36 sec
|
||||
Processing /builddir/build/BUILD/root-6.26.00/tutorials/gl/gltf3.C...
|
||||
Error in <TList::Delete>: A list is accessing an object (0x7fffd1c959a0) already deleted (list name = Functions)
|
||||
Error in <TList::Delete>: A list is accessing an object (0x7fffd1c95750) already deleted (list name = Functions)
|
||||
|
||||
The commit also changes the filename used in
|
||||
tutorials/hist/fillrandom.py to be different form the one used in
|
||||
tutorials/hist/fillrandom.C (and tutorials/pyroot/fillrandom.py)
|
||||
---
|
||||
tutorials/gl/gltf3.C | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tutorials/gl/gltf3.C b/tutorials/gl/gltf3.C
|
||||
index 3697e69b7a..4089f0d2b7 100644
|
||||
--- a/tutorials/gl/gltf3.C
|
||||
+++ b/tutorials/gl/gltf3.C
|
||||
@@ -27,8 +27,8 @@ void gltf3()
|
||||
TPad *tf3Pad = new TPad("box", "box", 0.04, 0.04, 0.96, 0.8);
|
||||
tf3Pad->Draw();
|
||||
|
||||
- TFormula f1 = TFormula("f1", "x*x + y*y + z*z + 2*y - 1");
|
||||
- TFormula f2 = TFormula("f2", "x*x + y*y + z*z - 2*y - 1");
|
||||
+ TFormula *f1 = new TFormula("f1", "x*x + y*y + z*z + 2*y - 1");
|
||||
+ TFormula *f2 = new TFormula("f2", "x*x + y*y + z*z - 2*y - 1");
|
||||
|
||||
// Klein bottle with cut top&bottom parts
|
||||
// The Klein bottle is a closed non-orientable surface that has no
|
||||
--
|
||||
2.35.1
|
||||
|
||||
31
root-core-base-test.patch
Normal file
31
root-core-base-test.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
From 12d52a60629e1639ced23a1919bd85628d9135ea Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Sun, 3 Apr 2022 23:23:00 +0200
|
||||
Subject: [PATCH] Fix library link order
|
||||
|
||||
Fixes undefined references when linking CoreBaseTests
|
||||
|
||||
../../../lib/libCling.so.6.26.00: undefined reference to `TMemFile::TMemFile(char const*, TMemFile::ZeroCopyView_t const&)'
|
||||
../../../lib/libCling.so.6.26.00: undefined reference to `TFile::TFile(char const*, char const*, char const*, int)'
|
||||
../../../lib/libCling.so.6.26.00: undefined reference to `TFile::~TFile()'
|
||||
../../../lib/libCling.so.6.26.00: undefined reference to `TStreamerInfo::TStreamerInfo()'
|
||||
../../../lib/libCling.so.6.26.00: undefined reference to `TMemFile::~TMemFile()'
|
||||
---
|
||||
core/base/test/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/core/base/test/CMakeLists.txt b/core/base/test/CMakeLists.txt
|
||||
index 4b08cb0390..9b52e83405 100644
|
||||
--- a/core/base/test/CMakeLists.txt
|
||||
+++ b/core/base/test/CMakeLists.txt
|
||||
@@ -22,6 +22,6 @@ ROOT_ADD_GTEST(CoreBaseTests
|
||||
TQObjectTests.cxx
|
||||
TExceptionHandlerTests.cxx
|
||||
TStringTest.cxx
|
||||
- LIBRARIES Core RIO ${extralibs})
|
||||
+ LIBRARIES ${extralibs} RIO Core)
|
||||
|
||||
ROOT_ADD_GTEST(CoreErrorTests TErrorTests.cxx LIBRARIES Core)
|
||||
--
|
||||
2.35.1
|
||||
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
From 251de0f8b237ce041df4960f831fe4a1fade6d92 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Rembser <jonas.rembser@cern.ch>
|
||||
Date: Sat, 6 Dec 2025 17:39:40 +0100
|
||||
Subject: [PATCH] [cppyy] Remove code related to finding CPyCppyy API header
|
||||
path
|
||||
|
||||
This is not needed for ROOT, because the CPyCppyy API headers are
|
||||
installed with the other ROOT headers anyway, and ROOT knows where to
|
||||
find them already.
|
||||
---
|
||||
.../cppyy/cppyy/python/cppyy/__init__.py | 82 -------------------
|
||||
1 file changed, 82 deletions(-)
|
||||
|
||||
diff --git a/bindings/pyroot/cppyy/cppyy/python/cppyy/__init__.py b/bindings/pyroot/cppyy/cppyy/python/cppyy/__init__.py
|
||||
index 68e3c49e5fe..c8dd458bfdd 100644
|
||||
--- a/bindings/pyroot/cppyy/cppyy/python/cppyy/__init__.py
|
||||
+++ b/bindings/pyroot/cppyy/cppyy/python/cppyy/__init__.py
|
||||
@@ -297,88 +297,6 @@ elif ispypy:
|
||||
if os.path.exists(apipath) and os.path.exists(os.path.join(apipath, 'Python.h')):
|
||||
add_include_path(apipath)
|
||||
|
||||
-# add access to extra headers for dispatcher (CPyCppyy only (?))
|
||||
-if not ispypy:
|
||||
- try:
|
||||
- apipath_extra = os.environ['CPPYY_API_PATH']
|
||||
- if os.path.basename(apipath_extra) == 'CPyCppyy':
|
||||
- apipath_extra = os.path.dirname(apipath_extra)
|
||||
- except KeyError:
|
||||
- apipath_extra = None
|
||||
-
|
||||
- if apipath_extra is None:
|
||||
- try:
|
||||
- if 0x30a0000 <= sys.hexversion:
|
||||
- import importlib.metadata as m
|
||||
-
|
||||
- for p in m.files('CPyCppyy'):
|
||||
- if p.match('API.h'):
|
||||
- ape = p.locate()
|
||||
- break
|
||||
- del p, m
|
||||
- else:
|
||||
- import pkg_resources as pr
|
||||
-
|
||||
- d = pr.get_distribution('CPyCppyy')
|
||||
- for line in d.get_metadata_lines('RECORD'):
|
||||
- if 'API.h' in line:
|
||||
- ape = os.path.join(d.location, line[0:line.find(',')])
|
||||
- break
|
||||
- del line, d, pr
|
||||
-
|
||||
- if os.path.exists(ape):
|
||||
- apipath_extra = os.path.dirname(os.path.dirname(ape))
|
||||
- del ape
|
||||
- except Exception:
|
||||
- pass
|
||||
-
|
||||
- if apipath_extra is None:
|
||||
- ldversion = sysconfig.get_config_var('LDVERSION')
|
||||
- if not ldversion:
|
||||
- ldversion = sys.version[:3]
|
||||
-
|
||||
- apipath_extra = os.path.join(os.path.dirname(apipath), 'site', 'python'+ldversion)
|
||||
- if not os.path.exists(os.path.join(apipath_extra, 'CPyCppyy')):
|
||||
- import glob
|
||||
- import platform
|
||||
-
|
||||
- if platform.system() == "Windows":
|
||||
- # Install locations are handled differently on Windows
|
||||
- import libcppyy
|
||||
-
|
||||
- ape = os.path.dirname(libcppyy.__file__)
|
||||
- else:
|
||||
- import cppyy.libcppyy as libcppyy
|
||||
-
|
||||
- ape = os.path.dirname(libcppyy.__file__)
|
||||
- # a "normal" structure finds the include directory up to 3 levels up,
|
||||
- # ie. dropping lib/pythonx.y[md]/site-packages
|
||||
- for i in range(3):
|
||||
- if os.path.exists(os.path.join(ape, 'include')):
|
||||
- break
|
||||
- ape = os.path.dirname(ape)
|
||||
-
|
||||
- ape = os.path.join(ape, 'include')
|
||||
- if os.path.exists(os.path.join(ape, 'CPyCppyy')):
|
||||
- apipath_extra = ape
|
||||
- else:
|
||||
- # add back pythonx.y or site/pythonx.y if present
|
||||
- for p in glob.glob(os.path.join(ape, 'python'+sys.version[:3]+'*'))+\
|
||||
- glob.glob(os.path.join(ape, '*', 'python'+sys.version[:3]+'*')):
|
||||
- if os.path.exists(os.path.join(p, 'CPyCppyy')):
|
||||
- apipath_extra = p
|
||||
- break
|
||||
-
|
||||
- if apipath_extra.lower() != 'none':
|
||||
- if not os.path.exists(os.path.join(apipath_extra, 'CPyCppyy')):
|
||||
- warnings.warn("CPyCppyy API not found (tried: %s); "
|
||||
- "set CPPYY_API_PATH envar to the 'CPyCppyy' API directory to fix"
|
||||
- % apipath_extra)
|
||||
- else:
|
||||
- add_include_path(apipath_extra)
|
||||
-
|
||||
- del apipath_extra
|
||||
-
|
||||
if os.getenv('CONDA_PREFIX'):
|
||||
# MacOS, Linux
|
||||
include_path = os.path.join(os.getenv('CONDA_PREFIX'), 'include')
|
||||
--
|
||||
2.52.0
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
From f4577e76a5dc23842d6be0a82df804f71fc820ef Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Rembser <jonas.rembser@cern.ch>
|
||||
Date: Mon, 1 Dec 2025 16:51:36 +0100
|
||||
Subject: [PATCH] [cppyy] Remove now irrelevant `load_cpp_backend()` call
|
||||
|
||||
As we don't have a separate `cppyy_backend` anymore (neither as a Python
|
||||
package, nor as a shared library), trying to load the backend library
|
||||
will always give an exception that will be caught as an `ImportError`.
|
||||
|
||||
It would be cleaner if this code branch is not even taken.
|
||||
---
|
||||
.../cppyy/cppyy/python/cppyy/_cpython_cppyy.py | 12 ------------
|
||||
1 file changed, 12 deletions(-)
|
||||
|
||||
diff --git a/bindings/pyroot/cppyy/cppyy/python/cppyy/_cpython_cppyy.py b/bindings/pyroot/cppyy/cppyy/python/cppyy/_cpython_cppyy.py
|
||||
index bac078ea7c9..f98a34a697c 100644
|
||||
--- a/bindings/pyroot/cppyy/cppyy/python/cppyy/_cpython_cppyy.py
|
||||
+++ b/bindings/pyroot/cppyy/cppyy/python/cppyy/_cpython_cppyy.py
|
||||
@@ -19,24 +19,12 @@ __all__ = [
|
||||
'_end_capture_stderr'
|
||||
]
|
||||
|
||||
-# First load the dependency libraries of the backend, then pull in the libcppyy
|
||||
-# extension module. If the backed can't be loaded, it was probably linked
|
||||
-# statically into the extension module, so we don't error out at this point.
|
||||
-try:
|
||||
- from cppyy_backend import loader
|
||||
- c = loader.load_cpp_backend()
|
||||
-except ImportError:
|
||||
- c = None
|
||||
-
|
||||
if platform.system() == "Windows":
|
||||
# On Windows, the library has to be searched without prefix
|
||||
import libcppyy as _backend
|
||||
else:
|
||||
import cppyy.libcppyy as _backend
|
||||
|
||||
-if c is not None:
|
||||
- _backend._cpp_backend = c
|
||||
-
|
||||
# explicitly expose APIs from libcppyy
|
||||
_w = ctypes.CDLL(_backend.__file__, ctypes.RTLD_GLOBAL)
|
||||
|
||||
--
|
||||
2.52.0
|
||||
|
||||
48
root-different-filename.patch
Normal file
48
root-different-filename.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
From a486081a8065154308b23381c3a77f3fdb73de97 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Wed, 16 Nov 2022 20:44:48 +0100
|
||||
Subject: [PATCH] Use different filename in loopdir.C and loopdir11.C to avoid
|
||||
race condition
|
||||
|
||||
Start 672: tutorial-io-loopdir
|
||||
690/1156 Test #666: tutorial-io-double32 ................................................ Passed 2.42 sec
|
||||
Start 673: tutorial-io-loopdir11
|
||||
691/1156 Test #673: tutorial-io-loopdir11 ............................................... Passed 0.76 sec
|
||||
Start 674: tutorial-io-mergeSelective
|
||||
692/1156 Test #672: tutorial-io-loopdir .................................................***Failed Error regular expression found in output. Regex=[Error in <] 1.23 sec
|
||||
Processing /builddir/build/BUILD/root-6.26.10/tutorials/io/loopdir.C...
|
||||
Info in <TCanvas::Print>: ps file hsimple.ps has been created
|
||||
Info in <TCanvas::Print>: Current canvas added to ps file hsimple.ps
|
||||
Info in <TCanvas::Print>: Current canvas added to ps file hsimple.ps
|
||||
Info in <TCanvas::Print>: Current canvas added to ps file hsimple.ps
|
||||
Info in <TCanvas::Print>: ps file hsimple.ps has been closed
|
||||
Error in <TPostScript::Text>: Cannot open temporary file: hsimple.ps_tmp_2089748
|
||||
---
|
||||
tutorials/io/loopdir11.C | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tutorials/io/loopdir11.C b/tutorials/io/loopdir11.C
|
||||
index b5f9f4719c..bf8c33b442 100644
|
||||
--- a/tutorials/io/loopdir11.C
|
||||
+++ b/tutorials/io/loopdir11.C
|
||||
@@ -12,14 +12,14 @@
|
||||
void loopdir11() {
|
||||
TFile *f1 = TFile::Open("hsimple.root");
|
||||
TCanvas c1;
|
||||
- c1.Print("hsimple.ps[");
|
||||
+ c1.Print("hsimple11.ps[");
|
||||
for(auto k : *f1->GetListOfKeys()) {
|
||||
TKey *key = static_cast<TKey*>(k);
|
||||
TClass *cl = gROOT->GetClass(key->GetClassName());
|
||||
if (!cl->InheritsFrom("TH1")) continue;
|
||||
TH1 *h = key->ReadObject<TH1>();
|
||||
h->Draw();
|
||||
- c1.Print("hsimple.ps");
|
||||
+ c1.Print("hsimple11.ps");
|
||||
}
|
||||
- c1.Print("hsimple.ps]");
|
||||
+ c1.Print("hsimple11.ps]");
|
||||
}
|
||||
--
|
||||
2.38.1
|
||||
|
||||
44
root-do-not-remove-Wp-before-D-and-U.patch
Normal file
44
root-do-not-remove-Wp-before-D-and-U.patch
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
From 0191a987b7583c2aa84b1293105db353fee40b1d Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Fri, 10 Mar 2023 20:49:02 +0100
|
||||
Subject: [PATCH] Do not remove -Wp, before -D and -U when recording used
|
||||
compiler flags
|
||||
|
||||
This breaks the pattern used when undefining and then defining a
|
||||
variable in the same flag:
|
||||
|
||||
$ echo | g++ -Wp,-UVAR,-DVAR=1 -c -x c++ -
|
||||
|
||||
Here -Wp,-UVAR,-DVAR=1 will first undefine VAR and then define it to 1
|
||||
|
||||
If the -Wp, is dropped, this fails:
|
||||
$ echo | g++ -UVAR,-DVAR=1 -c -x c++ -
|
||||
<command-line>: warning: extra tokens at end of #undef directive
|
||||
|
||||
Now it will only undefine VAR, but not defin it. I.e.
|
||||
|
||||
insted of
|
||||
|
||||
you get
|
||||
|
||||
which explains the rather cryptic warning about extra token after #undef.
|
||||
---
|
||||
cmake/modules/RootConfiguration.cmake | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/modules/RootConfiguration.cmake b/cmake/modules/RootConfiguration.cmake
|
||||
index 3d1ae9be53..042b43f039 100644
|
||||
--- a/cmake/modules/RootConfiguration.cmake
|
||||
+++ b/cmake/modules/RootConfiguration.cmake
|
||||
@@ -729,7 +729,7 @@ if (cxxmodules)
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "(^|[ ]*)-W[^ ]*" "" __fflags "${CMAKE_Fortran_FLAGS}")
|
||||
-string(REGEX MATCHALL "-(D|U)[^ ]*" __defs "${CMAKE_CXX_FLAGS}")
|
||||
+string(REGEX MATCHALL "(-Wp,)?-(D|U)[^ ]*" __defs "${CMAKE_CXX_FLAGS}")
|
||||
set(ROOT_COMPILER_FLAG_HINTS "#
|
||||
set(ROOT_DEFINITIONS \"${__defs}\")
|
||||
set(ROOT_CXX_FLAGS \"${__cxxflags}\")
|
||||
--
|
||||
2.39.2
|
||||
|
||||
87
root-doxygen-fix1.patch
Normal file
87
root-doxygen-fix1.patch
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
From e303e0105b6f7bd7848a4385fcb62bedb847abb4 Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Couet <olivier.couet@cern.ch>
|
||||
Date: Mon, 12 Apr 2021 16:22:49 +0200
|
||||
Subject: [PATCH] RLogScopedVerbosity doxygen doc fix (#7830)
|
||||
|
||||
* RLogScopedVerbosity doxygen doc was not visible because source code was under ``` instead of ~~~
|
||||
|
||||
* [foundation] RLogger doc (NFC) - thanks, Sergey!
|
||||
|
||||
Co-authored-by: Axel Naumann <Axel.Naumann@cern.ch>
|
||||
---
|
||||
core/foundation/inc/ROOT/RLogger.hxx | 20 ++++++++++----------
|
||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/core/foundation/inc/ROOT/RLogger.hxx b/core/foundation/inc/ROOT/RLogger.hxx
|
||||
index d753bbc358..c1a1b22690 100644
|
||||
--- a/core/foundation/inc/ROOT/RLogger.hxx
|
||||
+++ b/core/foundation/inc/ROOT/RLogger.hxx
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
/// Construct an anonymous channel.
|
||||
RLogChannel() = default;
|
||||
|
||||
- /// Construct an anonymous channel with a default vebosity.
|
||||
+ /// Construct an anonymous channel with a default verbosity.
|
||||
explicit RLogChannel(ELogLevel verbosity) : fVerbosity(verbosity) {}
|
||||
|
||||
/// Construct a log channel given its name, which is part of the diagnostics.
|
||||
@@ -202,11 +202,11 @@ namespace Detail {
|
||||
|
||||
This builder can be used through the utility preprocessor macros R__LOG_ERROR,
|
||||
R__LOG_WARNING etc like this:
|
||||
- ```c++
|
||||
+~~~ {.cpp}
|
||||
R__LOG_INFO(ROOT::Experimental::HistLog()) << "all we know is " << 42;
|
||||
const int decreasedInfoLevel = 5;
|
||||
R__LOG_XDEBUG(ROOT::Experimental::WebGUILog(), decreasedInfoLevel) << "nitty-gritty details";
|
||||
- ```
|
||||
+~~~
|
||||
This will automatically capture the current class and function name, the file and line number.
|
||||
*/
|
||||
|
||||
@@ -235,10 +235,10 @@ public:
|
||||
Change the verbosity level (global or specific to the RLogChannel passed to the
|
||||
constructor) for the lifetime of this object.
|
||||
Example:
|
||||
- ```c++
|
||||
+~~~ {.cpp}
|
||||
RLogScopedVerbosity debugThis(gFooLog, ELogLevel::kDebug);
|
||||
Foo::SomethingToDebug();
|
||||
- ```
|
||||
+~~~
|
||||
*/
|
||||
class RLogScopedVerbosity {
|
||||
RLogChannel *fChannel;
|
||||
@@ -331,10 +331,10 @@ inline ELogLevel RLogChannel::GetEffectiveVerbosity(const RLogManager &mgr) cons
|
||||
|
||||
- The conditional `RLogBuilder` use prevents stream operators from being called if
|
||||
verbosity is too low, i.e.:
|
||||
- ````
|
||||
+ ~~~
|
||||
RLogScopedVerbosity silence(RLogLevel::kFatal);
|
||||
R__LOG_DEBUG(7) << WillNotBeCalled();
|
||||
- ```
|
||||
+ ~~~
|
||||
- To update counts of warnings / errors / fatal errors, those RLogEntries must
|
||||
always be created, even if in the end their emission will be silenced. This
|
||||
should be fine, performance-wise, as they should not happen frequently.
|
||||
@@ -350,13 +350,13 @@ inline ELogLevel RLogChannel::GetEffectiveVerbosity(const RLogManager &mgr) cons
|
||||
|
||||
/// \name LogMacros
|
||||
/// Macros to log diagnostics.
|
||||
-/// ```c++
|
||||
+/// ~~~ {.cpp}
|
||||
/// R__LOG_INFO(ROOT::Experimental::HistLog()) << "all we know is " << 42;
|
||||
///
|
||||
/// RLogScopedVerbosity verbose(kDebug + 5);
|
||||
/// const int decreasedInfoLevel = 5;
|
||||
-/// R__LOG_DEBUG(decreasedInfoLevel, ROOT::Experimental::WebGUILog()) << "nitty-gritty details";
|
||||
-/// ```
|
||||
+/// R__LOG_DEBUG(ROOT::Experimental::WebGUILog(), decreasedInfoLevel) << "nitty-gritty details";
|
||||
+/// ~~~
|
||||
///\{
|
||||
#define R__LOG_FATAL(...) R__LOG_TO_CHANNEL(ROOT::Experimental::ELogLevel::kFatal, __VA_ARGS__)
|
||||
#define R__LOG_ERROR(...) R__LOG_TO_CHANNEL(ROOT::Experimental::ELogLevel::kError, __VA_ARGS__)
|
||||
--
|
||||
2.33.1
|
||||
|
||||
26
root-doxygen-fix2.patch
Normal file
26
root-doxygen-fix2.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
From 37a1a43347bc1ecb492b13e2f06d80c16779c84f Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Sun, 5 Dec 2021 21:51:32 +0100
|
||||
Subject: [PATCH] Fix doxygen warning
|
||||
|
||||
warning: reached end of file while inside a ~~~ block!
|
||||
---
|
||||
gui/webdisplay/src/RWebDisplayHandle.cxx | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gui/webdisplay/src/RWebDisplayHandle.cxx b/gui/webdisplay/src/RWebDisplayHandle.cxx
|
||||
index 44a544bb51..84ff7a6990 100644
|
||||
--- a/gui/webdisplay/src/RWebDisplayHandle.cxx
|
||||
+++ b/gui/webdisplay/src/RWebDisplayHandle.cxx
|
||||
@@ -608,7 +608,7 @@ std::unique_ptr<RWebDisplayHandle> RWebDisplayHandle::Display(const RWebDisplayA
|
||||
/// Browser can specified when starting `root --web=firefox`
|
||||
/// Returns true when browser started
|
||||
/// It is convenience method, equivalent to:
|
||||
-/// ~~~
|
||||
+/// ~~~
|
||||
/// RWebDisplayArgs args;
|
||||
/// args.SetUrl(url);
|
||||
/// args.SetStandalone(false);
|
||||
--
|
||||
2.33.1
|
||||
|
||||
16
root-epel7-ppc64le-pyroot.patch
Normal file
16
root-epel7-ppc64le-pyroot.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
diff -ur root-6.22.04.orig/bindings/pyroot/pythonizations/python/ROOT/__init__.py root-6.22.04/bindings/pyroot/pythonizations/python/ROOT/__init__.py
|
||||
--- root-6.22.04.orig/bindings/pyroot/pythonizations/python/ROOT/__init__.py 2020-11-13 11:42:09.000000000 +0100
|
||||
+++ root-6.22.04/bindings/pyroot/pythonizations/python/ROOT/__init__.py 2020-11-14 15:38:24.462463625 +0100
|
||||
@@ -19,6 +19,12 @@
|
||||
# Prevent cppyy from filtering ROOT libraries
|
||||
environ['CPPYY_NO_ROOT_FILTER'] = '1'
|
||||
|
||||
+try:
|
||||
+ from ctypes import cdll
|
||||
+ libCore = cdll.LoadLibrary("libCore.so")
|
||||
+except:
|
||||
+ print("An exception occurred while loading libCore.so with ctypes")
|
||||
+
|
||||
import cppyy
|
||||
if not 'ROOTSYS' in environ:
|
||||
# Revert setting made by cppyy
|
||||
63
root-fix-compilation-with-gcc-12.patch
Normal file
63
root-fix-compilation-with-gcc-12.patch
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
From 3bc55ece1db8b32c5e86fd6b85856addd67265fb Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Sat, 15 Jan 2022 06:35:58 +0100
|
||||
Subject: [PATCH] Fix compilation with gcc 12
|
||||
|
||||
Fixes error: use of deleted function
|
||||
|
||||
/builddir/build/BUILD/root-6.24.06/interpreter/llvm/src/lib/Target/NVPTX/NVPTXAsmPrinter.cpp: In member function 'std::string llvm::NVPTXAsmPrinter::getPTXFundamentalTypeStr(llvm::Type*, bool) const':
|
||||
/builddir/build/BUILD/root-6.24.06/interpreter/llvm/src/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:1319:10: error: use of deleted function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::nullptr_t = std::nullptr_t]'
|
||||
1319 | return nullptr;
|
||||
| ^~~~~~~
|
||||
In file included from /usr/include/c++/12/string:53,
|
||||
from /usr/include/c++/12/bits/locale_classes.h:40,
|
||||
from /usr/include/c++/12/bits/ios_base.h:41,
|
||||
from /usr/include/c++/12/streambuf:41,
|
||||
from /usr/include/c++/12/bits/streambuf_iterator.h:35,
|
||||
from /usr/include/c++/12/iterator:66,
|
||||
from /builddir/build/BUILD/root-6.24.06/interpreter/llvm/src/include/llvm/ADT/iterator_range.h:21,
|
||||
from /builddir/build/BUILD/root-6.24.06/interpreter/llvm/src/include/llvm/ADT/SmallVector.h:16,
|
||||
from /builddir/build/BUILD/root-6.24.06/interpreter/llvm/src/include/llvm/ADT/STLExtras.h:20,
|
||||
from /builddir/build/BUILD/root-6.24.06/interpreter/llvm/src/include/llvm/ADT/StringRef.h:12,
|
||||
from /builddir/build/BUILD/root-6.24.06/interpreter/llvm/src/include/llvm/Pass.h:31,
|
||||
from /builddir/build/BUILD/root-6.24.06/interpreter/llvm/src/lib/Target/NVPTX/NVPTX.h:17,
|
||||
from /builddir/build/BUILD/root-6.24.06/interpreter/llvm/src/lib/Target/NVPTX/NVPTXAsmPrinter.h:17,
|
||||
from /builddir/build/BUILD/root-6.24.06/interpreter/llvm/src/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:14:
|
||||
/usr/include/c++/12/bits/basic_string.h:732:7: note: declared here
|
||||
732 | basic_string(nullptr_t) = delete;
|
||||
| ^~~~~~~~~~~~
|
||||
|
||||
Fix backported from LLVM upstrea https://reviews.llvm.org/D87697
|
||||
---
|
||||
interpreter/llvm/src/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/interpreter/llvm/src/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/interpreter/llvm/src/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
|
||||
index 5f38b4a3c4..bfa74bd98f 100644
|
||||
--- a/interpreter/llvm/src/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
|
||||
+++ b/interpreter/llvm/src/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
|
||||
@@ -1281,9 +1281,6 @@ void NVPTXAsmPrinter::emitPTXAddressSpace(unsigned int AddressSpace,
|
||||
std::string
|
||||
NVPTXAsmPrinter::getPTXFundamentalTypeStr(Type *Ty, bool useB4PTR) const {
|
||||
switch (Ty->getTypeID()) {
|
||||
- default:
|
||||
- llvm_unreachable("unexpected type");
|
||||
- break;
|
||||
case Type::IntegerTyID: {
|
||||
unsigned NumBits = cast<IntegerType>(Ty)->getBitWidth();
|
||||
if (NumBits == 1)
|
||||
@@ -1314,9 +1311,10 @@ NVPTXAsmPrinter::getPTXFundamentalTypeStr(Type *Ty, bool useB4PTR) const {
|
||||
return "b32";
|
||||
else
|
||||
return "u32";
|
||||
+ default:
|
||||
+ break;
|
||||
}
|
||||
llvm_unreachable("unexpected type");
|
||||
- return nullptr;
|
||||
}
|
||||
|
||||
void NVPTXAsmPrinter::emitPTXGlobalVariable(const GlobalVariable *GVar,
|
||||
--
|
||||
2.34.1
|
||||
|
||||
168
root-fix-multicore-tests-with-few-cores.patch
Normal file
168
root-fix-multicore-tests-with-few-cores.patch
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
From 153f1c3de0e24f5678fd3a706f902ac12b11048e Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Sun, 18 Apr 2021 07:28:41 +0200
|
||||
Subject: [PATCH] Fix multicore tests when running on machines with few cores
|
||||
|
||||
When running on machines with few cores, enabling multithreading can
|
||||
give you fewer cores than requested. For most of the tests this does
|
||||
not matter. However, some tests verify the number of threads used.
|
||||
This commit adapts those tests for this situation.
|
||||
---
|
||||
tree/dataframe/test/dataframe_concurrency.cxx | 18 +++++++++-------
|
||||
tree/dataframe/test/dataframe_interface.cxx | 7 +++++--
|
||||
tree/dataframe/test/dataframe_simple.cxx | 2 +-
|
||||
tree/dataframe/test/dataframe_snapshot.cxx | 6 ++++--
|
||||
.../test/treeprocmt/treeprocessormt.cxx | 21 +++++++++++++++----
|
||||
5 files changed, 37 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/tree/dataframe/test/dataframe_concurrency.cxx b/tree/dataframe/test/dataframe_concurrency.cxx
|
||||
index d1b25493e5..a4bce595f8 100644
|
||||
--- a/tree/dataframe/test/dataframe_concurrency.cxx
|
||||
+++ b/tree/dataframe/test/dataframe_concurrency.cxx
|
||||
@@ -57,33 +57,35 @@ TEST(RDFConcurrency, NestedParallelismBetweenDefineCalls)
|
||||
// [DF] Warn on mismatch between slot pool size and effective number of slots
|
||||
TEST(RDFSimpleTests, ThrowOnPoolSizeMismatch)
|
||||
{
|
||||
+ const unsigned int nslots = std::min(3u, std::thread::hardware_concurrency());
|
||||
+
|
||||
// pool created after RDF
|
||||
- {
|
||||
+ if (nslots > 1) {
|
||||
ROOT::RDataFrame df(1);
|
||||
- ROOT::EnableImplicitMT(3);
|
||||
+ ROOT::EnableImplicitMT(nslots);
|
||||
try {
|
||||
df.Count().GetValue();
|
||||
} catch (const std::runtime_error &e) {
|
||||
const auto expected_msg = "RLoopManager::Run: when the RDataFrame was constructed the number of slots required "
|
||||
- "was 1, but when starting the event loop it was 3. Maybe EnableImplicitMT() was "
|
||||
+ "was 1, but when starting the event loop it was " + std::to_string(nslots) + ". Maybe EnableImplicitMT() was "
|
||||
"called after the RDataFrame was constructed?";
|
||||
- EXPECT_STREQ(e.what(), expected_msg);
|
||||
+ EXPECT_STREQ(e.what(), expected_msg.c_str());
|
||||
}
|
||||
ROOT::DisableImplicitMT();
|
||||
}
|
||||
|
||||
// pool deleted after RDF creation
|
||||
- {
|
||||
- ROOT::EnableImplicitMT(3);
|
||||
+ if (nslots > 1) {
|
||||
+ ROOT::EnableImplicitMT(nslots);
|
||||
ROOT::RDataFrame df(1);
|
||||
ROOT::DisableImplicitMT();
|
||||
try {
|
||||
df.Count().GetValue();
|
||||
} catch (const std::runtime_error &e) {
|
||||
const auto expected_msg = "RLoopManager::Run: when the RDataFrame was constructed the number of slots required "
|
||||
- "was 3, but when starting the event loop it was 1. Maybe DisableImplicitMT() was "
|
||||
+ "was " + std::to_string(nslots) + ", but when starting the event loop it was 1. Maybe DisableImplicitMT() was "
|
||||
"called after the RDataFrame was constructed?";
|
||||
- EXPECT_STREQ(e.what(), expected_msg);
|
||||
+ EXPECT_STREQ(e.what(), expected_msg.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/tree/dataframe/test/dataframe_interface.cxx b/tree/dataframe/test/dataframe_interface.cxx
|
||||
index afdd8360ef..90e052f1a7 100644
|
||||
--- a/tree/dataframe/test/dataframe_interface.cxx
|
||||
+++ b/tree/dataframe/test/dataframe_interface.cxx
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#include <thread>
|
||||
+
|
||||
using namespace ROOT;
|
||||
using namespace ROOT::RDF;
|
||||
|
||||
@@ -351,9 +353,10 @@ TEST(RDataFrameInterface, GetNSlots)
|
||||
ROOT::RDataFrame df0(1);
|
||||
EXPECT_EQ(1U, df0.GetNSlots());
|
||||
#ifdef R__USE_IMT
|
||||
- ROOT::EnableImplicitMT(3);
|
||||
+ unsigned int nslots = std::min(3U, std::thread::hardware_concurrency());
|
||||
+ ROOT::EnableImplicitMT(nslots);
|
||||
ROOT::RDataFrame df3(1);
|
||||
- EXPECT_EQ(3U, df3.GetNSlots());
|
||||
+ EXPECT_EQ(nslots, df3.GetNSlots());
|
||||
ROOT::DisableImplicitMT();
|
||||
ROOT::RDataFrame df1(1);
|
||||
EXPECT_EQ(1U, df1.GetNSlots());
|
||||
diff --git a/tree/dataframe/test/dataframe_simple.cxx b/tree/dataframe/test/dataframe_simple.cxx
|
||||
index c6aba48b3e..e6b92be776 100644
|
||||
--- a/tree/dataframe/test/dataframe_simple.cxx
|
||||
+++ b/tree/dataframe/test/dataframe_simple.cxx
|
||||
@@ -26,7 +26,7 @@ using namespace ROOT::VecOps;
|
||||
// Fixture for all tests in this file. If parameter is true, run with implicit MT, else run sequentially
|
||||
class RDFSimpleTests : public ::testing::TestWithParam<bool> {
|
||||
protected:
|
||||
- RDFSimpleTests() : NSLOTS(GetParam() ? 4u : 1u)
|
||||
+ RDFSimpleTests() : NSLOTS(GetParam() ? std::min(4u, std::thread::hardware_concurrency()) : 1u)
|
||||
{
|
||||
if (GetParam())
|
||||
ROOT::EnableImplicitMT(NSLOTS);
|
||||
diff --git a/tree/dataframe/test/dataframe_snapshot.cxx b/tree/dataframe/test/dataframe_snapshot.cxx
|
||||
index 3ce9254442..92444feff1 100644
|
||||
--- a/tree/dataframe/test/dataframe_snapshot.cxx
|
||||
+++ b/tree/dataframe/test/dataframe_snapshot.cxx
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
+#include <thread>
|
||||
using namespace ROOT; // RDataFrame
|
||||
using namespace ROOT::RDF; // RInterface
|
||||
using namespace ROOT::VecOps; // RVec
|
||||
@@ -1041,9 +1042,10 @@ TEST(RDFSnapshotMore, EmptyBuffersMT)
|
||||
{
|
||||
const auto fname = "emptybuffersmt.root";
|
||||
const auto treename = "t";
|
||||
- ROOT::EnableImplicitMT(4);
|
||||
+ const unsigned int nslots = std::min(4U, std::thread::hardware_concurrency());
|
||||
+ ROOT::EnableImplicitMT(nslots);
|
||||
ROOT::RDataFrame d(10);
|
||||
- auto dd = d.DefineSlot("x", [](unsigned int s) { return s == 3 ? 0 : 1; })
|
||||
+ auto dd = d.DefineSlot("x", [&](unsigned int s) { return s == nslots - 1 ? 0 : 1; })
|
||||
.Filter([](int x) { return x == 0; }, {"x"}, "f");
|
||||
auto r = dd.Report();
|
||||
dd.Snapshot<int>(treename, fname, {"x"});
|
||||
diff --git a/tree/treeplayer/test/treeprocmt/treeprocessormt.cxx b/tree/treeplayer/test/treeprocmt/treeprocessormt.cxx
|
||||
index 5d5b2cbf42..963ce8a1b1 100644
|
||||
--- a/tree/treeplayer/test/treeprocmt/treeprocessormt.cxx
|
||||
+++ b/tree/treeplayer/test/treeprocmt/treeprocessormt.cxx
|
||||
@@ -294,14 +294,27 @@ TEST(TreeProcessorMT, LimitNTasks_CheckEntries)
|
||||
}
|
||||
};
|
||||
|
||||
- ROOT::EnableImplicitMT(4);
|
||||
+ const unsigned int nslots = std::min(4U, std::thread::hardware_concurrency());
|
||||
+ ROOT::EnableImplicitMT(nslots);
|
||||
|
||||
ROOT::TTreeProcessorMT p(filename, treename);
|
||||
p.Process(f);
|
||||
|
||||
- EXPECT_EQ(nTasks, 96U) << "Wrong number of tasks generated!\n";
|
||||
- EXPECT_EQ(nEntriesCountsMap[10], 65U) << "Wrong number of tasks with 10 clusters each!\n";
|
||||
- EXPECT_EQ(nEntriesCountsMap[11], 31U) << "Wrong number of tasks with 11 clusters each!\n";
|
||||
+ if (nslots == 4) {
|
||||
+ EXPECT_EQ(nTasks, 96U) << "Wrong number of tasks generated!\n";
|
||||
+ EXPECT_EQ(nEntriesCountsMap[10], 65U) << "Wrong number of tasks with 10 clusters each!\n";
|
||||
+ EXPECT_EQ(nEntriesCountsMap[11], 31U) << "Wrong number of tasks with 11 clusters each!\n";
|
||||
+ }
|
||||
+ else if (nslots == 2) {
|
||||
+ EXPECT_EQ(nTasks, 48U) << "Wrong number of tasks generated!\n";
|
||||
+ EXPECT_EQ(nEntriesCountsMap[20], 17U) << "Wrong number of tasks with 20 clusters each!\n";
|
||||
+ EXPECT_EQ(nEntriesCountsMap[21], 31U) << "Wrong number of tasks with 21 clusters each!\n";
|
||||
+ }
|
||||
+ else if (nslots == 1) {
|
||||
+ EXPECT_EQ(nTasks, 24U) << "Wrong number of tasks generated!\n";
|
||||
+ EXPECT_EQ(nEntriesCountsMap[41], 17U) << "Wrong number of tasks with 41 clusters each!\n";
|
||||
+ EXPECT_EQ(nEntriesCountsMap[42], 7U) << "Wrong number of tasks with 42 clusters each!\n";
|
||||
+ }
|
||||
|
||||
gSystem->Unlink(filename);
|
||||
ROOT::DisableImplicitMT();
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
From ddc155795baa9d4690717c204e54a7fd4600c688 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Mon, 17 Jan 2022 18:49:30 +0100
|
||||
Subject: [PATCH] Fix test failure on ppc64le and aarch64 with gcc 12
|
||||
|
||||
.../hist/hist/test/test_tprofile2poly.cxx:61: Failure
|
||||
The difference between cont1 and cont2 is 1.4551915228366852e-11, which exceeds delta, where
|
||||
cont1 evaluates to 54886.064319363642,
|
||||
cont2 evaluates to 54886.064319363628, and
|
||||
delta evaluates to 9.999999960041972e-12.
|
||||
.../hist/hist/test/test_tprofile2poly.cxx:61: Failure
|
||||
The difference between cont1 and cont2 is 1.4551915228366852e-11, where
|
||||
cont1 evaluates to 109868.61342004745,
|
||||
cont2 evaluates to 109868.61342004743.
|
||||
The abs_error parameter delta evaluates to 9.999999960041972e-12 which is smaller than the minimum distance between doubles for numbers of this magnitude which is 1.4551915228366852e-11, thus making this EXPECT_NEAR check equivalent to EXPECT_EQUAL. Consider using EXPECT_DOUBLE_EQ instead.
|
||||
---
|
||||
hist/hist/test/test_tprofile2poly.cxx | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hist/hist/test/test_tprofile2poly.cxx b/hist/hist/test/test_tprofile2poly.cxx
|
||||
index 40cb3052a2..5150da0bea 100644
|
||||
--- a/hist/hist/test/test_tprofile2poly.cxx
|
||||
+++ b/hist/hist/test/test_tprofile2poly.cxx
|
||||
@@ -58,14 +58,14 @@ void binEntriesCompare(TProfile2D* tp2d, TProfile2Poly* tpp) {
|
||||
for(Double_t x=0.5; x<10; x+=2.0) {
|
||||
cont1 = tp2d->GetBinEffectiveEntries(tp2d->FindBin(x,y));
|
||||
cont2 = tpp->GetBinEffectiveEntries(tpp->FindBin(x,y));
|
||||
- ASSERT_NEAR(cont1, cont2, delta);
|
||||
+ ASSERT_NEAR(cont1, cont2, 2*delta);
|
||||
}
|
||||
|
||||
}
|
||||
// test overflow
|
||||
cont1 = tp2d->GetBinEffectiveEntries(tp2d->FindBin(11,11));
|
||||
cont2 = tpp->GetBinEffectiveEntries(tpp->FindBin(11,11));
|
||||
- ASSERT_NEAR(cont1, cont2, delta);
|
||||
+ ASSERT_NEAR(cont1, cont2, 2*delta);
|
||||
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,32 +0,0 @@
|
|||
From 7b1632f5602a1bb6e6278d66c25640349c852ab1 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Fri, 9 Jan 2026 00:32:27 +0100
|
||||
Subject: [PATCH] Starting with gcc 16, libstdc++ links to libatomic. Add to
|
||||
whitelist.
|
||||
|
||||
$ ldd /lib64/libstdc++.so.6
|
||||
linux-vdso.so.1 (0x00007f3cb4c13000)
|
||||
libm.so.6 => /lib64/libm.so.6 (0x00007f3cb4afc000)
|
||||
libatomic.so.1 => /lib64/libatomic.so.1 (0x00007f3cb4af1000)
|
||||
libc.so.6 => /lib64/libc.so.6 (0x00007f3cb460d000)
|
||||
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3cb4ac5000)
|
||||
/lib64/ld-linux-x86-64.so.2 (0x00007f3cb4c15000)
|
||||
---
|
||||
bindings/pyroot/pythonizations/test/import_load_libs.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/bindings/pyroot/pythonizations/test/import_load_libs.py b/bindings/pyroot/pythonizations/test/import_load_libs.py
|
||||
index 63feeca89ba..18906ff921e 100644
|
||||
--- a/bindings/pyroot/pythonizations/test/import_load_libs.py
|
||||
+++ b/bindings/pyroot/pythonizations/test/import_load_libs.py
|
||||
@@ -77,6 +77,7 @@ class ImportLoadLibs(unittest.TestCase):
|
||||
"ld.*",
|
||||
"libffi",
|
||||
"libgcc_s",
|
||||
+ "libatomic",
|
||||
# AddressSanitizer runtime and ROOT configuration
|
||||
"libclang_rt.asan-.*",
|
||||
"libROOTSanitizerConfig",
|
||||
--
|
||||
2.52.0
|
||||
|
||||
245
root-get-rid-of-lsb_release.patch
Normal file
245
root-get-rid-of-lsb_release.patch
Normal file
|
|
@ -0,0 +1,245 @@
|
|||
From 2dde3d060aa21ff9d4a0612b991bd300b7704bdc Mon Sep 17 00:00:00 2001
|
||||
From: Axel Naumann <Axel.Naumann@cern.ch>
|
||||
Date: Fri, 22 Jul 2022 15:54:03 +0200
|
||||
Subject: [PATCH] [cmake,test] Get rid of `lsb_release`:
|
||||
|
||||
It is available less and less often, and we do not actually
|
||||
benefit a lot from printing the distro (stress) or we can get
|
||||
the same info from /etc/os-release (cmake).
|
||||
---
|
||||
cmake/modules/RootCPack.cmake | 11 +++++++++--
|
||||
math/mathcore/test/stressGoFTest.cxx | 4 ----
|
||||
test/bench.cxx | 4 ----
|
||||
test/stress.cxx | 4 ----
|
||||
test/stressFit.cxx | 4 ----
|
||||
test/stressGUI.cxx | 4 ----
|
||||
test/stressGeometry.cxx | 4 ----
|
||||
test/stressGraphics.cxx | 4 ----
|
||||
test/stressHepix.cxx | 4 ----
|
||||
test/stressHistFactory.cxx | 4 ----
|
||||
test/stressLinear.cxx | 4 ----
|
||||
test/stressRooFit.cxx | 4 ----
|
||||
test/stressRooStats.cxx | 4 ----
|
||||
test/stressTMVA.cxx | 4 ----
|
||||
14 files changed, 9 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/cmake/modules/RootCPack.cmake b/cmake/modules/RootCPack.cmake
|
||||
index a960eb81fd..807eac6ef2 100644
|
||||
--- a/cmake/modules/RootCPack.cmake
|
||||
+++ b/cmake/modules/RootCPack.cmake
|
||||
@@ -107,8 +107,15 @@ elseif(WIN32)
|
||||
set(OS_NAME_VERSION win32)
|
||||
endif()
|
||||
else()
|
||||
- execute_process(COMMAND lsb_release -is OUTPUT_VARIABLE osid OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
- execute_process(COMMAND lsb_release -rs OUTPUT_VARIABLE osvers OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+ if(EXISTS "/etc/os-release")
|
||||
+ file(STRINGS /etc/os-release osid REGEX "^NAME=")
|
||||
+ string(REGEX REPLACE "NAME=\"(.*)\"" "\\1" osid "${osid}")
|
||||
+ file(STRINGS /etc/os-release osvers REGEX "^VERSION_ID=")
|
||||
+ string(REGEX REPLACE "NAME=\"(.*)\"" "\\1" osvers "${osvers}")
|
||||
+ else()
|
||||
+ execute_process(COMMAND lsb_release -is OUTPUT_VARIABLE osid OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+ execute_process(COMMAND lsb_release -rs OUTPUT_VARIABLE osvers OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+ endif()
|
||||
if(osid MATCHES Ubuntu)
|
||||
string(REGEX REPLACE "([0-9]+)[.].*" "\\1" osvers "${osvers}")
|
||||
set(OS_NAME_VERSION Linux-ubuntu${osvers}-${arch})
|
||||
diff --git a/math/mathcore/test/stressGoFTest.cxx b/math/mathcore/test/stressGoFTest.cxx
|
||||
index a78ca99c90..5aa1b4ef70 100644
|
||||
--- a/math/mathcore/test/stressGoFTest.cxx
|
||||
+++ b/math/mathcore/test/stressGoFTest.cxx
|
||||
@@ -56,10 +56,6 @@ struct GoFTStress {
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/bench.cxx b/test/bench.cxx
|
||||
index 82bc537e05..e89024e9d9 100644
|
||||
--- a/test/bench.cxx
|
||||
+++ b/test/bench.cxx
|
||||
@@ -295,10 +295,6 @@ int main(int argc, char **argv)
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stress.cxx b/test/stress.cxx
|
||||
index d3087fdd56..29dba1625d 100644
|
||||
--- a/test/stress.cxx
|
||||
+++ b/test/stress.cxx
|
||||
@@ -200,10 +200,6 @@ void stress(Int_t nevent, Int_t style = 1,
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stressFit.cxx b/test/stressFit.cxx
|
||||
index 667142eff9..80bbd0200f 100644
|
||||
--- a/test/stressFit.cxx
|
||||
+++ b/test/stressFit.cxx
|
||||
@@ -646,10 +646,6 @@ Int_t stressFit(const char *type, const char *algo, Int_t N)
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stressGUI.cxx b/test/stressGUI.cxx
|
||||
index 1a92df5341..9daae5f5fe 100644
|
||||
--- a/test/stressGUI.cxx
|
||||
+++ b/test/stressGUI.cxx
|
||||
@@ -307,10 +307,6 @@ void stressGUI()
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stressGeometry.cxx b/test/stressGeometry.cxx
|
||||
index 5e81f5f2ca..2dc366cbf8 100644
|
||||
--- a/test/stressGeometry.cxx
|
||||
+++ b/test/stressGeometry.cxx
|
||||
@@ -295,10 +295,6 @@ void stressGeometry(const char *exp="*", Bool_t generate_ref=kFALSE, Bool_t vecg
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stressGraphics.cxx b/test/stressGraphics.cxx
|
||||
index 5fe958774d..8b6aa9af9a 100644
|
||||
--- a/test/stressGraphics.cxx
|
||||
+++ b/test/stressGraphics.cxx
|
||||
@@ -419,10 +419,6 @@ void stressGraphics(Int_t verbose = 0)
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stressHepix.cxx b/test/stressHepix.cxx
|
||||
index d8d2a65a64..01dfc67a54 100644
|
||||
--- a/test/stressHepix.cxx
|
||||
+++ b/test/stressHepix.cxx
|
||||
@@ -143,10 +143,6 @@ int main(int argc, char **argv)
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stressHistFactory.cxx b/test/stressHistFactory.cxx
|
||||
index b84fa70f86..ec6deac031 100644
|
||||
--- a/test/stressHistFactory.cxx
|
||||
+++ b/test/stressHistFactory.cxx
|
||||
@@ -139,10 +139,6 @@ Int_t stressHistFactory(const char* refFile, Bool_t writeRef, Int_t verbose, Boo
|
||||
if (UNIX) {
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
cout << "* SYS: " << sp << endl;
|
||||
- if (strstr(gSystem->GetBuildNode(), "Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- cout << "* SYS: " << sp << endl;
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(), "Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stressLinear.cxx b/test/stressLinear.cxx
|
||||
index ce2e1af23d..e34ddf85a2 100644
|
||||
--- a/test/stressLinear.cxx
|
||||
+++ b/test/stressLinear.cxx
|
||||
@@ -296,10 +296,6 @@ void stressLinear(Int_t maxSizeReq,Int_t verbose)
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stressRooFit.cxx b/test/stressRooFit.cxx
|
||||
index 18e214ec0c..4f7c5a3d83 100644
|
||||
--- a/test/stressRooFit.cxx
|
||||
+++ b/test/stressRooFit.cxx
|
||||
@@ -197,10 +197,6 @@ Int_t stressRooFit(const char* refFile, Bool_t writeRef, Int_t doVerbose, Int_t
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stressRooStats.cxx b/test/stressRooStats.cxx
|
||||
index 35598b5919..adb3dc4cd8 100644
|
||||
--- a/test/stressRooStats.cxx
|
||||
+++ b/test/stressRooStats.cxx
|
||||
@@ -232,10 +232,6 @@ Int_t stressRooStats(const char* refFile, Bool_t writeRef, Int_t verbose, Bool_t
|
||||
if (UNIX) {
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
cout << "* SYS: " << sp << endl;
|
||||
- if (strstr(gSystem->GetBuildNode(), "Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- cout << "* SYS: " << sp << endl;
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(), "Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
diff --git a/test/stressTMVA.cxx b/test/stressTMVA.cxx
|
||||
index f7638a73f6..22e3feaf65 100644
|
||||
--- a/test/stressTMVA.cxx
|
||||
+++ b/test/stressTMVA.cxx
|
||||
@@ -3193,10 +3193,6 @@ int main(int argc, char **argv)
|
||||
TString sp = gSystem->GetFromPipe("uname -a");
|
||||
sp.Resize(60);
|
||||
printf("* SYS: %s\n",sp.Data());
|
||||
- if (strstr(gSystem->GetBuildNode(),"Linux")) {
|
||||
- sp = gSystem->GetFromPipe("lsb_release -d -s");
|
||||
- printf("* SYS: %s\n",sp.Data());
|
||||
- }
|
||||
if (strstr(gSystem->GetBuildNode(),"Darwin")) {
|
||||
sp = gSystem->GetFromPipe("sw_vers -productVersion");
|
||||
sp += " Mac OS X ";
|
||||
--
|
||||
2.37.1
|
||||
|
||||
36
root-jsmva-static.patch
Normal file
36
root-jsmva-static.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
diff -ur root-6.24.02.orig/bindings/jsmva/python/JsMVA/JPyInterface.py root-6.24.02/bindings/jsmva/python/JsMVA/JPyInterface.py
|
||||
--- root-6.24.02.orig/bindings/jsmva/python/JsMVA/JPyInterface.py 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/bindings/jsmva/python/JsMVA/JPyInterface.py 2021-08-11 09:06:21.894746090 +0200
|
||||
@@ -188,7 +188,7 @@
|
||||
## Class for creating the output scripts and inserting them to cell output
|
||||
class JsDraw:
|
||||
## Base repository
|
||||
- __jsMVARepo = "https://root.cern.ch/js/jsmva/latest"
|
||||
+ __jsMVARepo = "/static/JsMVA"
|
||||
|
||||
## String containing the link to JavaScript files
|
||||
__jsMVASourceDir = __jsMVARepo + "/js"
|
||||
diff -ur root-6.24.02.orig/bindings/pyroot_legacy/JsMVA/JPyInterface.py root-6.24.02/bindings/pyroot_legacy/JsMVA/JPyInterface.py
|
||||
--- root-6.24.02.orig/bindings/pyroot_legacy/JsMVA/JPyInterface.py 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/bindings/pyroot_legacy/JsMVA/JPyInterface.py 2021-08-11 09:06:21.925746168 +0200
|
||||
@@ -188,7 +188,7 @@
|
||||
## Class for creating the output scripts and inserting them to cell output
|
||||
class JsDraw:
|
||||
## Base repository
|
||||
- __jsMVARepo = "https://root.cern.ch/js/jsmva/latest"
|
||||
+ __jsMVARepo = "/static/JsMVA"
|
||||
|
||||
## String containing the link to JavaScript files
|
||||
__jsMVASourceDir = __jsMVARepo + "/js"
|
||||
diff -ur root-6.24.02.orig/etc/notebook/JsMVA/js/JsMVA.js root-6.24.02/etc/notebook/JsMVA/js/JsMVA.js
|
||||
--- root-6.24.02.orig/etc/notebook/JsMVA/js/JsMVA.js 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/etc/notebook/JsMVA/js/JsMVA.js 2021-08-11 09:10:45.638410266 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
(function(factory){
|
||||
|
||||
- var JSROOT_source_dir = "https://root.cern.ch/js/notebook/scripts/";
|
||||
+ var JSROOT_source_dir = "/static/scripts/";
|
||||
|
||||
var url = "";
|
||||
if (requirejs.s.contexts.hasOwnProperty("_")) {
|
||||
42
root-longlong.patch
Normal file
42
root-longlong.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
From 2aa02353663674a338c92fa4e72a0c0e529c410e Mon Sep 17 00:00:00 2001
|
||||
From: Enrico Guiraud <enrico.guiraud@cern.ch>
|
||||
Date: Fri, 8 Apr 2022 17:52:18 +0200
|
||||
Subject: [PATCH] [DF] Fix long int + Snapshot test on 32 bit platforms
|
||||
|
||||
Co-authored-by: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
---
|
||||
tree/dataframe/test/dataframe_snapshot.cxx | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tree/dataframe/test/dataframe_snapshot.cxx b/tree/dataframe/test/dataframe_snapshot.cxx
|
||||
index f41848e96a..ddbacaba0f 100644
|
||||
--- a/tree/dataframe/test/dataframe_snapshot.cxx
|
||||
+++ b/tree/dataframe/test/dataframe_snapshot.cxx
|
||||
@@ -495,11 +495,14 @@ void ReadWriteCarray(const char *outFileNameBase)
|
||||
t.Branch("vb", vb, "vb[size]/O");
|
||||
t.Branch("vl", vl, "vl[size]/G");
|
||||
|
||||
+ // use 2**33 as a larger-than-int value on 64 bits, otherwise just something larger than short (2**30)
|
||||
+ static constexpr long int longintTestValue = sizeof(long int) == 8 ? 8589934592 : 1073741824;
|
||||
+
|
||||
// Size 1
|
||||
size = 1;
|
||||
v[0] = 12;
|
||||
vb[0] = true;
|
||||
- vl[0] = 8589934592; // 2**33
|
||||
+ vl[0] = longintTestValue;
|
||||
t.Fill();
|
||||
|
||||
// Size 0 (see ROOT-9860)
|
||||
@@ -546,7 +549,7 @@ void ReadWriteCarray(const char *outFileNameBase)
|
||||
EXPECT_EQ(rvb.GetSize(), 1u);
|
||||
EXPECT_TRUE(rvb[0]);
|
||||
EXPECT_EQ(rvl.GetSize(), 1u);
|
||||
- EXPECT_EQ(rvl[0], 8589934592);
|
||||
+ EXPECT_EQ(rvl[0], longintTestValue);
|
||||
|
||||
// Size 0
|
||||
EXPECT_TRUE(r.Next());
|
||||
--
|
||||
2.35.1
|
||||
|
||||
17
root-make-DistRDF-optional.patch
Normal file
17
root-make-DistRDF-optional.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
--- root-6.24.08/bindings/pyroot/pythonizations/python/ROOT/_facade.py.orig 2022-09-29 15:03:06.000000000 +0200
|
||||
+++ root-6.24.08/bindings/pyroot/pythonizations/python/ROOT/_facade.py 2023-03-19 09:40:08.823564686 +0100
|
||||
@@ -290,8 +290,12 @@
|
||||
from libROOTPythonizations import MakeNumpyDataFrame
|
||||
ns.MakeNumpyDataFrame = MakeNumpyDataFrame
|
||||
|
||||
- # Inject Experimental.Distributed package into namespace RDF
|
||||
- ns.Experimental = _create_rdf_experimental_distributed_module(ns)
|
||||
+ try:
|
||||
+ # Inject Experimental.Distributed package into namespace RDF if available
|
||||
+ ns.Experimental = _create_rdf_experimental_distributed_module(ns)
|
||||
+ except ImportError:
|
||||
+ pass
|
||||
+
|
||||
except:
|
||||
raise Exception('Failed to pythonize the namespace RDF')
|
||||
del type(self).RDF
|
||||
43
root-memory-usage.patch
Normal file
43
root-memory-usage.patch
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
From 21395b23947df7e2b5e0c93626453aeacdee026c Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Tue, 16 Jan 2018 10:25:50 +0100
|
||||
Subject: [PATCH] Reduce the needed memory for compilation
|
||||
|
||||
The linking of rootcling_stage1 and libCling requires a lot of memory.
|
||||
Since these are linked from mostly the same objects, the build is
|
||||
ready to link them at the same time. If you make a parallel build this
|
||||
means that the two targets that require the most amount of memory are
|
||||
being linked in parallel. This exhausts the available memory, and the
|
||||
computer starts swapping.
|
||||
|
||||
This commit adds a dependency of one of the targets to the other. The
|
||||
dependency is not really there since it is not needed for building,
|
||||
but it prevents the two memory consuming targets to be built in
|
||||
parallel.
|
||||
|
||||
A similar dependency existed before the latest code changes (see
|
||||
commit 2638f6fc7f54b0995f2f9d60363daaf8aae2386e), then between
|
||||
rootcling and libCling.
|
||||
---
|
||||
core/metacling/src/CMakeLists.txt | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/core/metacling/src/CMakeLists.txt b/core/metacling/src/CMakeLists.txt
|
||||
index 2923345f7c..b44a4d4115 100644
|
||||
--- a/core/metacling/src/CMakeLists.txt
|
||||
+++ b/core/metacling/src/CMakeLists.txt
|
||||
@@ -114,6 +114,11 @@ ROOT_LINKER_LIBRARY(Cling
|
||||
$<TARGET_OBJECTS:MetaCling>
|
||||
LIBRARIES ${CLING_LIBRARIES} ${LINK_LIBS} ${CLING_PLUGIN_LINK_LIBS})
|
||||
|
||||
+# The dependency on rootcling_stage1 was added to prevent Cling (libCling) and
|
||||
+# rootcling_stage1 from being linked in parallel.
|
||||
+# This avoids doing two memory consuming operations in parallel.
|
||||
+add_dependencies(Cling rootcling_stage1)
|
||||
+
|
||||
if(MSVC)
|
||||
set_target_properties(Cling PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
||||
set(cling_exports
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,53 +1,30 @@
|
|||
From b4e57c8ccd59d69fe61fa5f6470b3a99ba52aeeb Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Thu, 4 Dec 2025 23:13:28 +0100
|
||||
Subject: [PATCH] Dont export Python modules
|
||||
|
||||
---
|
||||
bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt | 3 +--
|
||||
bindings/pyroot/pythonizations/CMakeLists.txt | 8 +-------
|
||||
2 files changed, 2 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
|
||||
index bb48c032974..c34069855b2 100644
|
||||
--- a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
|
||||
+++ b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
|
||||
@@ -119,8 +119,7 @@ install(TARGETS CPyCppyy EXPORT ${CMAKE_PROJECT_NAME}Exports
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
diff -ur root-6.24.02.orig/bindings/jupyroot/CMakeLists.txt root-6.24.02/bindings/jupyroot/CMakeLists.txt
|
||||
--- root-6.24.02.orig/bindings/jupyroot/CMakeLists.txt 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/bindings/jupyroot/CMakeLists.txt 2021-08-11 10:53:03.272202496 +0200
|
||||
@@ -70,8 +70,7 @@
|
||||
endforeach()
|
||||
|
||||
-install(TARGETS cppyy EXPORT ${CMAKE_PROJECT_NAME}Exports
|
||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/cppyy COMPONENT libraries # Windows
|
||||
+install(TARGETS cppyy RUNTIME DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/cppyy COMPONENT libraries # Windows
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/cppyy COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/cppyy COMPONENT libraries)
|
||||
# Install library
|
||||
- install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
|
||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
+ install(TARGETS ${libname} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries)
|
||||
|
||||
diff --git a/bindings/pyroot/pythonizations/CMakeLists.txt b/bindings/pyroot/pythonizations/CMakeLists.txt
|
||||
index 1230f18ca47..2df4b733320 100644
|
||||
--- a/bindings/pyroot/pythonizations/CMakeLists.txt
|
||||
+++ b/bindings/pyroot/pythonizations/CMakeLists.txt
|
||||
@@ -202,11 +202,6 @@ foreach(py_source ${py_sources})
|
||||
COMMENT "Compiling PyROOT source ${py_source} for Python ${Python3_VERSION}")
|
||||
endforeach()
|
||||
diff -ur root-6.24.02.orig/bindings/pyroot/pythonizations/CMakeLists.txt root-6.24.02/bindings/pyroot/pythonizations/CMakeLists.txt
|
||||
--- root-6.24.02.orig/bindings/pyroot/pythonizations/CMakeLists.txt 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/bindings/pyroot/pythonizations/CMakeLists.txt 2021-08-11 10:53:03.272202496 +0200
|
||||
@@ -137,11 +137,10 @@
|
||||
# Create meta-target PyROOT2 and PyROOT3 (INTERFACE library)
|
||||
# Export of targets are not supported for custom targets(add_custom_targets())
|
||||
add_library(PyROOT${python_major_version_string} INTERFACE)
|
||||
- target_link_libraries(PyROOT${python_major_version_string} INTERFACE cppyy_backend${python_under_version_string} cppyy${python_under_version_string} ROOTPythonizations${python_under_version_string})
|
||||
+ target_link_libraries(PyROOT${python_major_version_string} INTERFACE cppyy_backend${python_under_version_string} cppyy${python_under_version_string})
|
||||
|
||||
-# Create meta-target PyROOT3 (INTERFACE library)
|
||||
-# Export of targets are not supported for custom targets(add_custom_targets())
|
||||
-add_library(PyROOT INTERFACE)
|
||||
-target_link_libraries(PyROOT INTERFACE cppyy_backend cppyy ROOTPythonizations)
|
||||
-
|
||||
# Define library output directories for build and install trees
|
||||
set(pymoduledir_build "${localruntimedir}/ROOT")
|
||||
set(pymoduledir_install "${CMAKE_INSTALL_PYTHONDIR}/ROOT")
|
||||
@@ -231,8 +226,7 @@ if(NOT MSVC)
|
||||
endif()
|
||||
# Install library
|
||||
- install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
|
||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
+ install(TARGETS ${libname} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries)
|
||||
|
||||
# Install library
|
||||
-install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
|
||||
- RUNTIME DESTINATION ${pymoduledir_install} COMPONENT libraries
|
||||
+install(TARGETS ${libname} RUNTIME DESTINATION ${pymoduledir_install} COMPONENT libraries
|
||||
LIBRARY DESTINATION ${pymoduledir_install} COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${pymoduledir_install} COMPONENT libraries)
|
||||
|
||||
--
|
||||
2.52.0
|
||||
|
||||
|
|
|
|||
215
root-old-gtest-compat.patch
Normal file
215
root-old-gtest-compat.patch
Normal file
|
|
@ -0,0 +1,215 @@
|
|||
diff -ur root-6.24.02.orig/hist/hist/test/test_THBinIterator.cxx root-6.24.02/hist/hist/test/test_THBinIterator.cxx
|
||||
--- root-6.24.02.orig/hist/hist/test/test_THBinIterator.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/hist/hist/test/test_THBinIterator.cxx 2021-08-06 22:59:45.039518775 +0200
|
||||
@@ -1,5 +1,10 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#ifndef INSTANTIATE_TEST_SUITE_P
|
||||
+#define SetUpTestSuite SetUpTestCase
|
||||
+#define TearDownTestSuite TearDownTestCase
|
||||
+#endif
|
||||
+
|
||||
// test iterating histogram bins and using the new THistRange and
|
||||
// THBinIterator classes
|
||||
|
||||
diff -ur root-6.24.02.orig/math/mathcore/test/stress/testGenVector.cxx root-6.24.02/math/mathcore/test/stress/testGenVector.cxx
|
||||
--- root-6.24.02.orig/math/mathcore/test/stress/testGenVector.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/math/mathcore/test/stress/testGenVector.cxx 2021-08-06 09:31:38.795835283 +0200
|
||||
@@ -4,6 +4,16 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#ifndef TYPED_TEST_SUITE_P
|
||||
+#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef REGISTER_TYPED_TEST_SUITE_P
|
||||
+#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
|
||||
+#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+
|
||||
#include "StatFunction.h"
|
||||
#include "TestHelper.h"
|
||||
#include "VectorTest.h"
|
||||
diff -ur root-6.24.02.orig/math/mathcore/test/stress/testSMatrix.cxx root-6.24.02/math/mathcore/test/stress/testSMatrix.cxx
|
||||
--- root-6.24.02.orig/math/mathcore/test/stress/testSMatrix.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/math/mathcore/test/stress/testSMatrix.cxx 2021-08-06 09:31:38.796835286 +0200
|
||||
@@ -7,6 +7,16 @@
|
||||
#include "TestHelper.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#ifndef TYPED_TEST_SUITE_P
|
||||
+#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef REGISTER_TYPED_TEST_SUITE_P
|
||||
+#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
|
||||
+#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+
|
||||
#include "VectorTest.h"
|
||||
#include "TROOT.h"
|
||||
#include "TSystem.h"
|
||||
diff -ur root-6.24.02.orig/math/mathcore/test/stress/testVector34.cxx root-6.24.02/math/mathcore/test/stress/testVector34.cxx
|
||||
--- root-6.24.02.orig/math/mathcore/test/stress/testVector34.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/math/mathcore/test/stress/testVector34.cxx 2021-08-06 09:31:38.796835286 +0200
|
||||
@@ -4,6 +4,16 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#ifndef TYPED_TEST_SUITE_P
|
||||
+#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef REGISTER_TYPED_TEST_SUITE_P
|
||||
+#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
|
||||
+#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+
|
||||
#include "StatFunction.h"
|
||||
#include "VectorTest.h"
|
||||
|
||||
diff -ur root-6.24.02.orig/math/mathcore/test/stress/testVector.cxx root-6.24.02/math/mathcore/test/stress/testVector.cxx
|
||||
--- root-6.24.02.orig/math/mathcore/test/stress/testVector.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/math/mathcore/test/stress/testVector.cxx 2021-08-06 09:31:38.796835286 +0200
|
||||
@@ -4,6 +4,16 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#ifndef TYPED_TEST_SUITE_P
|
||||
+#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef REGISTER_TYPED_TEST_SUITE_P
|
||||
+#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
|
||||
+#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+
|
||||
#include "StatFunction.h"
|
||||
#include "TestHelper.h"
|
||||
#include "VectorTest.h"
|
||||
diff -ur root-6.24.02.orig/math/mathcore/test/testGradient.cxx root-6.24.02/math/mathcore/test/testGradient.cxx
|
||||
--- root-6.24.02.orig/math/mathcore/test/testGradient.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/math/mathcore/test/testGradient.cxx 2021-08-06 09:31:38.796835286 +0200
|
||||
@@ -22,6 +22,10 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#ifndef TYPED_TEST_SUITE
|
||||
+#define TYPED_TEST_SUITE TYPED_TEST_CASE
|
||||
+#endif
|
||||
+
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
diff -ur root-6.24.02.orig/math/mathcore/test/testGradientFitting.cxx root-6.24.02/math/mathcore/test/testGradientFitting.cxx
|
||||
--- root-6.24.02.orig/math/mathcore/test/testGradientFitting.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/math/mathcore/test/testGradientFitting.cxx 2021-08-06 09:31:38.797835288 +0200
|
||||
@@ -12,6 +12,16 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#ifndef TYPED_TEST_SUITE_P
|
||||
+#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef REGISTER_TYPED_TEST_SUITE_P
|
||||
+#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
|
||||
+#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
diff -ur root-6.24.02.orig/math/mathmore/test/testStress.cxx root-6.24.02/math/mathmore/test/testStress.cxx
|
||||
--- root-6.24.02.orig/math/mathmore/test/testStress.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/math/mathmore/test/testStress.cxx 2021-08-06 09:31:38.797835288 +0200
|
||||
@@ -26,6 +26,16 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#ifndef TYPED_TEST_SUITE_P
|
||||
+#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef REGISTER_TYPED_TEST_SUITE_P
|
||||
+#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
|
||||
+#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
|
||||
+#endif
|
||||
+
|
||||
using ::testing::TestWithParam;
|
||||
using ::testing::Values;
|
||||
|
||||
diff -ur root-6.24.02.orig/roofit/roofitcore/test/testProxiesAndCategories.cxx root-6.24.02/roofit/roofitcore/test/testProxiesAndCategories.cxx
|
||||
--- root-6.24.02.orig/roofit/roofitcore/test/testProxiesAndCategories.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/roofit/roofitcore/test/testProxiesAndCategories.cxx 2021-08-06 09:31:38.798835290 +0200
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#ifndef INSTANTIATE_TEST_SUITE_P
|
||||
+#define INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_CASE_P
|
||||
+#endif
|
||||
|
||||
TEST(RooCategory, CategoryDefineMultiState) {
|
||||
RooCategory myCat("myCat", "A category", { {"0Lep", 0}, {"1Lep", 1}, {"2Lep", 2}, {"3Lep", 3} });
|
||||
diff -ur root-6.24.02.orig/tree/dataframe/test/dataframe_datablockcallback.cxx root-6.24.02/tree/dataframe/test/dataframe_datablockcallback.cxx
|
||||
--- root-6.24.02.orig/tree/dataframe/test/dataframe_datablockcallback.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/tree/dataframe/test/dataframe_datablockcallback.cxx 2021-08-06 09:31:38.801835298 +0200
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
+#ifndef INSTANTIATE_TEST_SUITE_P
|
||||
+#define INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_CASE_P
|
||||
+#endif
|
||||
+
|
||||
#include <algorithm> // std::min
|
||||
#include <thread> // std::hardware_concurrency
|
||||
|
||||
diff -ur root-6.24.02.orig/tree/dataframe/test/dataframe_merge_results.cxx root-6.24.02/tree/dataframe/test/dataframe_merge_results.cxx
|
||||
--- root-6.24.02.orig/tree/dataframe/test/dataframe_merge_results.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/tree/dataframe/test/dataframe_merge_results.cxx 2021-08-06 09:31:38.802835300 +0200
|
||||
@@ -308,7 +308,7 @@
|
||||
EXPECT_FALSE(mh3);
|
||||
EXPECT_FALSE(mh4);
|
||||
EXPECT_FALSE(mh5);
|
||||
- EXPECT_TRUE(mergedptr);
|
||||
+ EXPECT_TRUE(!!mergedptr);
|
||||
|
||||
const auto &mh = mergedptr->GetValue();
|
||||
|
||||
diff -ur root-6.24.02.orig/tree/dataframe/test/dataframe_regression.cxx root-6.24.02/tree/dataframe/test/dataframe_regression.cxx
|
||||
--- root-6.24.02.orig/tree/dataframe/test/dataframe_regression.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/tree/dataframe/test/dataframe_regression.cxx 2021-08-06 09:31:38.802835300 +0200
|
||||
@@ -9,6 +9,10 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
+#ifndef INSTANTIATE_TEST_SUITE_P
|
||||
+#define INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_CASE_P
|
||||
+#endif
|
||||
+
|
||||
// Fixture for all tests in this file. If parameter is true, run with implicit MT, else run sequentially
|
||||
class RDFRegressionTests : public ::testing::TestWithParam<bool> {
|
||||
protected:
|
||||
diff -ur root-6.24.02.orig/tree/dataframe/test/dataframe_simple.cxx root-6.24.02/tree/dataframe/test/dataframe_simple.cxx
|
||||
--- root-6.24.02.orig/tree/dataframe/test/dataframe_simple.cxx 2021-06-28 11:17:14.000000000 +0200
|
||||
+++ root-6.24.02/tree/dataframe/test/dataframe_simple.cxx 2021-08-06 09:31:38.803835303 +0200
|
||||
@@ -1,5 +1,10 @@
|
||||
/****** Run RDataFrame tests both with and without IMT enabled *******/
|
||||
#include <gtest/gtest.h>
|
||||
+
|
||||
+#ifndef INSTANTIATE_TEST_SUITE_P
|
||||
+#define INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_CASE_P
|
||||
+#endif
|
||||
+
|
||||
#include <ROOTUnitTestSupport.h>
|
||||
#include <ROOT/RDataFrame.hxx>
|
||||
#include <ROOT/TSeq.hxx>
|
||||
46
root-older-python.patch
Normal file
46
root-older-python.patch
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
From 61116151cce8fe5b397555a65f7b55001b8e416b Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Fri, 23 Apr 2021 21:39:17 +0200
|
||||
Subject: [PATCH] Compat with no f-strings
|
||||
|
||||
---
|
||||
tutorials/tmva/PyTorch_Generate_CNN_Model.py | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tutorials/tmva/PyTorch_Generate_CNN_Model.py b/tutorials/tmva/PyTorch_Generate_CNN_Model.py
|
||||
index 7024112f03..5a314f86dd 100644
|
||||
--- a/tutorials/tmva/PyTorch_Generate_CNN_Model.py
|
||||
+++ b/tutorials/tmva/PyTorch_Generate_CNN_Model.py
|
||||
@@ -56,7 +56,7 @@ def fit(model, train_loader, val_loader, num_epochs, batch_size, optimizer, crit
|
||||
# print train statistics
|
||||
running_train_loss += train_loss.item()
|
||||
if i % 4 == 3: # print every 4 mini-batches
|
||||
- print(f"[{epoch+1}, {i+1}] train loss: {running_train_loss / 4 :.3f}")
|
||||
+ print("[{}, {}] train loss: {:.3f}".format(epoch+1, i+1, running_train_loss / 4))
|
||||
running_train_loss = 0.0
|
||||
|
||||
if schedule:
|
||||
@@ -75,15 +75,15 @@ def fit(model, train_loader, val_loader, num_epochs, batch_size, optimizer, crit
|
||||
|
||||
curr_val = running_val_loss / len(val_loader)
|
||||
if save_best:
|
||||
- if best_val==None:
|
||||
- best_val = curr_val
|
||||
- best_val = save_best(model, curr_val, best_val)
|
||||
+ if best_val is None:
|
||||
+ best_val = curr_val
|
||||
+ best_val = save_best(model, curr_val, best_val)
|
||||
|
||||
# print val statistics per epoch
|
||||
- print(f"[{epoch+1}] val loss: {curr_val :.3f}")
|
||||
+ print("[{}] val loss: {:.3f}".format(epoch+1, curr_val))
|
||||
running_val_loss = 0.0
|
||||
|
||||
- print(f"Finished Training on {epoch+1} Epochs!")
|
||||
+ print("Finished Training on {} Epochs!".format(epoch+1))
|
||||
|
||||
return model
|
||||
|
||||
--
|
||||
2.30.2
|
||||
|
||||
63
root-protect-against-empty-COMPILE_DEFINITIONS.patch
Normal file
63
root-protect-against-empty-COMPILE_DEFINITIONS.patch
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
From 08ab7e03061e551647d707637957252d121f9c39 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Rembser <jonas.rembser@cern.ch>
|
||||
Date: Tue, 21 Sep 2021 15:15:17 +0200
|
||||
Subject: [PATCH] [cmake] Protect against empty `COMPILE_DEFINITIONS` in
|
||||
rootcint command
|
||||
|
||||
In the `rootcint` command defined in `RootMacros.cmake`, the
|
||||
`COMPILE_DEFINITIONS` from the target are forwarded as compiler flags.
|
||||
|
||||
The `COMPILE_DEFINITIONS` are stored in the `module_defs` variable with
|
||||
a generator expression:
|
||||
|
||||
```
|
||||
set(module_defs $<TARGET_PROPERTY:${ARG_MODULE},COMPILE_DEFINITIONS>)
|
||||
```
|
||||
|
||||
Then, the definitions are added to the rootcint command with this
|
||||
expression:
|
||||
|
||||
```
|
||||
"$<$<BOOL:${module_defs}>:-D$<JOIN:${module_defs},;-D>>"
|
||||
```
|
||||
|
||||
This code was almost copied exactly from the CMake documentation
|
||||
example:
|
||||
|
||||
https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html
|
||||
|
||||
In particular, the `BOOL` check makes sure that the if the target
|
||||
property is empty, we will not get a bare `-D` with nothing after it,
|
||||
corrupting the rootcint command.
|
||||
|
||||
However, there is no protextion against the case where the
|
||||
`COMPILE_DEFINITIONS` target property is not empty, but its elements are
|
||||
empty strings! This happened to me in my recent build.
|
||||
|
||||
Instead of trying to figure out where the empty strings are added to the
|
||||
`COMPILE_DEFINITIONS`, it is better to also protect against empty target
|
||||
property elements in the CMake generator expressions, which is
|
||||
implemented in this commit.
|
||||
---
|
||||
cmake/modules/RootMacros.cmake | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/modules/RootMacros.cmake b/cmake/modules/RootMacros.cmake
|
||||
index c52c23d29a..c62ffc2152 100644
|
||||
--- a/cmake/modules/RootMacros.cmake
|
||||
+++ b/cmake/modules/RootMacros.cmake
|
||||
@@ -628,7 +628,10 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
|
||||
else()
|
||||
set(module_incs $<TARGET_PROPERTY:${ARG_MODULE},INCLUDE_DIRECTORIES>)
|
||||
endif()
|
||||
- set(module_defs $<TARGET_PROPERTY:${ARG_MODULE},COMPILE_DEFINITIONS>)
|
||||
+ # The COMPILE_DEFINITIONS list might contain empty elements. These are
|
||||
+ # removed with the FILTER generator expression, excluding elements that
|
||||
+ # match the ^$ regexp (only matches empty strings).
|
||||
+ set(module_defs "$<FILTER:$<TARGET_PROPERTY:${ARG_MODULE},COMPILE_DEFINITIONS>,EXCLUDE,^$>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
--
|
||||
2.37.2
|
||||
|
||||
80
root-ptr-is-null-RooFit-TMVA.patch
Normal file
80
root-ptr-is-null-RooFit-TMVA.patch
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
From c65f3d96f3f4433bff9d40fa9cf1dec100867a07 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Tue, 8 Jun 2021 10:12:37 +0200
|
||||
Subject: [PATCH] Fix 'this' pointer is null warnings
|
||||
|
||||
.../roofit/roofitcore/src/RooDataHist.cxx: In member function 'void RooDataHist::_adjustBinning(RooRealVar&, const TAxis&, RooRealVar*, Int_t*)':
|
||||
.../roofit/roofitcore/src/RooDataHist.cxx:595:122: warning: 'this' pointer is null [-Wnonnull]
|
||||
595 | coutE(InputArguments) << "RooDataHist::adjustBinning(" << GetName() << ") ERROR: dimension " << ourVar->GetName() << " must be real" << endl ;
|
||||
| ^~~~~~~~~~~~~~~
|
||||
|
||||
.../roofit/roofitcore/src/RooRealSumFunc.cxx: In constructor 'RooRealSumFunc::RooRealSumFunc(const char*, const char*, const RooArgList&, const RooArgList&)':
|
||||
.../roofit/roofitcore/src/RooRealSumFunc.cxx:156:35: warning: 'this' pointer is null [-Wnonnull]
|
||||
156 | << " is not of type RooAbsReal, fatal error" << endl;
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.../tmva/tmva/src/DNN/Architectures/Reference/DataLoader.cxx: In member function 'void TMVA::DNN::TDataLoader<AData, TMVA::DNN::TReference<AReal> >::CopyInput(TMatrixT<AReal>&, TMVA::DNN::IndexIterator_t) [with AData = std::tuple<const std::vector<TMVA::Event*, std::allocator<TMVA::Event*> >&, const TMVA::DataSetInfo&>; AReal = float]':
|
||||
.../tmva/tmva/src/DNN/Architectures/Reference/DataLoader.cxx:131:34: warning: 'this' pointer is null [-Wnonnull]
|
||||
131 | Int_t n = event->GetNVariables();
|
||||
| ~~~~~~~~~~~~~~~~~~~~^~
|
||||
In file included from .../tmva/tmva/inc/TMVA/VariableTransformBase.h:48,
|
||||
from .../tmva/tmva/inc/TMVA/Tools.h:58,
|
||||
from .../tmva/tmva/inc/TMVA/DNN/GeneralLayer.h:36,
|
||||
from .../tmva/tmva/inc/TMVA/DNN/CNN/ConvLayer.h:32,
|
||||
from .../tmva/tmva/inc/TMVA/DNN/Architectures/Reference.h:24,
|
||||
from .../tmva/tmva/src/DNN/Architectures/Reference/DataLoader.cxx:17:
|
||||
.../tmva/tmva/inc/TMVA/Event.h:88:16: note: in a call to non-static member function 'UInt_t TMVA::Event::GetNVariables() const'
|
||||
88 | UInt_t GetNVariables() const;
|
||||
| ^~~~~~~~~~~~~
|
||||
---
|
||||
roofit/roofitcore/src/RooDataHist.cxx | 2 +-
|
||||
roofit/roofitcore/src/RooRealSumFunc.cxx | 4 ++--
|
||||
tmva/tmva/src/DNN/Architectures/Reference/DataLoader.cxx | 2 +-
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/roofit/roofitcore/src/RooDataHist.cxx b/roofit/roofitcore/src/RooDataHist.cxx
|
||||
index 84cf2c0f68..8dddb88e2b 100644
|
||||
--- a/roofit/roofitcore/src/RooDataHist.cxx
|
||||
+++ b/roofit/roofitcore/src/RooDataHist.cxx
|
||||
@@ -591,7 +591,7 @@ void RooDataHist::importDHistSet(const RooArgList& /*vars*/, RooCategory& indexC
|
||||
void RooDataHist::_adjustBinning(RooRealVar &theirVar, const TAxis &axis,
|
||||
RooRealVar *ourVar, Int_t *offset)
|
||||
{
|
||||
- if (!dynamic_cast<RooRealVar*>(ourVar)) {
|
||||
+ if (!dynamic_cast<RooRealVar*>(static_cast<RooAbsArg*>(ourVar))) {
|
||||
coutE(InputArguments) << "RooDataHist::adjustBinning(" << GetName() << ") ERROR: dimension " << ourVar->GetName() << " must be real" << endl ;
|
||||
assert(0) ;
|
||||
}
|
||||
diff --git a/roofit/roofitcore/src/RooRealSumFunc.cxx b/roofit/roofitcore/src/RooRealSumFunc.cxx
|
||||
index 3f78020acd..a1625d7e35 100644
|
||||
--- a/roofit/roofitcore/src/RooRealSumFunc.cxx
|
||||
+++ b/roofit/roofitcore/src/RooRealSumFunc.cxx
|
||||
@@ -149,10 +149,10 @@ RooRealSumFunc::RooRealSumFunc(const char *name, const char *title, const RooArg
|
||||
_coefList.add(*coef);
|
||||
}
|
||||
|
||||
- func = (RooAbsReal *)funcIter->Next();
|
||||
+ func = (RooAbsArg *)funcIter->Next();
|
||||
if (func) {
|
||||
if (!dynamic_cast<RooAbsReal *>(func)) {
|
||||
- coutE(InputArguments) << "RooRealSumFunc::RooRealSumFunc(" << GetName() << ") last func " << coef->GetName()
|
||||
+ coutE(InputArguments) << "RooRealSumFunc::RooRealSumFunc(" << GetName() << ") last func " << func->GetName()
|
||||
<< " is not of type RooAbsReal, fatal error" << endl;
|
||||
assert(0);
|
||||
}
|
||||
diff --git a/tmva/tmva/src/DNN/Architectures/Reference/DataLoader.cxx b/tmva/tmva/src/DNN/Architectures/Reference/DataLoader.cxx
|
||||
index 2465abf308..24a09d1fc0 100644
|
||||
--- a/tmva/tmva/src/DNN/Architectures/Reference/DataLoader.cxx
|
||||
+++ b/tmva/tmva/src/DNN/Architectures/Reference/DataLoader.cxx
|
||||
@@ -128,7 +128,7 @@ void TDataLoader<TMVAInput_t, TReference<Real_t>>::CopyInput(TMatrixT<Real_t> &m
|
||||
Event *event = nullptr;
|
||||
|
||||
Int_t m = matrix.GetNrows();
|
||||
- Int_t n = event->GetNVariables();
|
||||
+ Int_t n = matrix.GetNcols();
|
||||
|
||||
// Copy input variables.
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
||||
32
root-ptr-is-null-TStreamerInfo.patch
Normal file
32
root-ptr-is-null-TStreamerInfo.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
From 1ca221f010fdcfb6249ae7b1cac77fbe29b86214 Mon Sep 17 00:00:00 2001
|
||||
From: Enrico Guiraud <enrico.guiraud@cern.ch>
|
||||
Date: Mon, 7 Jun 2021 11:02:48 +0200
|
||||
Subject: [PATCH] [io] Avoid nullptr deref when printing warning in
|
||||
TStreamerInfo
|
||||
|
||||
---
|
||||
io/io/src/TStreamerInfo.cxx | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/io/io/src/TStreamerInfo.cxx b/io/io/src/TStreamerInfo.cxx
|
||||
index d545ab7be8..a026635890 100644
|
||||
--- a/io/io/src/TStreamerInfo.cxx
|
||||
+++ b/io/io/src/TStreamerInfo.cxx
|
||||
@@ -1109,12 +1109,12 @@ void TStreamerInfo::BuildCheck(TFile *file /* = 0 */, Bool_t load /* = kTRUE */)
|
||||
fClassVersion, GetName(), GetName(), GetName(), fClassVersion);
|
||||
} else {
|
||||
Warning("BuildCheck", "\n\
|
||||
- The StreamerInfo from %s does not match existing one (%s:%d)\n\
|
||||
+ The StreamerInfo does not match existing one (%s:%d)\n\
|
||||
The existing one has not been used yet and will be discarded.\n\
|
||||
Reading should work properly, however writing object of\n\
|
||||
type %s will not work properly. Most likely the version number\n\
|
||||
of the class was not properly updated [See ClassDef(%s,%d)].",
|
||||
- file->GetName(), GetName(), fClassVersion, GetName(), GetName(), fClassVersion);
|
||||
+ GetName(), fClassVersion, GetName(), GetName(), fClassVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
||||
39
root-stress-s390x.patch
Normal file
39
root-stress-s390x.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
From 30cbc0d44364586ac64a3ac0fd6641e338549bbe Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Tue, 10 Aug 2021 06:33:17 +0200
|
||||
Subject: [PATCH] Adjust tests for s390x
|
||||
|
||||
---
|
||||
math/mathcore/test/stress/testGenVector.cxx | 2 +-
|
||||
test/stressMathCore.cxx | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/math/mathcore/test/stress/testGenVector.cxx b/math/mathcore/test/stress/testGenVector.cxx
|
||||
index 8da429c395..df9061c88e 100644
|
||||
--- a/math/mathcore/test/stress/testGenVector.cxx
|
||||
+++ b/math/mathcore/test/stress/testGenVector.cxx
|
||||
@@ -79,7 +79,7 @@ TYPED_TEST_P(GenVectorTest, TestGenVectors)
|
||||
scale = this->fDim * 20;
|
||||
if (this->fDim == 3 && this->V2Name() == "RhoEtaPhiVector") scale *= 12; // for problem with RhoEtaPhi
|
||||
if (this->fDim == 4 && ( this->V2Name() == "PtEtaPhiMVector" || this->V2Name() == "PxPyPzMVector")) {
|
||||
-#if (defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
|
||||
+#if (defined(__arm__) || defined(__arm64__) || defined(__aarch64__) || defined(__s390x__))
|
||||
scale *= 1.E7;
|
||||
#else
|
||||
scale *= 10;
|
||||
diff --git a/test/stressMathCore.cxx b/test/stressMathCore.cxx
|
||||
index 4d4695a8a0..b6d2d2c9e7 100644
|
||||
--- a/test/stressMathCore.cxx
|
||||
+++ b/test/stressMathCore.cxx
|
||||
@@ -1120,7 +1120,7 @@ int testVector(int ngen, bool testio=false) {
|
||||
scale = Dim*20;
|
||||
if (Dim==3 && VecType<V2>::name() == "RhoEtaPhiVector") scale *= 12; // for problem with RhoEtaPhi
|
||||
if (Dim==4 && ( VecType<V2>::name() == "PtEtaPhiMVector" || VecType<V2>::name() == "PxPyPzMVector")) {
|
||||
-#if (defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
|
||||
+#if (defined(__arm__) || defined(__arm64__) || defined(__aarch64__) || defined(__s390x__))
|
||||
scale *= 1.E7;
|
||||
#else
|
||||
scale *= 10;
|
||||
--
|
||||
2.31.1
|
||||
|
||||
31
root-symbol-rewrite.patch
Normal file
31
root-symbol-rewrite.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
From f99eedeb72644671cd584f48e4c136d47f6b0020 Mon Sep 17 00:00:00 2001
|
||||
From: Fangrui Song <maskray@google.com>
|
||||
Date: Thu, 12 Dec 2019 16:18:57 -0800
|
||||
Subject: [PATCH] [MC][PowerPC] Fix a crash when redefining a symbol after .set
|
||||
|
||||
Fix PR44284. This is probably not valid assembly but we should not crash.
|
||||
|
||||
Reviewed By: luporl, #powerpc, steven.zhang
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D71443
|
||||
---
|
||||
interpreter/llvm/src/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/interpreter/llvm/src/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp b/interpreter/llvm/src/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
|
||||
index 00df9e41fdae..5e91bdb2f8de 100644
|
||||
--- a/interpreter/llvm/src/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
|
||||
+++ b/interpreter/llvm/src/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
|
||||
@@ -201,7 +201,8 @@ public:
|
||||
|
||||
void finish() override {
|
||||
for (auto *Sym : UpdateOther)
|
||||
- copyLocalEntry(Sym, Sym->getVariableValue());
|
||||
+ if (Sym->isVariable())
|
||||
+ copyLocalEntry(Sym, Sym->getVariableValue());
|
||||
}
|
||||
|
||||
private:
|
||||
--
|
||||
2.33.1
|
||||
|
||||
48
root-test-timeout.patch
Normal file
48
root-test-timeout.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
From bfa7b7e59c3bcee4d6a5501c800b49334af326e5 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Sun, 3 Jul 2022 08:18:57 +0200
|
||||
Subject: [PATCH] Increase test timeout
|
||||
|
||||
---
|
||||
tmva/tmva/test/DNN/CMakeLists.txt | 2 +-
|
||||
tutorials/CMakeLists.txt | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tmva/tmva/test/DNN/CMakeLists.txt b/tmva/tmva/test/DNN/CMakeLists.txt
|
||||
index a9233682f6..653540e9e3 100644
|
||||
--- a/tmva/tmva/test/DNN/CMakeLists.txt
|
||||
+++ b/tmva/tmva/test/DNN/CMakeLists.txt
|
||||
@@ -144,7 +144,7 @@ ROOT_ADD_TEST(TMVA-DNN-MethodDL-SGD-Optimization-Cpu COMMAND testMethodDLSGDOpti
|
||||
|
||||
# DNN - MethodDL Adam Optimization CPU
|
||||
ROOT_EXECUTABLE(testMethodDLAdamOptimizationCpu TestMethodDLAdamOptimizationCpu.cxx LIBRARIES ${Libraries})
|
||||
-ROOT_ADD_TEST(TMVA-DNN-MethodDL-Adam-Optimization-Cpu COMMAND testMethodDLAdamOptimizationCpu)
|
||||
+ROOT_ADD_TEST(TMVA-DNN-MethodDL-Adam-Optimization-Cpu COMMAND testMethodDLAdamOptimizationCpu TIMEOUT 1800)
|
||||
|
||||
# DNN - MethodDL Adagrad Optimization CPU
|
||||
ROOT_EXECUTABLE(testMethodDLAdagradOptimizationCpu TestMethodDLAdagradOptimizationCpu.cxx LIBRARIES ${Libraries})
|
||||
diff --git a/tutorials/CMakeLists.txt b/tutorials/CMakeLists.txt
|
||||
index 520d682d2d..a846e7552f 100644
|
||||
--- a/tutorials/CMakeLists.txt
|
||||
+++ b/tutorials/CMakeLists.txt
|
||||
@@ -479,7 +479,7 @@ foreach(t ${tutorials})
|
||||
|
||||
# These tests on ARM64 need much more than 20 minutes - increase the timeout
|
||||
if(ROOT_ARCHITECTURE MATCHES arm64 OR ROOT_ARCHITECTURE MATCHES ppc64)
|
||||
- set(thisTestTimeout 2400) # 40m
|
||||
+ set(thisTestTimeout 3000) # 50m
|
||||
else()
|
||||
set(thisTestTimeout 1200) # 20m
|
||||
endif()
|
||||
@@ -513,7 +513,7 @@ foreach(t ${mpi_tutorials})
|
||||
|
||||
# These tests on ARM64 need much more than 20 minutes - increase the timeout
|
||||
if(ROOT_ARCHITECTURE MATCHES arm64 OR ROOT_ARCHITECTURE MATCHES ppc64)
|
||||
- set(thisTestTimeout 2400) # 40m
|
||||
+ set(thisTestTimeout 3000) # 50m
|
||||
else()
|
||||
set(thisTestTimeout 1200) # 20m
|
||||
endif()
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
|
@ -72,7 +72,14 @@ wget -N ${SITE}/tesla.root
|
|||
wget -N ${SITE}/wa91_ref_3.root
|
||||
wget -N ${SITE}/wa91.root
|
||||
|
||||
wget -N ${SITE}/AtlasGraphs.root
|
||||
wget -N ${SITE}/europe.root
|
||||
wget -N ${SITE}/Higgs_data.root
|
||||
wget -N ${SITE}/linearIO.root
|
||||
wget -N ${SITE}/stressHistogram.5.18.00.root
|
||||
wget -N ${SITE}/tmva_class_example.root
|
||||
wget -N ${SITE}/tmva_multiclass_example.root
|
||||
wget -N ${SITE}/tmva_reg_example.root
|
||||
wget -N ${SITE}/usa.root
|
||||
|
||||
for f in *.root ; do ln -s $f $f.ROOT.cachefile ; done
|
||||
|
|
|
|||
48
root-threadsh1-avoid-heap-use-after-free.patch
Normal file
48
root-threadsh1-avoid-heap-use-after-free.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
From 493c4210168fa475aa4130c12e8fdff3b7d85c09 Mon Sep 17 00:00:00 2001
|
||||
From: Philippe Canal <pcanal@fnal.gov>
|
||||
Date: Mon, 7 Mar 2022 13:32:37 -0600
|
||||
Subject: [PATCH] threadsh1: Avoid heap-use-after-free.
|
||||
|
||||
Previously, the Canvas `Close` signal which triggers a call to the local function `close` which
|
||||
was unconditionally call `Kill` on its associated thread would call it on an already deleted
|
||||
object if the `TThread` was deleted before the `TCanvas`.
|
||||
|
||||
This fix #10015 (detected by using ASAN).
|
||||
---
|
||||
tutorials/legacy/thread/threadsh1.C | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tutorials/legacy/thread/threadsh1.C b/tutorials/legacy/thread/threadsh1.C
|
||||
index b819f5d020..d6abc67e36 100644
|
||||
--- a/tutorials/legacy/thread/threadsh1.C
|
||||
+++ b/tutorials/legacy/thread/threadsh1.C
|
||||
@@ -67,7 +67,8 @@ void *joiner(void *)
|
||||
void closed(Int_t id)
|
||||
{
|
||||
// kill the thread matching the canvas being closed
|
||||
- t[id]->Kill();
|
||||
+ if (t[id])
|
||||
+ t[id]->Kill();
|
||||
// and set the canvas pointer to 0
|
||||
c[id] = 0;
|
||||
}
|
||||
@@ -142,11 +143,11 @@ void threadsh1()
|
||||
t[4]->Join();
|
||||
TThread::Ps();
|
||||
|
||||
- delete t[0];
|
||||
- delete t[1];
|
||||
- delete t[2];
|
||||
- delete t[3];
|
||||
- delete t[4];
|
||||
+ delete t[0]; t[0] = nullptr; // Prevents after deletion access.
|
||||
+ delete t[1]; t[1] = nullptr;
|
||||
+ delete t[2]; t[2] = nullptr;
|
||||
+ delete t[3]; t[3] = nullptr;
|
||||
+ delete t[4]; t[4] = nullptr;
|
||||
|
||||
delete rng[0];
|
||||
delete rng[1];
|
||||
--
|
||||
2.35.1
|
||||
|
||||
223
root-tmva-threads.patch
Normal file
223
root-tmva-threads.patch
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
diff --git a/tutorials/tmva/TMVA_CNN_Classification.C b/tutorials/tmva/TMVA_CNN_Classification.C
|
||||
index 838581a925..db5af784d4 100644
|
||||
--- a/tutorials/tmva/TMVA_CNN_Classification.C
|
||||
+++ b/tutorials/tmva/TMVA_CNN_Classification.C
|
||||
@@ -23,7 +23,7 @@
|
||||
/// we create a signal and background 2D histograms from 2d gaussians
|
||||
/// with a location (means in X and Y) different for each event
|
||||
/// The difference between signal and background is in the gaussian width.
|
||||
-/// The width for the bakground gaussian is slightly larger than the signal width by few % values
|
||||
+/// The width for the background gaussian is slightly larger than the signal width by few % values
|
||||
///
|
||||
///
|
||||
void MakeImagesTree(int n, int nh, int nw)
|
||||
@@ -48,7 +48,7 @@ void MakeImagesTree(int n, int nh, int nw)
|
||||
auto f1 = new TF2("f1", "xygaus");
|
||||
auto f2 = new TF2("f2", "xygaus");
|
||||
TTree sgn("sig_tree", "signal_tree");
|
||||
- TTree bkg("bkg_tree", "bakground_tree");
|
||||
+ TTree bkg("bkg_tree", "background_tree");
|
||||
|
||||
TFile f(fileOutName, "RECREATE");
|
||||
|
||||
@@ -107,7 +107,16 @@ void MakeImagesTree(int n, int nh, int nw)
|
||||
f.Close();
|
||||
}
|
||||
|
||||
-void TMVA_CNN_Classification(std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
+/// @brief Run the TMVA CNN Classification example
|
||||
+/// @param nevts : number of signal/background events. Use by default a low value (1000)
|
||||
+/// but increase to at least 5000 to get a good result
|
||||
+/// @param opt : vector of bool with method used (default all on if available). The order is:
|
||||
+/// - TMVA CNN
|
||||
+/// - Keras CNN
|
||||
+/// - TMVA DNN
|
||||
+/// - TMVA BDT
|
||||
+/// - PyTorch CNN
|
||||
+void TMVA_CNN_Classification(int nevts = 1000, std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
{
|
||||
|
||||
bool useTMVACNN = (opt.size() > 0) ? opt[0] : false;
|
||||
@@ -125,17 +134,17 @@ void TMVA_CNN_Classification(std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
|
||||
bool writeOutputFile = true;
|
||||
|
||||
- int num_threads = 0; // use default threads
|
||||
+ int num_threads = 4; // use max 4 threads
|
||||
+ // switch off MT in OpenBLAS to avoid conflict with tbb
|
||||
+ gSystem->Setenv("OMP_NUM_THREADS", "1");
|
||||
|
||||
TMVA::Tools::Instance();
|
||||
|
||||
// do enable MT running
|
||||
if (num_threads >= 0) {
|
||||
ROOT::EnableImplicitMT(num_threads);
|
||||
- if (num_threads > 0) gSystem->Setenv("OMP_NUM_THREADS", TString::Format("%d",num_threads));
|
||||
}
|
||||
- else
|
||||
- gSystem->Setenv("OMP_NUM_THREADS", "1");
|
||||
+
|
||||
|
||||
std::cout << "Running with nthreads = " << ROOT::GetThreadPoolSize() << std::endl;
|
||||
|
||||
@@ -145,6 +154,7 @@ void TMVA_CNN_Classification(std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
TMVA::PyMethodBase::PyInitialize();
|
||||
#else
|
||||
useKerasCNN = false;
|
||||
+ usePyTorchCNN = false;
|
||||
#endif
|
||||
|
||||
TFile *outputFile = nullptr;
|
||||
@@ -160,7 +170,7 @@ void TMVA_CNN_Classification(std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
The factory is the major TMVA object you have to interact with. Here is the list of parameters you need to pass
|
||||
|
||||
- The first argument is the base of the name of all the output
|
||||
- weightfiles in the directory weight/ that will be created with the
|
||||
+ weight files in the directory weight/ that will be created with the
|
||||
method parameters
|
||||
|
||||
- The second argument is the output file for the training results
|
||||
@@ -207,7 +217,7 @@ void TMVA_CNN_Classification(std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
|
||||
// if file does not exists create it
|
||||
if (!fileExist) {
|
||||
- MakeImagesTree(5000, 16, 16);
|
||||
+ MakeImagesTree(nevts, 16, 16);
|
||||
}
|
||||
|
||||
// TString inputFileName = "tmva_class_example.root";
|
||||
@@ -288,7 +298,7 @@ void TMVA_CNN_Classification(std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
// Boosted Decision Trees
|
||||
if (useTMVABDT) {
|
||||
factory.BookMethod(loader, TMVA::Types::kBDT, "BDT",
|
||||
- "!V:NTrees=400:MinNodeSize=2.5%:MaxDepth=2:BoostType=AdaBoost:AdaBoostBeta=0.5:"
|
||||
+ "!V:NTrees=200:MinNodeSize=2.5%:MaxDepth=2:BoostType=AdaBoost:AdaBoostBeta=0.5:"
|
||||
"UseBaggedBoost:BaggedSampleFraction=0.5:SeparationType=GiniIndex:nCuts=20");
|
||||
}
|
||||
/**
|
||||
@@ -354,7 +364,7 @@ void TMVA_CNN_Classification(std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
- note in this case we are using a filer 3x3 and padding=1 and stride=1 so we get the output dimension of the
|
||||
conv layer equal to the input
|
||||
|
||||
- - note we use after the first convolutional layer a batch normalization layer. This seems to help significatly the
|
||||
+ - note we use after the first convolutional layer a batch normalization layer. This seems to help significantly the
|
||||
convergence
|
||||
|
||||
- For the MaxPool layer:
|
||||
@@ -419,7 +429,7 @@ void TMVA_CNN_Classification(std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
|
||||
Info("TMVA_CNN_Classification", "Building convolutional keras model");
|
||||
// create python script which can be executed
|
||||
- // crceate 2 conv2d layer + maxpool + dense
|
||||
+ // create 2 conv2d layer + maxpool + dense
|
||||
TMacro m;
|
||||
m.AddLine("import tensorflow");
|
||||
m.AddLine("from tensorflow.keras.models import Sequential");
|
||||
@@ -439,13 +449,13 @@ void TMVA_CNN_Classification(std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
m.AddLine("model.add(Flatten())");
|
||||
m.AddLine("model.add(Dense(256, activation = 'relu')) ");
|
||||
m.AddLine("model.add(Dense(2, activation = 'sigmoid')) ");
|
||||
- m.AddLine("model.compile(loss = 'binary_crossentropy', optimizer = Adam(lr = 0.001), metrics = ['accuracy'])");
|
||||
+ m.AddLine("model.compile(loss = 'binary_crossentropy', optimizer = Adam(learning_rate = 0.001), weighted_metrics = ['accuracy'])");
|
||||
m.AddLine("model.save('model_cnn.h5')");
|
||||
m.AddLine("model.summary()");
|
||||
|
||||
m.SaveSource("make_cnn_model.py");
|
||||
// execute
|
||||
- gSystem->Exec("python make_cnn_model.py");
|
||||
+ gSystem->Exec("python3 make_cnn_model.py");
|
||||
|
||||
if (gSystem->AccessPathName("model_cnn.h5")) {
|
||||
Warning("TMVA_CNN_Classification", "Error creating Keras model file - skip using Keras");
|
||||
@@ -465,10 +477,9 @@ void TMVA_CNN_Classification(std::vector<bool> opt = {1, 1, 1, 1, 1})
|
||||
Info("TMVA_CNN_Classification", "Using Convolutional PyTorch Model");
|
||||
TString pyTorchFileName = gROOT->GetTutorialDir() + TString("/tmva/PyTorch_Generate_CNN_Model.py");
|
||||
// check that pytorch can be imported and file defining the model and used later when booking the method is existing
|
||||
- if (gSystem->Exec("python -c 'import torch'") || gSystem->AccessPathName(pyTorchFileName) ) {
|
||||
+ if (gSystem->Exec("python3 -c 'import torch'") || gSystem->AccessPathName(pyTorchFileName)) {
|
||||
Warning("TMVA_CNN_Classification", "PyTorch is not installed or model building file is not existing - skip using PyTorch");
|
||||
- }
|
||||
- else {
|
||||
+ } else {
|
||||
// book PyTorch method only if PyTorch model could be created
|
||||
Info("TMVA_CNN_Classification", "Booking PyTorch CNN model");
|
||||
TString methodOpt = "H:!V:VarTransform=None:FilenameModel=PyTorchModelCNN.pt:"
|
||||
diff --git a/tutorials/tmva/TMVA_RNN_Classification.C b/tutorials/tmva/TMVA_RNN_Classification.C
|
||||
index 5bfec52196..d4bb7a4e4a 100644
|
||||
--- a/tutorials/tmva/TMVA_RNN_Classification.C
|
||||
+++ b/tutorials/tmva/TMVA_RNN_Classification.C
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/// Helper function to generate the time data set
|
||||
/// make some time data but not of fixed length.
|
||||
-/// use a poisson with mu = 5 and troncated at 10
|
||||
+/// use a poisson with mu = 5 and truncated at 10
|
||||
///
|
||||
void MakeTimeData(int n, int ntime, int ndim )
|
||||
{
|
||||
@@ -136,13 +136,14 @@ void MakeTimeData(int n, int ntime, int ndim )
|
||||
}
|
||||
}
|
||||
/// macro for performing a classification using a Recurrent Neural Network
|
||||
+/// @param nevts = 2000 Number of events used. (increase for better classification results)
|
||||
/// @param use_type
|
||||
/// use_type = 0 use Simple RNN network
|
||||
/// use_type = 1 use LSTM network
|
||||
/// use_type = 2 use GRU
|
||||
/// use_type = 3 build 3 different networks with RNN, LSTM and GRU
|
||||
|
||||
-void TMVA_RNN_Classification(int use_type = 1)
|
||||
+void TMVA_RNN_Classification(int nevts = 2000, int use_type = 1)
|
||||
{
|
||||
|
||||
const int ninput = 30;
|
||||
@@ -150,7 +151,7 @@ void TMVA_RNN_Classification(int use_type = 1)
|
||||
const int batchSize = 100;
|
||||
const int maxepochs = 20;
|
||||
|
||||
- int nTotEvts = 10000; // total events to be generated for signal or background
|
||||
+ int nTotEvts = nevts; // total events to be generated for signal or background
|
||||
|
||||
bool useKeras = true;
|
||||
|
||||
@@ -190,14 +191,14 @@ void TMVA_RNN_Classification(int use_type = 1)
|
||||
useKeras = false;
|
||||
#endif
|
||||
|
||||
- int num_threads = 0; // use by default all threads
|
||||
+ int num_threads = 4; // use max 4 threads
|
||||
+ // switch off MT in OpenBLAS to avoid conflict with tbb
|
||||
+ gSystem->Setenv("OMP_NUM_THREADS", "1");
|
||||
+
|
||||
// do enable MT running
|
||||
if (num_threads >= 0) {
|
||||
ROOT::EnableImplicitMT(num_threads);
|
||||
- if (num_threads > 0) gSystem->Setenv("OMP_NUM_THREADS", TString::Format("%d",num_threads));
|
||||
}
|
||||
- else
|
||||
- gSystem->Setenv("OMP_NUM_THREADS", "1");
|
||||
|
||||
TMVA::Config::Instance();
|
||||
|
||||
@@ -424,17 +425,17 @@ the option string
|
||||
m.AddLine("model.add(Dense(64, activation = 'tanh')) ");
|
||||
m.AddLine("model.add(Dense(2, activation = 'sigmoid')) ");
|
||||
m.AddLine(
|
||||
- "model.compile(loss = 'binary_crossentropy', optimizer = Adam(lr = 0.001), metrics = ['accuracy'])");
|
||||
+ "model.compile(loss = 'binary_crossentropy', optimizer = Adam(learning_rate = 0.001), weighted_metrics = ['accuracy'])");
|
||||
m.AddLine(TString::Format("modelName = '%s'", modelName.Data()));
|
||||
m.AddLine("model.save(modelName)");
|
||||
m.AddLine("model.summary()");
|
||||
|
||||
m.SaveSource("make_rnn_model.py");
|
||||
- // execute
|
||||
- gSystem->Exec("python make_rnn_model.py");
|
||||
+ // execute python script to make the model
|
||||
+ gSystem->Exec("python3 make_rnn_model.py");
|
||||
|
||||
if (gSystem->AccessPathName(modelName)) {
|
||||
- Warning("TMVA_RNN_Classification", "Error creating Keras recurrennt model file - Skip using Keras");
|
||||
+ Warning("TMVA_RNN_Classification", "Error creating Keras recurrent model file - Skip using Keras");
|
||||
useKeras = false;
|
||||
} else {
|
||||
// book PyKeras method only if Keras model could be created
|
||||
186
root-unbundle-gtest.patch
Normal file
186
root-unbundle-gtest.patch
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
From 29884ae01fde27204d92f554da4e92227a2ed1e6 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Sat, 26 Mar 2022 10:22:07 +0100
|
||||
Subject: [PATCH 1/2] Implement builtin_gtest option
|
||||
|
||||
By setting the option to OFF the system gtest and gmock are used.
|
||||
This allows doing tests without network available, e.g. during a
|
||||
package build for Fedora/EPEL.
|
||||
---
|
||||
cmake/modules/FindGTest.cmake | 81 +++++++++++++++++++++
|
||||
cmake/modules/RootBuildOptions.cmake | 2 +
|
||||
cmake/modules/RootMacros.cmake | 2 +-
|
||||
cmake/modules/SearchInstalledSoftware.cmake | 44 ++++++++---
|
||||
4 files changed, 118 insertions(+), 11 deletions(-)
|
||||
create mode 100644 cmake/modules/FindGTest.cmake
|
||||
|
||||
diff --git a/cmake/modules/FindGTest.cmake b/cmake/modules/FindGTest.cmake
|
||||
new file mode 100644
|
||||
index 0000000000..438ec501c2
|
||||
--- /dev/null
|
||||
+++ b/cmake/modules/FindGTest.cmake
|
||||
@@ -0,0 +1,81 @@
|
||||
+# Find the gtest and gmock includes and library.
|
||||
+#
|
||||
+# This module defines
|
||||
+# GTEST_LIBRARIES
|
||||
+# GTEST_MAIN_LIBRARIES
|
||||
+# GTEST_INCLUDE_DIRS
|
||||
+# GMOCK_LIBRARIES
|
||||
+# GMOCK_MAIN_LIBRARIES
|
||||
+# GMOCK_INCLUDE_DIRS
|
||||
+#
|
||||
+# GTEST_FOUND true if all libraries present
|
||||
+
|
||||
+find_package(Threads QUIET)
|
||||
+
|
||||
+find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h)
|
||||
+find_library(GTEST_LIBRARIES NAMES gtest)
|
||||
+find_library(GTEST_MAIN_LIBRARIES NAMES gtest_main)
|
||||
+
|
||||
+find_path(GMOCK_INCLUDE_DIRS NAMES gmock/gmock.h)
|
||||
+find_library(GMOCK_LIBRARIES NAMES gmock)
|
||||
+find_library(GMOCK_MAIN_LIBRARIES NAMES gmock_main)
|
||||
+
|
||||
+# Special for EPEL 7's gmock
|
||||
+if(NOT GMOCK_LIBRARIES)
|
||||
+ find_path(GMOCK_SRC_DIR NAMES gmock-all.cc PATHS /usr/src/gmock)
|
||||
+endif()
|
||||
+
|
||||
+if(NOT GMOCK_MAIN_LIBRARIES)
|
||||
+ find_path(GMOCK_MAIN_SRC_DIR NAMES gmock_main.cc PATHS /usr/src/gmock)
|
||||
+endif()
|
||||
+
|
||||
+if (GTEST_INCLUDE_DIRS AND
|
||||
+ GTEST_LIBRARIES AND
|
||||
+ GTEST_MAIN_LIBRARIES AND
|
||||
+ GMOCK_INCLUDE_DIRS AND
|
||||
+ (GMOCK_LIBRARIES OR GMOCK_SRC_DIR) AND
|
||||
+ (GMOCK_MAIN_LIBRARIES OR GMOCK_MAIN_SRC_DIR))
|
||||
+
|
||||
+ add_library(gtest UNKNOWN IMPORTED)
|
||||
+ set_target_properties(gtest PROPERTIES
|
||||
+ IMPORTED_LOCATION ${GTEST_LIBRARIES}
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS})
|
||||
+ target_link_libraries(gtest INTERFACE Threads::Threads)
|
||||
+
|
||||
+ add_library(gtest_main UNKNOWN IMPORTED)
|
||||
+ set_target_properties(gtest_main PROPERTIES
|
||||
+ IMPORTED_LOCATION ${GTEST_MAIN_LIBRARIES})
|
||||
+ target_link_libraries(gtest_main INTERFACE gtest Threads::Threads)
|
||||
+
|
||||
+ if(GMOCK_LIBRARIES)
|
||||
+ add_library(gmock UNKNOWN IMPORTED)
|
||||
+ set_target_properties(gmock PROPERTIES
|
||||
+ IMPORTED_LOCATION ${GMOCK_LIBRARIES}
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES ${GMOCK_INCLUDE_DIRS})
|
||||
+ else()
|
||||
+ add_library(gmock STATIC ${GMOCK_SRC_DIR}/gmock-all.cc)
|
||||
+ target_include_directories(gmock PUBLIC ${GMOCK_INCLUDE_DIRS})
|
||||
+ set(GMOCK_LIBRARIES gmock)
|
||||
+ endif()
|
||||
+ target_link_libraries(gmock INTERFACE gtest Threads::Threads)
|
||||
+
|
||||
+ if(GMOCK_MAIN_LIBRARIES)
|
||||
+ add_library(gmock_main UNKNOWN IMPORTED)
|
||||
+ set_target_properties(gmock_main PROPERTIES
|
||||
+ IMPORTED_LOCATION ${GMOCK_MAIN_LIBRARIES})
|
||||
+ else()
|
||||
+ add_library(gmock_main STATIC ${GMOCK_MAIN_SRC_DIR}/gmock_main.cc)
|
||||
+ set(GMOCK_MAIN_LIBRARIES gmock_main)
|
||||
+ endif()
|
||||
+ target_link_libraries(gmock_main INTERFACE gmock Threads::Threads)
|
||||
+
|
||||
+endif()
|
||||
+
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+find_package_handle_standard_args(GTest DEFAULT_MSG
|
||||
+ GTEST_LIBRARIES
|
||||
+ GTEST_MAIN_LIBRARIES
|
||||
+ GTEST_INCLUDE_DIRS
|
||||
+ GMOCK_LIBRARIES
|
||||
+ GMOCK_MAIN_LIBRARIES
|
||||
+ GMOCK_INCLUDE_DIRS)
|
||||
diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake
|
||||
index 7886c5f3e9..01108a18c9 100644
|
||||
--- a/cmake/modules/RootBuildOptions.cmake
|
||||
+++ b/cmake/modules/RootBuildOptions.cmake
|
||||
@@ -94,6 +94,7 @@ ROOT_BUILD_OPTION(builtin_ftgl OFF "Build bundled copy of FTGL")
|
||||
ROOT_BUILD_OPTION(builtin_gl2ps OFF "Build bundled copy of gl2ps")
|
||||
ROOT_BUILD_OPTION(builtin_glew OFF "Build bundled copy of GLEW")
|
||||
ROOT_BUILD_OPTION(builtin_gsl OFF "Build GSL internally (requires network)")
|
||||
+ROOT_BUILD_OPTION(builtin_gtest OFF "Build googletest internally (requires network)")
|
||||
ROOT_BUILD_OPTION(builtin_llvm ON "Build bundled copy of LLVM")
|
||||
ROOT_BUILD_OPTION(builtin_lz4 OFF "Build bundled copy of lz4")
|
||||
ROOT_BUILD_OPTION(builtin_lzma OFF "Build bundled copy of lzma")
|
||||
@@ -293,6 +294,7 @@ if(builtin_all)
|
||||
set(builtin_gl2ps_defvalue ON)
|
||||
set(builtin_glew_defvalue ON)
|
||||
set(builtin_gsl_defvalue ON)
|
||||
+ set(builtin_gtest_defvalue ON)
|
||||
set(builtin_llvm_defvalue ON)
|
||||
set(builtin_lz4_defvalue ON)
|
||||
set(builtin_lzma_defvalue ON)
|
||||
diff --git a/cmake/modules/RootMacros.cmake b/cmake/modules/RootMacros.cmake
|
||||
index cb75c0b1da..38fd5d6baf 100644
|
||||
--- a/cmake/modules/RootMacros.cmake
|
||||
+++ b/cmake/modules/RootMacros.cmake
|
||||
@@ -1671,7 +1671,7 @@ function(ROOT_ADD_TEST test)
|
||||
|
||||
set_property(TEST ${test} APPEND PROPERTY ENVIRONMENT ROOT_HIST=0)
|
||||
|
||||
- #- Handle TIMOUT and DEPENDS arguments
|
||||
+ #- Handle TIMEOUT and DEPENDS arguments
|
||||
if(ARG_TIMEOUT)
|
||||
set_property(TEST ${test} PROPERTY TIMEOUT ${ARG_TIMEOUT})
|
||||
endif()
|
||||
diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake
|
||||
index fe40898d12..b6a3cc4c76 100644
|
||||
--- a/cmake/modules/SearchInstalledSoftware.cmake
|
||||
+++ b/cmake/modules/SearchInstalledSoftware.cmake
|
||||
@@ -1942,8 +1933,41 @@ if (roofit_multiprocess)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-#---Download googletest--------------------------------------------------------------
|
||||
+#---Check for googletest---------------------------------------------------------------
|
||||
if (testing)
|
||||
+ if (NOT builtin_gtest)
|
||||
+ if(fail-on-missing)
|
||||
+ find_package(GTest REQUIRED)
|
||||
+ else()
|
||||
+ find_package(GTest)
|
||||
+ if(NOT GTEST_FOUND)
|
||||
+ if(NO_CONNECTION)
|
||||
+ if(fail-on-missing)
|
||||
+ message(FATAL_ERROR "No internet connection and GTest was not found. Please check your connection, or either disable the 'testing' option or the 'fail-on-missing' to automatically disable options requiring internet access")
|
||||
+ else()
|
||||
+ message(STATUS "GTest not found, and no internet connection. Disabing the 'testing' option.")
|
||||
+ set(testing OFF CACHE BOOL "Disabled because testing requested and GTest not found (${builtin_gtest_description}) and there is no internet connection" FORCE)
|
||||
+ endif()
|
||||
+ else()
|
||||
+ message(STATUS "GTest not found, switching ON 'builtin_gtest' option.")
|
||||
+ set(builtin_gtest ON CACHE BOOL "Enabled because testing requested and GTest not found (${builtin_gtest_description})" FORCE)
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ else()
|
||||
+ if(NO_CONNECTION)
|
||||
+ if(fail-on-missing)
|
||||
+ message(FATAL_ERROR "No internet connection. Please check your connection, or either disable the 'testing' option or the 'builtin_gtest' option or the 'fail-on-missing' option to automatically disable options requiring internet access")
|
||||
+ else()
|
||||
+ message(STATUS "No internet connection, disabling the 'testing' and 'builtin_gtest' options")
|
||||
+ set(testing OFF CACHE BOOL "Disabled because there is no internet connection" FORCE)
|
||||
+ set(builtin_gtest OFF CACHE BOOL "Disabled because there is no internet connection" FORCE)
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ endif()
|
||||
+endif()
|
||||
+
|
||||
+if (builtin_gtest)
|
||||
# FIXME: Remove our version of gtest in roottest. We can reuse this one.
|
||||
# Add googletest
|
||||
# http://stackoverflow.com/questions/9689183/cmake-googletest
|
||||
--
|
||||
2.35.1
|
||||
|
||||
55
root-uring.patch
Normal file
55
root-uring.patch
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
diff --git a/io/io/src/RRawFileUnix.cxx b/io/io/src/RRawFileUnix.cxx
|
||||
index 829c5e4cb6..417c3adf30 100644
|
||||
--- a/io/io/src/RRawFileUnix.cxx
|
||||
+++ b/io/io/src/RRawFileUnix.cxx
|
||||
@@ -115,26 +115,33 @@ void ROOT::Internal::RRawFileUnix::OpenImpl()
|
||||
void ROOT::Internal::RRawFileUnix::ReadVImpl(RIOVec *ioVec, unsigned int nReq)
|
||||
{
|
||||
#ifdef R__HAS_URING
|
||||
- if (RIoUring::IsAvailable()) {
|
||||
- RIoUring ring;
|
||||
- std::vector<RIoUring::RReadEvent> reads;
|
||||
- reads.reserve(nReq);
|
||||
- for (std::size_t i = 0; i < nReq; ++i) {
|
||||
- RIoUring::RReadEvent ev;
|
||||
- ev.fBuffer = ioVec[i].fBuffer;
|
||||
- ev.fOffset = ioVec[i].fOffset;
|
||||
- ev.fSize = ioVec[i].fSize;
|
||||
- ev.fFileDes = fFileDes;
|
||||
- reads.push_back(ev);
|
||||
+ thread_local bool uring_failed = false;
|
||||
+ if (!uring_failed) {
|
||||
+ try {
|
||||
+ RIoUring ring; // throws std::runtime_error
|
||||
+ std::vector<RIoUring::RReadEvent> reads;
|
||||
+ reads.reserve(nReq);
|
||||
+ for (std::size_t i = 0; i < nReq; ++i) {
|
||||
+ RIoUring::RReadEvent ev;
|
||||
+ ev.fBuffer = ioVec[i].fBuffer;
|
||||
+ ev.fOffset = ioVec[i].fOffset;
|
||||
+ ev.fSize = ioVec[i].fSize;
|
||||
+ ev.fFileDes = fFileDes;
|
||||
+ reads.push_back(ev);
|
||||
+ }
|
||||
+ ring.SubmitReadsAndWait(reads.data(), nReq);
|
||||
+ for (std::size_t i = 0; i < nReq; ++i) {
|
||||
+ ioVec[i].fOutBytes = reads.at(i).fOutBytes;
|
||||
+ }
|
||||
+ return;
|
||||
}
|
||||
- ring.SubmitReadsAndWait(reads.data(), nReq);
|
||||
- for (std::size_t i = 0; i < nReq; ++i) {
|
||||
- ioVec[i].fOutBytes = reads.at(i).fOutBytes;
|
||||
+ catch(const std::runtime_error &e) {
|
||||
+ Warning("RIoUring", "io_uring is unexpectedly not available because:\n%s", e.what());
|
||||
+ Warning("RRawFileUnix",
|
||||
+ "io_uring setup failed, falling back to blocking I/O in ReadV");
|
||||
+ uring_failed = true;
|
||||
}
|
||||
- return;
|
||||
}
|
||||
- Warning("RRawFileUnix",
|
||||
- "io_uring setup failed, falling back to default ReadV implementation");
|
||||
#endif
|
||||
RRawFile::ReadVImpl(ioVec, nReq);
|
||||
}
|
||||
25
root-use-unique-filenames-in-fillrandom-tutorials.patch
Normal file
25
root-use-unique-filenames-in-fillrandom-tutorials.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From b781f954ac80cc227777992dcb4fbe1837c7e351 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Tue, 29 Mar 2022 15:44:17 +0200
|
||||
Subject: [PATCH] Use unique filenames in fillrandom.py and fillrandom.C
|
||||
|
||||
---
|
||||
tutorials/hist/fillrandom.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tutorials/hist/fillrandom.py b/tutorials/hist/fillrandom.py
|
||||
index d5eb3f6f38..4b1a94a37e 100644
|
||||
--- a/tutorials/hist/fillrandom.py
|
||||
+++ b/tutorials/hist/fillrandom.py
|
||||
@@ -41,7 +41,7 @@ h1f.FillRandom("sqroot",10000)
|
||||
h1f.Draw()
|
||||
c1.Update()
|
||||
|
||||
-f = ROOT.TFile("fillrandom.root","RECREATE")
|
||||
+f = ROOT.TFile("fillrandom-py.root","RECREATE")
|
||||
form1.Write()
|
||||
sqroot.Write()
|
||||
h1f.Write()
|
||||
--
|
||||
2.35.1
|
||||
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
From 44c501ac9fdb9049783d9738a9603eec572f52f0 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Rembser <jonas.rembser@cern.ch>
|
||||
Date: Wed, 26 Nov 2025 18:11:25 +0100
|
||||
Subject: [PATCH] [vecops] Adaptive size of long RVec instances in RVec test
|
||||
|
||||
For the tests to make sense, some vectors need to be longer than the
|
||||
maximum small vector size. This maximum size is compiler and
|
||||
architecture dependent. For `RVec<int>` on ARM64 with gcc 14, the
|
||||
small vector capacity turns out to be 60, which is larger than the
|
||||
current test vector size of 18.
|
||||
|
||||
Therefore, the test is refactored to adapt the large vector size
|
||||
automatically, according to the maximum small vector size.
|
||||
---
|
||||
math/vecops/test/vecops_rvec.cxx | 81 +++++++++++++++++++++++++-------
|
||||
1 file changed, 63 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/math/vecops/test/vecops_rvec.cxx b/math/vecops/test/vecops_rvec.cxx
|
||||
index 432c673a553..8cbe36ee6d8 100644
|
||||
--- a/math/vecops/test/vecops_rvec.cxx
|
||||
+++ b/math/vecops/test/vecops_rvec.cxx
|
||||
@@ -1672,15 +1672,35 @@ TEST_P(VecOpsSwap, BothSmallVectors)
|
||||
|
||||
TEST_P(VecOpsSwap, BothRegularVectors)
|
||||
{
|
||||
- RVec<int> fixed_vreg1{1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3};
|
||||
- RVec<int> fixed_vreg2{4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
|
||||
- RVec<int> fixed_vreg3{7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7};
|
||||
+ constexpr std::size_t smallVecSize = ROOT::Internal::VecOps::RVecInlineStorageSize<int>::value;
|
||||
+
|
||||
+ // The number of elemens in the large RVecs will be the smallest multiple of
|
||||
+ // three that larger than smallVecSize.
|
||||
+ constexpr int nCycle = 3;
|
||||
+ constexpr std::size_t nElems = ((smallVecSize / nCycle) + 1) * nCycle;
|
||||
+
|
||||
+ RVec<int> fixed_vreg1(nElems);
|
||||
+ RVec<int> fixed_vreg2(nElems);
|
||||
+ RVec<int> fixed_vreg3(nElems + 1);
|
||||
RVec<int> fixed_vmocksmall{0, 7};
|
||||
|
||||
- RVec<int> vreg1{1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3};
|
||||
- RVec<int> vreg2{4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
|
||||
- RVec<int> vreg3{7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7};
|
||||
- RVec<int> vmocksmall{0, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 7, 8, 9, 7, 8, 9};
|
||||
+ RVec<int> vreg1(nElems);
|
||||
+ RVec<int> vreg2(nElems);
|
||||
+ RVec<int> vreg3(nElems + 1);
|
||||
+ RVec<int> vmocksmall(nElems + 1);
|
||||
+
|
||||
+ for (std::size_t i = 0; i < nElems; ++i) {
|
||||
+ vreg1[i] = (i % nCycle) + 1;
|
||||
+ vreg2[i] = vreg1[i] + nCycle;
|
||||
+ vreg3[i] = vreg2[i] + nCycle;
|
||||
+ fixed_vreg1[i] = vreg1[i];
|
||||
+ fixed_vreg2[i] = vreg2[i];
|
||||
+ fixed_vreg3[i] = vreg3[i];
|
||||
+ vmocksmall[i + 1] = vreg3[i];
|
||||
+ }
|
||||
+ fixed_vreg3[nElems] = fixed_vreg3[0];
|
||||
+ vreg3[nElems] = vreg3[0];
|
||||
+
|
||||
vmocksmall.erase(vmocksmall.begin() + 2, vmocksmall.end());
|
||||
// vmocksmall is a regular vector of size 2
|
||||
|
||||
@@ -1798,11 +1818,22 @@ TEST_P(VecOpsSwap, BothAdoptingVectors)
|
||||
// in cases where ROOT::VecOps::swap produces 1 regular and 1 adopting vector
|
||||
TEST_P(VecOpsSwap, SmallRegularVectors)
|
||||
{
|
||||
+ constexpr std::size_t smallVecSize = ROOT::Internal::VecOps::RVecInlineStorageSize<int>::value;
|
||||
+
|
||||
+ // The number of elemens in the large RVecs will be the smallest multiple of
|
||||
+ // three that larger than smallVecSize.
|
||||
+ constexpr int nCycle = 3;
|
||||
+ constexpr std::size_t nElems1 = ((smallVecSize / nCycle) + 1) * nCycle;
|
||||
+ constexpr std::size_t nElems2 = nElems1 + nCycle; // some vectors should be larger than others
|
||||
+
|
||||
RVec<int> fixed_vsmall{1, 2, 3};
|
||||
RVec<int> fixed_vreg1{4, 5, 6};
|
||||
RVec<int> fixed_vreg2{7, 8};
|
||||
RVec<int> fixed_vreg3{9, 10, 11, 12, 13, 14};
|
||||
- RVec<int> fixed_vreg4{15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
|
||||
+ RVec<int> fixed_vreg4(nElems1);
|
||||
+ for (std::size_t i = 0; i < nElems1; ++i) {
|
||||
+ fixed_vreg4[i] = i + 15;
|
||||
+ }
|
||||
|
||||
// need multiple hard copies since after swap of a small and a regular,
|
||||
// there is no fixed policy whether 2 regular vectors are produced or 1 small and 1 regular
|
||||
@@ -1815,19 +1846,33 @@ TEST_P(VecOpsSwap, SmallRegularVectors)
|
||||
RVec<int> vsmall7{1, 2, 3};
|
||||
RVec<int> vsmall8{1, 2, 3};
|
||||
|
||||
- RVec<int> vreg1{4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
|
||||
- vreg1.erase(vreg1.begin() + 3, vreg1.end()); // regular vector of size 3
|
||||
- RVec<int> vreg10{4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
|
||||
+ RVec<int> vreg1;
|
||||
+ RVec<int> vreg10;
|
||||
+ RVec<int> vreg2{7, 8};
|
||||
+ RVec<int> vreg20{7, 8};
|
||||
+ RVec<int> vreg3{9, 10, 11, 12, 13, 14};
|
||||
+ RVec<int> vreg30{9, 10, 11, 12, 13, 14};
|
||||
+ RVec<int> vreg4(nElems1);
|
||||
+
|
||||
+ for (std::size_t i = 0; i < nElems2; ++i) {
|
||||
+ double val = (i % nCycle) + 4;
|
||||
+ vreg1.push_back(val);
|
||||
+ vreg10.push_back(vreg1.back());
|
||||
+ vreg2.push_back(val);
|
||||
+ vreg20.push_back(vreg2.back());
|
||||
+ vreg3.push_back(val);
|
||||
+ vreg30.push_back(vreg3.back());
|
||||
+ }
|
||||
+ for (std::size_t i = 0; i < nElems1; ++i) {
|
||||
+ vreg4[i] = i + 15;
|
||||
+ }
|
||||
+
|
||||
+ vreg1.erase(vreg1.begin() + 3, vreg1.end()); // regular vector of size 3
|
||||
vreg10.erase(vreg10.begin() + 3, vreg10.end()); // regular vector of size 3
|
||||
- RVec<int> vreg2{7, 8, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
|
||||
- vreg2.erase(vreg2.begin() + 2, vreg2.end()); // regular vector of size 2
|
||||
- RVec<int> vreg20{7, 8, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
|
||||
+ vreg2.erase(vreg2.begin() + 2, vreg2.end()); // regular vector of size 2
|
||||
vreg20.erase(vreg20.begin() + 2, vreg20.end()); // regular vector of size 2
|
||||
- RVec<int> vreg3{9, 10, 11, 12, 13, 14, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
|
||||
- vreg3.erase(vreg3.begin() + 6, vreg3.end()); // regular vector of size 6
|
||||
- RVec<int> vreg30{9, 10, 11, 12, 13, 14, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
|
||||
+ vreg3.erase(vreg3.begin() + 6, vreg3.end()); // regular vector of size 6
|
||||
vreg30.erase(vreg30.begin() + 6, vreg30.end()); // regular vector of size 6
|
||||
- RVec<int> vreg4{15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
|
||||
// vreg4 is a regular vector that cannot "fit" to small vector
|
||||
|
||||
// verify that initially vectors are not small
|
||||
--
|
||||
2.52.0
|
||||
|
||||
5
sources
5
sources
|
|
@ -1,3 +1,2 @@
|
|||
SHA512 (root-6.38.00.tar.xz) = 7c452b509e8171a0cbb7c102a3d4c07333fc8535f1b2c2ab0b9f7434604f098989a78bb71c41039dd41dbbd3438ea8703939826092f075d9d730b6b53c84ac55
|
||||
SHA512 (root-testfiles.tar.xz) = 4bb7f8ca00b1427ba49f6428e9cfe5908a2ffdd2ce4134d3bc169a0629198352b5500fe0cf92c121d148e5af41f7016c96038a77794a4d37d94e6ec0a9d75670
|
||||
SHA512 (clad-2.2.tar.gz) = 6f76d706a829901fc0fcdb38b5ddad6ea8ad9186ea48a4b6b585fc62974a2cda11b96a448c25daaba0586962d6428773e7ab751236c6afa72a91d12f30f2d05e
|
||||
SHA512 (root-6.24.08.tar.xz) = 88d289bf360557b9e8e006975d108d12aa9b08003d2ddccd4cb40290cc6a09d6c41daa4525432a8914f0573fe436b616a60f31d28637f20b85a1bf3d8e9aa415
|
||||
SHA512 (root-testfiles.tar.xz) = 945aef1a0cf5af672d4ab84b0ac00b76118e93008ff72447658ee82d9e955a1540af3ff7126e701418872f1d91b92ee96d4985840a519036c42732023a13f00f
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue