]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
- numpy 1.20: np.float removed - https://numpy.org/devdocs/release/1.20.0-notes.html... ng780475/numpy.float
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 15 Jan 2024 13:33:51 +0000 (14:33 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 15 Jan 2024 13:33:51 +0000 (14:33 +0100)
- gdal: compilation script: ensure no lib64 directory is present.
- medfile: on fedora, presence of lib64\n-nlopt: on fedora, presence of lib64.

15 files changed:
applications/SALOME-9.12.0-native.pyconf
applications/SALOME-master-native.pyconf
products/HOMARD.pyconf
products/PyFMI.pyconf
products/SHAPER.pyconf
products/SOLVERLAB.pyconf
products/compil_scripts/gdal-2.4.0.sh
products/compil_scripts/gdal-2.4.4.sh
products/compil_scripts/med-4.1.1.sh
products/compil_scripts/nlopt-2.5.0.sh
products/compil_scripts/nlopt-2.6.0.sh
products/patches/HOMARD-V9_12_0-numpy-1.20.-np.float.patch [new file with mode: 0644]
products/patches/PyFMI-2.6-numpy-1.20-np.float.patch [new file with mode: 0644]
products/patches/SHAPER-V9_12_0-numpy-1.20-np.float.patch [new file with mode: 0644]
products/patches/SOLVERLAB-V9_12_0-numpy-1.20.-np.float.patch [new file with mode: 0644]

index 7a88ef4acf61af876f2cfed0b0f79fa7d28c2a38..013501c5246cd043fad6a69e19ce8c16624574ca 100644 (file)
@@ -267,6 +267,9 @@ __overwrite__ :
         'APPLICATION.products.nlopt'            : '2.5.0'
         'APPLICATION.products.openturns'        : {tag: '1.21',  base: 'no', section: 'version_1_21_DB12'        }
         'APPLICATION.products.ParaView'         : {tag: '5.11.0',    base: 'no', section: 'version_5_11_0_MPI_DB12', hpc: 'yes' }
+        'APPLICATION.products.HOMARD'           : {tag: 'V9_12_0',   base: 'no', section: 'version_V9_12_0_DB12'}
+        'APPLICATION.products.SHAPER'           : {tag: 'V9_12_0',   base: 'no', section: 'version_V9_12_0_DB12'}
+        'APPLICATION.products.SOLVERLAB'        : {tag: 'V9_12_0',   base: 'no', section: 'version_V9_12_0_DB12'}
     }
     {
         # CentOS 8 repositories don't include sphinxintl package which must be installed through pip.
index c39c73e22757c2f7519eba1f6d92ad652a5fb89e..33fb4bf07cdb62ccc4d3bbf90f470217fe0455dc 100644 (file)
@@ -267,6 +267,9 @@ __overwrite__ :
         'APPLICATION.products.nlopt'            : '2.5.0'
         'APPLICATION.products.openturns'        : {tag: '1.21',  base: 'no', section: 'version_1_21_DB12'        }
         'APPLICATION.products.ParaView'         : {tag: '5.11.0',    base: 'no', section: 'version_5_11_0_MPI_DB12', hpc: 'yes' }
+        'APPLICATION.products.HOMARD'           : {tag: 'master',   base: 'no', section: 'version_master_DB12'}
+        'APPLICATION.products.SHAPER'           : {tag: 'master',   base: 'no', section: 'version_master_DB12'}
+        'APPLICATION.products.SOLVERLAB'        : {tag: 'master',   base: 'no', section: 'version_master_DB12'}
     }
     {
         # CentOS 8 repositories don't include sphinxintl package which must be installed through pip.
index 4b5964f0520fb10421261d92614c96664915703e..4d2410ac321d3c9073ea0fb9a8de84b000bae90d 100644 (file)
@@ -40,6 +40,16 @@ default_MPI :
   opt_depend : ['openmpi']
 }
 
+version_master_DB12 :
+{
+    patches : ['HOMARD-V9_12_0-numpy-1.20.-np.float.patch']
+}
+
+version_V9_12_0_DB12 :
+{
+    patches : ['HOMARD-V9_12_0-numpy-1.20.-np.float.patch']
+}
+
 version_V9_10_0_MPI :
 {
   cmake_options : "-DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER} -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER} -DSALOME_USE_MPI=ON "
index f30da845d8b49925126ef792b3de0fc228256f31..c22857a58e823865b31c7af59050e0fe45d08ced 100644 (file)
@@ -53,7 +53,7 @@ version_2_6_win :
 
 version_2_6_DB12:
 {
-    patches: ['pyfmi-2.6-python-3.1x.01.patch']
+    patches: ['pyfmi-2.6-python-3.1x.01.patch', 'PyFMI-2.6-numpy-1.20-np.float.patch']
     compil_script : "PyFMI-2.6.sh"
     properties:
     {
index 4e98383fe53085825e91d664b65075afe31e6c10..a1b7ced3278c96009891f5bca79d57a6f7af7590 100644 (file)
@@ -53,6 +53,16 @@ default_win :
     cmake_options :   " -DNO_SolveSpace=TRUE  -DSWIG_EXECUTABLE=%SWIG_ROOT_DIR:\=/%/bin/swig.exe " 
 }
 
+version_master_DB12 :
+{
+    patches : ['SHAPER-V9_12_0-numpy-1.20-np.float.patch']
+}
+
+version_V9_12_0_DB12 :
+{
+    patches : ['SHAPER-V9_12_0-numpy-1.20-np.float.patch']
+}
+
 version_V9_10_0_FD37:
 {
   patches : ['SPNS-32377-SHAPER-V9_10_0-FD37.patch']
index 48d18edc36d4b349d7a8754fe49e62b1ec0be415..ecb662fec8603930b037fa1a433bcb2bf0a54563 100644 (file)
@@ -60,6 +60,16 @@ default_MPI :
     opt_depend : ['mpi4py']
 }
 
+version_master_DB12 :
+{
+    patches : ['SOLVERLAB-V9_12_0-numpy-1.20.-np.float.patch']
+}
+
+version_V9_12_0_DB12 :
+{
+    patches : ['SOLVERLAB-V9_12_0-numpy-1.20.-np.float.patch']
+}
+
 version_V9_10_0 :
 {
     properties:
index 1c2fd54d0e120d8c88e732f568b89bf46af1ec1c..bfc9850f5b0b80a5484b05f75a6b74e0ee7c6bc5 100755 (executable)
@@ -63,6 +63,21 @@ then
     exit 3
 fi
 
+# finally ensure a consistent installation
+if [ -d "${PRODUCT_INSTALL}/lib64" ]; then
+    echo "WARNING: moving lib64 to lib"
+    mv ${PRODUCT_INSTALL}/lib64/* ${PRODUCT_INSTALL}/lib/
+    rm -rf ${PRODUCT_INSTALL}/lib64
+elif [ -d "${PRODUCT_INSTALL}/local/lib64" ]; then
+    echo "WARNING: moving local/lib64 to lib"
+    mv ${PRODUCT_INSTALL}/local/lib64/* ${PRODUCT_INSTALL}/lib/
+    rm -rf ${PRODUCT_INSTALL}/local/lib64
+fi
+
+if [ -d ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ]; then
+    mv ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages
+fi
+
 echo
 echo "########## END"
 
index 675a4561d13b8e8c51af1eebf7079f81172fe622..6cf1e2c884c667224b610521db90359a1c115919 100755 (executable)
@@ -64,6 +64,21 @@ then
     exit 3
 fi
 
+# finally ensure a consistent installation
+if [ -d "${PRODUCT_INSTALL}/lib64" ]; then
+    echo "WARNING: moving lib64 to lib"
+    mv ${PRODUCT_INSTALL}/lib64/* ${PRODUCT_INSTALL}/lib/
+    rm -rf ${PRODUCT_INSTALL}/lib64
+elif [ -d "${PRODUCT_INSTALL}/local/lib64" ]; then
+    echo "WARNING: moving local/lib64 to lib"
+    mv ${PRODUCT_INSTALL}/local/lib64/* ${PRODUCT_INSTALL}/lib/
+    rm -rf ${PRODUCT_INSTALL}/local/lib64
+fi
+
+if [ -d ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ]; then
+    mv ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages
+fi
+
 echo
 echo "########## END"
 
index b3155aa250d310912964ac98de68b4e816f72a2b..f9cd344f8512c46b8d7b088dcd4c7af0ca3055e5 100755 (executable)
@@ -76,6 +76,19 @@ case $LINUX_DISTRIBUTION in
         ;;
 esac
 
+if [ -d "${PRODUCT_INSTALL}/lib64" ]; then
+    echo "WARNING: moving lib64 to lib"
+    mv ${PRODUCT_INSTALL}/lib64/* ${PRODUCT_INSTALL}/lib/
+    rm -rf ${PRODUCT_INSTALL}/lib64
+elif [ -d "${PRODUCT_INSTALL}/local/lib64" ]; then
+    echo "WARNING: moving local/lib64 to lib"
+    mv ${PRODUCT_INSTALL}/local/lib64/* ${PRODUCT_INSTALL}/lib/
+    rm -rf ${PRODUCT_INSTALL}/local/lib64
+fi
+
+if [ -d ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ]; then
+    mv ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages
+fi
 
 #TODO: figure out which environment variable uses this dist-dir
 if [ -d $PRODUCT_INSTALL/local/lib/python${PYTHON_VERSION} ]; then
index 856bbd179e1558fa8d7eb93a0ea16d99f701b086..1fca7b90773146d1627885c888bae2d9069b4c9a 100755 (executable)
@@ -56,6 +56,37 @@ then
     exit 3
 fi
 
+if [ -d "${PRODUCT_INSTALL}/lib64" ]; then
+    echo "WARNING: moving lib64 to lib"
+    mv ${PRODUCT_INSTALL}/lib64/* ${PRODUCT_INSTALL}/lib/
+    rm -rf ${PRODUCT_INSTALL}/lib64
+elif [ -d "${PRODUCT_INSTALL}/local/lib64" ]; then
+    echo "WARNING: moving local/lib64 to lib"
+    mv ${PRODUCT_INSTALL}/local/lib64/* ${PRODUCT_INSTALL}/lib/
+    rm -rf ${PRODUCT_INSTALL}/local/lib64
+fi
+
+if [ -d ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ]; then
+    mv ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages
+fi
+
+#TODO: figure out which environment variable uses this dist-dir
+if [ -d $PRODUCT_INSTALL/local/lib/python${PYTHON_VERSION} ]; then
+    mv $PRODUCT_INSTALL/local/lib/python${PYTHON_VERSION} $PRODUCT_INSTALL/lib
+fi
+if [ -d $PRODUCT_INSTALL/local/bin ]; then
+    mv $PRODUCT_INSTALL/local/bin/* $PRODUCT_INSTALL/bin
+fi
+if [ -d $PRODUCT_INSTALL/local/share ]; then
+    mv $PRODUCT_INSTALL/local/share/* $PRODUCT_INSTALL/share
+fi
+if [ -d $PRODUCT_INSTALL/local ]; then
+    rm -rf $PRODUCT_INSTALL/local
+fi
+if [ -d $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/dist-packages ]; then
+    mv $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/dist-packages $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages
+fi
+
 echo
 echo "########## END"
 
index 856bbd179e1558fa8d7eb93a0ea16d99f701b086..1fca7b90773146d1627885c888bae2d9069b4c9a 100755 (executable)
@@ -56,6 +56,37 @@ then
     exit 3
 fi
 
+if [ -d "${PRODUCT_INSTALL}/lib64" ]; then
+    echo "WARNING: moving lib64 to lib"
+    mv ${PRODUCT_INSTALL}/lib64/* ${PRODUCT_INSTALL}/lib/
+    rm -rf ${PRODUCT_INSTALL}/lib64
+elif [ -d "${PRODUCT_INSTALL}/local/lib64" ]; then
+    echo "WARNING: moving local/lib64 to lib"
+    mv ${PRODUCT_INSTALL}/local/lib64/* ${PRODUCT_INSTALL}/lib/
+    rm -rf ${PRODUCT_INSTALL}/local/lib64
+fi
+
+if [ -d ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ]; then
+    mv ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/dist-packages ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages
+fi
+
+#TODO: figure out which environment variable uses this dist-dir
+if [ -d $PRODUCT_INSTALL/local/lib/python${PYTHON_VERSION} ]; then
+    mv $PRODUCT_INSTALL/local/lib/python${PYTHON_VERSION} $PRODUCT_INSTALL/lib
+fi
+if [ -d $PRODUCT_INSTALL/local/bin ]; then
+    mv $PRODUCT_INSTALL/local/bin/* $PRODUCT_INSTALL/bin
+fi
+if [ -d $PRODUCT_INSTALL/local/share ]; then
+    mv $PRODUCT_INSTALL/local/share/* $PRODUCT_INSTALL/share
+fi
+if [ -d $PRODUCT_INSTALL/local ]; then
+    rm -rf $PRODUCT_INSTALL/local
+fi
+if [ -d $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/dist-packages ]; then
+    mv $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/dist-packages $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages
+fi
+
 echo
 echo "########## END"
 
diff --git a/products/patches/HOMARD-V9_12_0-numpy-1.20.-np.float.patch b/products/patches/HOMARD-V9_12_0-numpy-1.20.-np.float.patch
new file mode 100644 (file)
index 0000000..3a6dbed
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/src/tests/Test/test_5.py b/src/tests/Test/test_5.py
+index 01baaa9..af1ec47 100755
+--- a/src/tests/Test/test_5.py
++++ b/src/tests/Test/test_5.py
+@@ -179,7 +179,7 @@ Python script for MEDCoupling
+     cg_hexa = cg_hexa_ml.toNumPyArray()
+ # Target
+ # ======
+-    xyz_p = np.zeros(3, dtype=np.float)
++    xyz_p = np.zeros(3, dtype=np.float32)
+     xyz_p[0] = -0.20*float(1-niter) * LG_X
+     xyz_p[1] = -0.15*float(1-niter) * LG_Y
+     xyz_p[2] = -0.10*float(1-niter) * LG_Z
diff --git a/products/patches/PyFMI-2.6-numpy-1.20-np.float.patch b/products/patches/PyFMI-2.6-numpy-1.20-np.float.patch
new file mode 100644 (file)
index 0000000..e30db41
--- /dev/null
@@ -0,0 +1,11 @@
+--- PyFMI-2.6_ref/src/pyfmi/fmi_coupled.pyx    2024-01-15 10:37:54.999574589 +0100
++++ PyFMI-2.6_dev/src/pyfmi/fmi_coupled.pyx    2024-01-15 10:37:43.735520048 +0100
+@@ -1004,7 +1004,7 @@
+         Calls the low-level FMI function: fmi2SetReal
+         """
+         input_valueref = np.array(valueref, ndmin=1).ravel()
+-        set_value      = np.array(values, dtype=np.float, ndmin=1).ravel()
++        set_value      = np.array(values, dtype=np.float64, ndmin=1).ravel()
+         if input_valueref.size != set_value.size:
+             raise fmi.FMUException('The length of valueref and values are inconsistent.')
diff --git a/products/patches/SHAPER-V9_12_0-numpy-1.20-np.float.patch b/products/patches/SHAPER-V9_12_0-numpy-1.20-np.float.patch
new file mode 100644 (file)
index 0000000..69cb4df
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/src/PythonAddons/macros/pipeNetwork/feature.py b/src/PythonAddons/macros/pipeNetwork/feature.py
+index 1ff9ec621..6fddccc34 100755
+--- a/src/PythonAddons/macros/pipeNetwork/feature.py
++++ b/src/PythonAddons/macros/pipeNetwork/feature.py
+@@ -232,7 +232,7 @@ Sorties :
+                 coox = self.infoPoints[l_noeuds[iaux+jaux]]["X"]
+                 cooy = self.infoPoints[l_noeuds[iaux+jaux]]["Y"]
+                 cooz = self.infoPoints[l_noeuds[iaux+jaux]]["Z"]
+-                vect.append(np.array((coox,cooy,cooz),np.float))
++                vect.append(np.array((coox,cooy,cooz),np.float32))
+             cosinus = np.dot(vect[1]-vect[0],vect[1]-vect[2])/(np.linalg.norm(vect[1]-vect[0])* np.linalg.norm(vect[1]-vect[2]))
+             #print ("cosinus = {}".format(cosinus))
+             # Si l'angle est plat, c'est que les 3 points sont alignés : on arrête... sauf si ce point est un départ d'une autre !
diff --git a/products/patches/SOLVERLAB-V9_12_0-numpy-1.20.-np.float.patch b/products/patches/SOLVERLAB-V9_12_0-numpy-1.20.-np.float.patch
new file mode 100644 (file)
index 0000000..cee329b
--- /dev/null
@@ -0,0 +1,26 @@
+diff --git a/CDMATH/tests/doc/3DPoissonEF/FiniteElements3DPoisson_CUBE.html b/CDMATH/tests/doc/3DPoissonEF/FiniteElements3DPoisson_CUBE.html
+index a33c3d7..f738ac2 100644
+--- a/CDMATH/tests/doc/3DPoissonEF/FiniteElements3DPoisson_CUBE.html
++++ b/CDMATH/tests/doc/3DPoissonEF/FiniteElements3DPoisson_CUBE.html
+@@ -12105,7 +12105,7 @@ A. Hannukainen, S. Korotov, M. Křı́žek, Maximum angle condition is not neces
+ <span class="c1">#Here are: Sparse matrix using scipy and vector using numpy </span>
+ <span class="c1">#==========================================================</span>
+ <span class="c1">#B = np.zeros(nbInteriorNodes)</span>
+-<span class="c1">#A = coo_matrix((nbInteriorNodes, nbInteriorNodes), dtype=np.float).toarray()</span>
++<span class="c1">#A = coo_matrix((nbInteriorNodes, nbInteriorNodes), dtype=np.float64).toarray()</span>
+ <span class="c1"># Vecteurs gradient de la fonction de forme associée à chaque noeud d&#39;un triangle (hypothèse 2D)</span>
+ <span class="n">GradShapeFunc0</span><span class="o">=</span><span class="n">cdmath</span><span class="o">.</span><span class="n">Vector</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span><span class="c1">#en 3D GradShapeFunc0=cdmath.Vector(3)</span>
+diff --git a/CDMATH/tests/doc/3DPoissonEF/FiniteElements3DPoisson_CUBE.ipynb b/CDMATH/tests/doc/3DPoissonEF/FiniteElements3DPoisson_CUBE.ipynb
+index ad39e47..292bfd5 100644
+--- a/CDMATH/tests/doc/3DPoissonEF/FiniteElements3DPoisson_CUBE.ipynb
++++ b/CDMATH/tests/doc/3DPoissonEF/FiniteElements3DPoisson_CUBE.ipynb
+@@ -291,7 +291,7 @@
+     "#Here are: Sparse matrix using scipy and vector using numpy \n",
+     "#==========================================================\n",
+     "#B = np.zeros(nbInteriorNodes)\n",
+-    "#A = coo_matrix((nbInteriorNodes, nbInteriorNodes), dtype=np.float).toarray()\n",
++    "#A = coo_matrix((nbInteriorNodes, nbInteriorNodes), dtype=np.float32).toarray()\n",
+     "\n",
+     "# Vecteurs gradient de la fonction de forme associée à chaque noeud d'un triangle (hypothèse 2D)\n",
+     "GradShapeFunc0=cdmath.Vector(3)#en 3D GradShapeFunc0=cdmath.Vector(3)\n",