]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #33000: fix PyImport_ImportModule segmentation fault (ParaView 5.11.0) + Handle...
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 1 Dec 2022 09:55:04 +0000 (10:55 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 1 Dec 2022 09:55:04 +0000 (10:55 +0100)
products/ParaView.pyconf
products/compil_scripts/ParaView-5.9.0.sh
products/patches/paraview-5.11.0.p006-GIL.patch [new file with mode: 0644]

index 94aa8c00569ee9a2bd31c245284c343ddaf07940..1189c164c3dbf74318dff6a68c3adbbaf5346468 100755 (executable)
@@ -36,7 +36,8 @@ version_5_11_0 :
     archive_info : {archive_name : "ParaView-5.11.0.tar.gz"}
     patches : [
                'paraview-5.11.0.p001-FindCGNS.patch',
-               'paraview-5.11.0.p003-ParaViewClient.patch'
+               'paraview-5.11.0.p003-ParaViewClient.patch',
+               'paraview-5.11.0.p006-GIL.patch'
               ]
     depend : [
               'Python',
@@ -60,7 +61,8 @@ version_5_11_0_int32 :
     archive_info : {archive_name : "ParaView-5.11.0.tar.gz"}
     # two other LATA patches already included in archive
     patches : [
-               'paraview-5.11.0.p001-FindCGNS.patch'
+               'paraview-5.11.0.p001-FindCGNS.patch',
+               'paraview-5.11.0.p006-GIL.patch'
               ]
     depend : [
               'Python',
@@ -97,7 +99,8 @@ version_5_11_0_win :
     opt_depend : ['openmpi', 'ospray','tbb', 'openturns', 'rkCommon', 'matplotlib']
     patches : ['paraview-5.11.0.p001-FindCGNS.patch',
                'paraview-5.11.0.p002-FindMPI.patch',
-               'paraview-5.11.0.p004-vtkUniformHyperTreeGrid.patch'
+               'paraview-5.11.0.p004-vtkUniformHyperTreeGrid.patch',
+               'paraview-5.11.0.p006-GIL.patch'
               ]
 }
 
@@ -121,7 +124,8 @@ version_5_11_0_win_dbg :
     patches : ['paraview-5.11.0.p001-FindCGNS.patch',
                'paraview-5.11.0.p002-FindMPI.patch',
                'paraview-5.11.0.p004-vtkUniformHyperTreeGrid.patch',
-               'paraview-5.11.0.p005-vtkPython-debug.patch'
+               'paraview-5.11.0.p005-vtkPython-debug.patch',
+               'paraview-5.11.0.p006-GIL.patch'
               ]
 }
 
@@ -154,7 +158,8 @@ version_5_11_0_MPI_LATA_64BITS_IDS :
     archive_info : {archive_name : "ParaView-5.11.0.tar.gz"}
     patches : ['paraview-5.11.0.p001-FindCGNS.patch',
                'paraview-5.11.0.p002-FindMPI.patch',
-               'paraview-0012-LATA_64BITS_IDS.patch'
+               'paraview-0012-LATA_64BITS_IDS.patch',
+               'paraview-5.11.0.p006-GIL.patch'
               ]
 }
 
@@ -164,7 +169,8 @@ version_5_11_0_MPI_DB10 :
     archive_info : {archive_name : "ParaView-5.11.0.tar.gz"}
     patches : ['paraview-5.11.0.p001-FindCGNS.patch',
                'paraview-5.11.0.p002-FindMPI.patch',
-               'paraview-5.11.0.p003-ParaViewClient.patch'
+               'paraview-5.11.0.p003-ParaViewClient.patch',
+               'paraview-5.11.0.p006-GIL.patch'
                 ]
     depend : [
               'Python',
@@ -188,7 +194,8 @@ version_5_11_0_MPI_CO8 :
     archive_info : {archive_name : "ParaView-5.11.0.tar.gz"}
     patches : ['paraview-5.11.0.p001-FindCGNS.patch',
                'paraview-5.11.0.p002-FindMPI.patch',
-               'paraview-5.11.0.p003-ParaViewClient.patch'
+               'paraview-5.11.0.p003-ParaViewClient.patch',
+               'paraview-5.11.0.p006-GIL.patch'
               ]
     depend : [
               'Python',
index 8cffe1c5936095185f53dd2ee97c803b72c76a71..7956604785efc325284e03ff0afa0f053b5bfc65 100755 (executable)
@@ -274,6 +274,12 @@ if [ -n "$NETCDF_ROOT_DIR" ]; then
     CMAKE_OPTIONS+=" -DVTK_MODULE_ENABLE_VTK_FiltersParallelGeometry=YES"
 fi
 
+if [ "${SALOME_APPLICATION_NAME}" == "ALAMOS" ]; then
+    echo "WARNING: Assumming application is ALAMOS, switching on PDF export..."
+    CMAKE_OPTIONS+=" -DVTK_MODULE_ENABLE_VTK_PythonContext2D=YES"
+    CMAKE_OPTIONS+=" -DVTK_MODULE_ENABLE_VTK_IOExportPDF=YES"
+fi
+
 echo
 echo "*** cmake" ${CMAKE_OPTIONS}
 cmake ${CMAKE_OPTIONS} $SOURCE_DIR
diff --git a/products/patches/paraview-5.11.0.p006-GIL.patch b/products/patches/paraview-5.11.0.p006-GIL.patch
new file mode 100644 (file)
index 0000000..b12d7bc
--- /dev/null
@@ -0,0 +1,10 @@
+--- ParaView_ref/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx   2022-12-01 10:35:02.476305685 +0100
++++ ParaView_dev/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx   2022-12-01 10:35:41.811632384 +0100
+@@ -790,6 +790,7 @@
+ //------------------------------------------------------------------------------
+ bool vtkMatplotlibMathTextUtilities::SetMathTextFont(vtkTextProperty* tprop)
+ {
++  vtkPythonScopeGilEnsurer gilEnsurer;
+   vtkSmartPyObject mplBase(PyImport_ImportModule("matplotlib"));
+   if (this->CheckForError(mplBase))
+   {