From 11c2d5ecf39cc4b238d4a4c58c1e756d07aa61c9 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Fri, 19 Aug 2022 13:28:38 +0200 Subject: [PATCH] spns #29880 - compile ParaView 5.9 with Python 3.10 --- applications/SALOME-master-native.pyconf | 1 + products/ParaView.pyconf | 25 +++ ...paraview-5.9.0-python-3.10.Py_REFCNT.patch | 161 ++++++++++++++++++ 3 files changed, 187 insertions(+) create mode 100644 products/patches/paraview-5.9.0-python-3.10.Py_REFCNT.patch diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index cd63f81..e03a1aa 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -223,6 +223,7 @@ __overwrite__ : 'APPLICATION.rm_products' : ['mesa'] 'APPLICATION.products.omniORB' : '4.2.5' 'APPLICATION.products.omniORBpy' : '4.2.5' + 'APPLICATION.products.ParaView' : {tag: '5.9.0', base: 'no', section: 'version_5_9_0_UB22_04', hpc: 'yes'} } { # DB10: diff --git a/products/ParaView.pyconf b/products/ParaView.pyconf index 9a56c09..d8dadef 100755 --- a/products/ParaView.pyconf +++ b/products/ParaView.pyconf @@ -319,6 +319,31 @@ version_5_9_0_FD32 : ] } +version_5_9_0_UB22_04 : +{ + compil_script : 'ParaView-5.9.0.sh' + archive_info : {archive_name : "ParaView-5.9.0-lata.tar.gz"} + # two other LATA patches already included in archive + patches : ['paraview.0003-ParaViewClient.patch', + 'paraview.0004-ParaView_hdf5.patch', + 'paraview.0005-ParaView_find_cgns.patch', + 'paraview.0006-ParaView_find_libxml2.patch', + 'paraview.0007-ParaView_find_freetype.patch', + 'paraview-5.9-VTKM_MPI.patch', + 'paraview.0010-ParaView_CATALYST_cmake.patch', + 'paraview.0008-ParaView_coincident_rendering.patch', + 'paraview.0011-ParaView_protobuf_crash.patch', + 'paraview.0015-Paraview_VTKM_ioss.patch', + 'paraview-5.9.0-gcc.11.0.patch', + 'paraview.0017-VTK-openMPI-if-devtoolset.patch', + 'paraview.0018-spns-26351-autoconvert.patch', + 'paraview.0019-spns-26344-VTK-OpenMP.patch', + 'paraview.0020.findMPI.patch', + 'paraview.0021-FindGDAL.patch', + 'paraview-5.9.0-python-3.10.Py_REFCNT.patch' + ] +} + version_5_9_0_UB20_04 : { compil_script : 'ParaView-5.9.0.sh' diff --git a/products/patches/paraview-5.9.0-python-3.10.Py_REFCNT.patch b/products/patches/paraview-5.9.0-python-3.10.Py_REFCNT.patch new file mode 100644 index 0000000..4d8dcd1 --- /dev/null +++ b/products/patches/paraview-5.9.0-python-3.10.Py_REFCNT.patch @@ -0,0 +1,161 @@ +diff -Naur ParaView-5.9.0-ref/VTK/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c ParaView-5.9.0-new//VTK/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c +--- ParaView-5.9.0-ref/VTK/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c 2021-02-04 15:22:04.000000000 +0100 ++++ ParaView-5.9.0-new//VTK/ThirdParty/mpi4py/vtkmpi4py/src/mpi4py.MPI.c 2022-08-19 13:11:53.452998255 +0200 +@@ -496,6 +496,13 @@ + #ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) + #endif ++#if PY_VERSION_HEX >= 0x030900A4 ++ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) ++ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) ++#else ++ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) ++ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) ++#endif + #if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #else +@@ -154207,9 +154214,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_8Datatype_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +@@ -154497,9 +154504,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_7Request_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->ob_buf); +@@ -154877,9 +154884,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_7Message_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->ob_buf); +@@ -155073,9 +155080,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_2Op_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +@@ -155260,9 +155267,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_5Group_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +@@ -155456,9 +155463,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_4Info_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +@@ -155675,9 +155682,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_10Errhandler_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +@@ -155845,9 +155852,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_4Comm_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +@@ -156860,9 +156867,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_3Win_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->ob_mem); +@@ -157166,9 +157173,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_4File_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +@@ -157436,9 +157443,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_6memory_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +@@ -157609,9 +157616,9 @@ + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); +- ++Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_6mpi4py_3MPI_6_p_mem_3__dealloc__(o); +- --Py_REFCNT(o); ++ Py_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); -- 2.39.2