]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #33457: SOLVERLAB new GUI
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 9 Feb 2023 13:33:49 +0000 (14:33 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 9 Feb 2023 13:42:40 +0000 (14:42 +0100)
applications/SALOME-master-native.pyconf
products/SOLVERLAB.pyconf
products/SOLVERLABGUI.pyconf [new file with mode: 0644]
products/compil_scripts/SOLVERLAB.sh
products/compil_scripts/packagespy.sh
products/env_scripts/SOLVERLAB.py
products/env_scripts/SOLVERLABGUI.py [new file with mode: 0644]
products/env_scripts/packagespy.py
products/packagespy.pyconf

index 5186a63026e44b31ab0552b479fb369d440c15bf..6cdedd27fe948b29753540a1fc7ba5b850f72f84 100644 (file)
@@ -94,7 +94,7 @@ APPLICATION :
         openturns: '1.19'
         ospray : '2.4.0'
         packaging : 'native'
-        packagespy : '9bb05ac'
+        packagespy : '74152cd'
         pandas : 'native'
         ParaView : {tag:'5.11.0', base: 'no',  section: 'version_5_11_0_MPI', hpc: 'yes'}
         PERSALYS: 'v13.0'
@@ -180,6 +180,7 @@ APPLICATION :
         'YDEFX'
         'pmml'
         'SOLVERLAB'
+        'SOLVERLABGUI'
         'TopIIVolMesh'
         #'TESTBASE'
         'CEATESTBASE' : 'SalomeV9'
index d61c4073c82e212026e2195851f055fb06b90df3..48d18edc36d4b349d7a8754fe49e62b1ec0be415 100644 (file)
@@ -37,7 +37,6 @@ default :
     {
         is_SALOME_module : "yes"
         incremental : "yes"
-        has_salome_gui : "yes"
     }
     patches: []
 }
@@ -61,6 +60,16 @@ default_MPI :
     opt_depend : ['mpi4py']
 }
 
+version_V9_10_0 :
+{
+    properties:
+    {
+        is_SALOME_module : "yes"
+        incremental : "yes"
+        has_salome_gui : "yes"
+    }
+}
+
 version_V9_10_0_MPI :
 {
     depend :
@@ -78,6 +87,22 @@ version_V9_10_0_MPI :
         'openmpi'
     ]
     opt_depend : ['mpi4py']
+    properties:
+    {
+        is_SALOME_module : "yes"
+        incremental : "yes"
+        has_salome_gui : "yes"
+    }
+}
+
+version_V9_9_0 :
+{
+    properties:
+    {
+        is_SALOME_module : "yes"
+        incremental : "yes"
+        has_salome_gui : "yes"
+    }
 }
 
 version_V9_9_0_MPI :
@@ -97,4 +122,20 @@ version_V9_9_0_MPI :
         'openmpi'
     ]
     opt_depend : ['mpi4py']
+    properties:
+    {
+        is_SALOME_module : "yes"
+        incremental : "yes"
+        has_salome_gui : "yes"
+    }
+}
+
+version_V9_8_0 :
+{
+    properties:
+    {
+        is_SALOME_module : "yes"
+        incremental : "yes"
+        has_salome_gui : "yes"
+    }
 }
diff --git a/products/SOLVERLABGUI.pyconf b/products/SOLVERLABGUI.pyconf
new file mode 100644 (file)
index 0000000..6ec27a0
--- /dev/null
@@ -0,0 +1,35 @@
+default :
+{
+    name : "SOLVERLABGUI"
+    build_source : "cmake"
+    build_command :  "-DPython_ROOT_DIR=${PYTHON_ROOT_DIR} -DPython_EXECUTABLE=${PYTHONBIN} -DPACKAGESPY_ROOT_DIR=${PACKAGESPY_ROOT_DIR}"
+    get_source : "dir"
+    dir_info :
+    {
+        dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + 'SOLVERLAB' + $VARS.sep + 'solverlabGUI'
+    }
+    environ :
+    {
+       SalomeAppConfig_ : $install_dir + $VARS.sep + "share" + $VARS.sep + "salome" + $VARS.sep + "resources" + $VARS.sep + "solverlabgui"
+       env_script : $name + ".py"
+    }
+    depend : 
+    [   
+        'KERNEL',
+        'GUI',
+        'SOLVERLAB',
+        'MEDCOUPLING',
+        'packagespy'
+    ]
+    build_depend : ["cmake", "swig", "doxygen", "graphviz","cppunit"]
+    source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + 'SOLVERLAB' + $VARS.sep + 'solverlabGUI'
+    build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name
+    nb_proc : 1
+    properties:
+    {
+        is_SALOME_module : "yes"
+        incremental : "yes"
+        has_salome_gui : "yes"
+    }
+    patches: []
+}
index df0e932b3c03cfff40816313ae5619a15e7ab95f..fa08db5d84aa48b83d3a5215855a3d9feb95fdb2 100755 (executable)
@@ -4,46 +4,68 @@ echo "##########################################################################
 echo "SOLVERLAB" $VERSION
 echo "##########################################################################"
 
+rm -rf $BUILD_DIR
+mkdir $BUILD_DIR
+cd $BUILD_DIR
 
+CMAKE_OPTIONS=
 CMAKE_OPTIONS+=" -DPython_ROOT_DIR=${PYTHON_ROOT_DIR}"
 CMAKE_OPTIONS+=" -DPython_EXECUTABLE=${PYTHONBIN}"
 CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
 
-if [ $VERSION == "V9_6_0" ]; then
-    # GUI was ported after 9.6.0
-    CMAKE_OPTIONS+=" -DCOREFLOWS_WITH_GUI=OFF"
-    # following variables are automatically detected in environment after 9.6.0
-    CMAKE_OPTIONS+=" -DPYQT5_ROOT_DIR=${PYQT5_ROOT_DIR}"
-    CMAKE_OPTIONS+=" -DMATPLOTLIB_ROOT_DIR=${MATPLOTLIB_ROOT_DIR}"
-    CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig"
-    CMAKE_OPTIONS+=" -DDOXYGEN_EXECUTABLE=${DOXYGEN_ROOT_DIR}/bin/doxygen"
-    CMAKE_OPTIONS+=" -DCPPUNIT_ROOT_USER=${CPPUNIT_ROOT_DIR}"
-    CMAKE_OPTIONS+=" -DHDF5_ROOT=${HDF5_ROOT_DIR}"
-    CMAKE_OPTIONS+=" -DMEDFILE_ROOT_DIR=${MEDFILE_ROOT_DIR}"
-    CMAKE_OPTIONS+=" -DPARAVIEW_ROOT_DIR=${PARAVIEW_ROOT_DIR}"
-    CMAKE_OPTIONS+=" -DPETSC_DIR=${PETSC_ROOT_DIR}"
-    CMAKE_OPTIONS+=" -DKERNEL_ROOT_DIR=${KERNEL_ROOT_DIR}"
-    CMAKE_OPTIONS+=" -DGUI_ROOT_DIR=${GUI_ROOT_DIR}"
-    CMAKE_OPTIONS+=" -DMEDCOUPLING_ROOT_DIR=${MEDCOUPLING_ROOT_DIR}"
-else
-    CMAKE_OPTIONS+=" -DCOREFLOWS_WITH_GUI=ON"
-fi
-
-if [ -n "$SAT_HPC" ]; then
-    if [ $VERSION == "V9_6_0" ] && [ -n "$MPI_ROOT_DIR" ]; then
-        # following variable is automatically detected in environment after 9.6.0
-        CMAKE_OPTIONS+=" -DMPI_HOME=${MPI_ROOT_DIR}"
+if [ ! -d $SOURCE_DIR/solverlabGUI ]; then
+    if [ $VERSION == "V9_6_0" ]; then
+        # GUI was ported after 9.6.0
+        CMAKE_OPTIONS+=" -DCOREFLOWS_WITH_GUI=OFF"
+        # following variables are automatically detected in environment after 9.6.0
+        CMAKE_OPTIONS+=" -DPYQT5_ROOT_DIR=${PYQT5_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DMATPLOTLIB_ROOT_DIR=${MATPLOTLIB_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig"
+        CMAKE_OPTIONS+=" -DDOXYGEN_EXECUTABLE=${DOXYGEN_ROOT_DIR}/bin/doxygen"
+        CMAKE_OPTIONS+=" -DCPPUNIT_ROOT_USER=${CPPUNIT_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DHDF5_ROOT=${HDF5_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DMEDFILE_ROOT_DIR=${MEDFILE_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DPARAVIEW_ROOT_DIR=${PARAVIEW_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DPETSC_DIR=${PETSC_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DKERNEL_ROOT_DIR=${KERNEL_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DGUI_ROOT_DIR=${GUI_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DMEDCOUPLING_ROOT_DIR=${MEDCOUPLING_ROOT_DIR}"
+    else
+        CMAKE_OPTIONS+=" -DCOREFLOWS_WITH_GUI=ON"
+        CMAKE_OPTIONS+=" -DPACKAGESPY_ROOT_DIR=${PACKAGESPY_ROOT_DIR}"
+        #    CMAKE_OPTIONS+=" -DSOLVERLAB_WITH_PACKAGESPY=ON"
     fi
-    CMAKE_OPTIONS+=" -DMPI_ROOT_DIR=${MPI_ROOT_DIR}"
-    CMAKE_OPTIONS+=" -DSOLVERLAB_WITH_MPI=ON"
-    if [ -n "$MPI_ROOT_DIR" ]; then
-       CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
-       CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+    if [ -n "$SAT_HPC" ]; then
+        if [ $VERSION == "V9_6_0" ] && [ -n "$MPI_ROOT_DIR" ]; then
+            # following variable is automatically detected in environment after 9.6.0
+            CMAKE_OPTIONS+=" -DMPI_HOME=${MPI_ROOT_DIR}"
+        fi
+        CMAKE_OPTIONS+=" -DMPI_ROOT_DIR=${MPI_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DSOLVERLAB_WITH_MPI=ON"
+        if [ -n "$MPI_ROOT_DIR" ]; then
+            CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+            CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+        fi
+        if [ -n "$MPI4PY_ROOT_DIR" ]; then
+            CMAKE_OPTIONS+=" -DMPI4PY_ROOT_DIR:PATH=${MPI4PY_ROOT_DIR}"
+        else
+            echo "WARNING: mpi4py environment variable not detected"
+        fi
     fi
-    if [ -n "$MPI4PY_ROOT_DIR" ]; then
-       CMAKE_OPTIONS+=" -DMPI4PY_ROOT_DIR:PATH=${MPI4PY_ROOT_DIR}"
-    else
-        echo "WARNING: mpi4py environment variable not detected"
+else
+    CMAKE_OPTIONS+=" -DCOREFLOWS_WITH_GUI=OFF"
+    if [ -n "$SAT_HPC" ]; then
+        CMAKE_OPTIONS+=" -DMPI_ROOT_DIR=${MPI_ROOT_DIR}"
+        CMAKE_OPTIONS+=" -DSOLVERLAB_WITH_MPI=ON"
+        if [ -n "$MPI_ROOT_DIR" ]; then
+            CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+            CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+        fi
+        if [ -n "$MPI4PY_ROOT_DIR" ]; then
+            CMAKE_OPTIONS+=" -DMPI4PY_ROOT_DIR:PATH=${MPI4PY_ROOT_DIR}"
+        else
+            echo "WARNING: mpi4py environment variable not detected"
+        fi
     fi
 fi
 
index 2edb32c120f8e65994ea0ccf8c80a448c5adf5c0..559facfdbb11ac3da17e8834c9f2f50c1b9adf5f 100755 (executable)
@@ -5,6 +5,9 @@ echo "packagespy" $VERSION
 echo "##########################################################################"
 
 # nothing to be done here, simply copy sources to installation directory
+if [ ! -d $PRODUCT_INSTALL ]; then
+    mkdir -p $PRODUCT_INSTALL
+fi
 cp -rf $SOURCE_DIR/packagespy $PRODUCT_INSTALL
 if [ $? -ne 0 ]
 then
@@ -12,8 +15,19 @@ then
     exit 1
 fi
 cd $PRODUCT_INSTALL/
+echo $PRODUCT_INSTALL
+ls -ltr
+# ensure that we are using our python
 PYTHON=${PYTHONBIN##*/}
-grep -rl '#!/usr/bin/env python' . |xargs sed -i "s%#\!/usr/bin/env python/#\!/usr/bin/env ${PYTHON}/g"
+echo "INFO: list of files which will be patched..."
+for f in $(grep -rl '#!/usr/bin/env python' . ); do
+    echo INFO: patching file $f
+    sed -i "s%#\!/usr/bin/env python%#\!/usr/bin/env ${PYTHON}%g" $f
+    if [ $? -ne 0 ]; then
+        echo "ERROR: could not patch file: $f"
+        exit 2
+    fi
+done
 
 echo
 echo "########## END"
index 54d2840f4575bcc8808849b3b78520c2b0e361ea..e84c7cbea537d052b40229afafb3c8021f049480 100644 (file)
@@ -23,7 +23,9 @@ def set_env(env, product_dir, version):
     
     env.prepend('PATH', os.path.join(root, 'include'))
     env.prepend('LD_LIBRARY_PATH', os.path.join(root, 'lib'))
+    env.prepend('PYTHONPATH', root)
     env.prepend('PYTHONPATH', os.path.join(root, 'lib'))
+    env.prepend('PYTHONPATH', os.path.join(root, 'bin'))
     env.prepend('PYTHONPATH', os.path.join(root, 'lib', 'coreflows'))
     env.prepend('PYTHONPATH', os.path.join(root, 'bin', 'coreflows'))
     env.prepend('PYTHONPATH', os.path.join(root, 'lib', 'cdmath'))
diff --git a/products/env_scripts/SOLVERLABGUI.py b/products/env_scripts/SOLVERLABGUI.py
new file mode 100644 (file)
index 0000000..8c71ff1
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+import os.path
+import platform
+
+def set_env(env, product_dir, version):
+    env.set('SOLVERLABGUI_ROOT_DIR', product_dir)    
+    env.prepend('LD_LIBRARY_PATH', os.path.join(product_dir, 'lib'))
+    env.prepend('PYTHONPATH', product_dir)
+    env.prepend('PYTHONPATH', os.path.join(product_dir, 'solverlabpy'))
+    env.prepend('PYTHONPATH', os.path.join(product_dir, 'bin', 'salome'))
+    env.set('SOLVERLABGUI_WORKDIR', r'/tmp')
+    env.set('USERLOGIN', "$USER")
+def set_nativ_env(env):
+    pass
index 73a4f786e44b560c3fd3bfdabcb73bfd25f12751..bb5498cdcb195cd592fad014d13d929d3179ae73 100644 (file)
@@ -3,10 +3,12 @@
 
 import os
 import platform
-
+import os
 def set_env(env, prereq_dir, version):
     env.set("PACKAGESPY_ROOT_DIR",prereq_dir)
-    env.prepend('PYTHONPATH',prereq_dir)
+    env.set("WORKDIR4LOG",os.path.join('tmp', os.getlogin()))
+    env.prepend('PYTHONPATH',os.path.join(prereq_dir, 'packagespy'))
+    env.prepend('PATH',os.path.join(prereq_dir,'packagespy','bin'))
 
 def set_nativ_env(env):
     pass
index f383b6b1b98de75081d701c045bfa1a7338cbdc7..9c87ac381d350575ac610dabc38945fab92ba676 100644 (file)
@@ -9,7 +9,7 @@ default :
        env_script : $name + ".py"
     }
     patches : [] 
-    depend : ["python", "setuptools"]
+    depend : ["Python", "setuptools"]
     source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name
     build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name
     install_dir : 'base'
@@ -19,7 +19,7 @@ default :
     }
 }
 
-version_9bb05ac :
+version_74152cd :
 {
-    archive_info : {archive_name : "packagespy-9bb05ac.tar.gz"}
+    archive_info : {archive_name : "packagespy-74152cd.tar.gz"}
 }