]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
update petsc compil script and add SOLVERLABGUI compil scrpit
authorGuytri KASTANE <guytri.kastane@cea.fr>
Thu, 28 Sep 2023 08:12:45 +0000 (10:12 +0200)
committerGuytri KASTANE <guytri.kastane@cea.fr>
Thu, 28 Sep 2023 08:12:45 +0000 (10:12 +0200)
products/SOLVERLABGUI.pyconf
products/compil_scripts/SOLVERLABGUI.sh [new file with mode: 0755]
products/compil_scripts/petsc-3.19.4.sh

index 6ec27a06e3c3480723f006fa6c3f5aad11f1eb52..7531f557dc5ba1544e1c0a85845fea53326b5565 100644 (file)
@@ -1,8 +1,8 @@
 default :
 {
     name : "SOLVERLABGUI"
-    build_source : "cmake"
-    build_command :  "-DPython_ROOT_DIR=${PYTHON_ROOT_DIR} -DPython_EXECUTABLE=${PYTHONBIN} -DPACKAGESPY_ROOT_DIR=${PACKAGESPY_ROOT_DIR}"
+    build_source : "script"
+    compil_script :  $name + ".sh"
     get_source : "dir"
     dir_info :
     {
@@ -19,9 +19,11 @@ default :
         'GUI',
         'SOLVERLAB',
         'MEDCOUPLING',
-        'packagespy'
+        'packagespy',
+       "qt"
     ]
     build_depend : ["cmake", "swig", "doxygen", "graphviz","cppunit"]
+    opt_depend : ['openmpi']
     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
diff --git a/products/compil_scripts/SOLVERLABGUI.sh b/products/compil_scripts/SOLVERLABGUI.sh
new file mode 100755 (executable)
index 0000000..8edaa7f
--- /dev/null
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+echo "##########################################################################"
+echo "SOLVERLABGUI" $VERSION
+echo "##########################################################################"
+
+rm -rf $BUILD_DIR
+mkdir $BUILD_DIR
+cd $BUILD_DIR
+
+echo " MPI_C_FOUND >>>>>>>>>> ${MPI_C_FOUND}"
+
+CMAKE_OPTIONS=
+CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Release"
+#CMAKE_OPTIONS+=" -DPython_ROOT_DIR=${PYTHON_ROOT_DIR}"
+#CMAKE_OPTIONS+=" -DPython_EXECUTABLE=${PYTHONBIN}"
+CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
+CMAKE_OPTIONS+=" -DMPI_C_LIBRARIES=${MPI_C_FOUND}"
+#CMAKE_OPTIONS+=" -DPACKAGESPY_ROOT_DIR=${PACKAGESPY_ROOT_DIR}"
+#CMAKE_OPTIONS+=" -DMPI_HOME=${MPI_ROOT_DIR}"
+#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
+
+echo
+echo "*** cmake "$CMAKE_OPTIONS $SOURCE_DIR
+cmake $CMAKE_OPTIONS $SOURCE_DIR
+if [ $? -ne 0 ]; then
+    echo "ERROR on cmake"
+    exit 1
+fi
+
+
+echo
+echo "*** make" $MAKE_OPTIONS
+make $MAKE_OPTIONS
+if [ $? -ne 0 ]; then
+    echo "ERROR on make"
+    exit 2
+fi
+
+echo
+echo "*** make install"
+make install
+if [ $? -ne 0 ]; then
+    echo "ERROR on make install"
+    exit 3
+fi
+
+echo
+echo "########## END"
index dcb57696c0829d83ae944d7ceecc4af2ad990254..5058dad841dca6ccd67e149a384165b0194609fd 100755 (executable)
@@ -4,13 +4,26 @@ echo "##########################################################################
 echo "Petsc" $VERSION
 echo "##########################################################################"
 
+NATIVE_PATH="/usr"
+LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
+echo "WARNING: "
+case $LINUX_DISTRIBUTION in
+    UB*|DB*)
+        NATIVE_PATH="/usr/lib/x86_64-linux-gnu"
+        ;;
+    *)
+        ;;
+esac
+
 cp -r $SOURCE_DIR/* .
 
 CONFIGURE_FLAGS=
 CONFIGURE_FLAGS+=" --download-slepc=ext/slepc-3.19.2.tar.gz"
 
-if [ -f "${LAPACK_ROOT_DIR}/liblapack.a" ] && [ "${SAT_lapack_IS_NATIVE}" == "1"  ]; then
-   CONFIGURE_FLAGS+=" --with-blaslapack-dir=${LAPACK_ROOT_DIR}"
+if [ -f "${NATIVE_PATH}/liblapack.a" ] && [ "${SAT_lapack_IS_NATIVE}" == "1" ]; then
+   CONFIGURE_FLAGS+=" --with-blaslapack-dir=${NATIVE_PATH}"
+elif [ -n "${LAPACK_ROOT_DIR}" ] && [ "${SAT_lapack_IS_NATIVE}" != "1" ]; then
+  CONFIGURE_FLAGS+=" --with-blaslapack-dir=${LAPACK_ROOT_DIR}"
 else
    CONFIGURE_FLAGS+=" --download-f2cblaslapack=ext/f2cblaslapack-3.8.0.q2.tar.gz"
 fi
@@ -18,15 +31,19 @@ fi
 CONFIGURE_FLAGS+=" --with-python-dir=${PYTHON_ROOT_DIR}"
 CONFIGURE_FLAGS+=" --with-hdf5-dir=${HDF5_ROOT_DIR}"
 
-if [ -f "${FFTW_ROOT_DIR}/libfftw3.a" ] && [ ${SAT_fftw_IS_NATIVE} == "1"  ]; then
+if [ -f "${NATIVE_PATH}/libfftw3.a" ] && [ ${SAT_fftw_IS_NATIVE} == "1" ]; then
+   CONFIGURE_FLAGS+=" --with-fftw-dir=${NATIVE_PATH}"
+elif [ -n "${FFTW_ROOT_DIR}" ] && [ ${SAT_fftw_IS_NATIVE} != "1" ]; then
    CONFIGURE_FLAGS+=" --with-fftw-dir=${FFTW_ROOT_DIR}"
 else
    CONFIGURE_FLAGS+=" --download-fftw=ext/fftw-3.3.10.tar.gz"
 fi
+
 CONFIGURE_FLAGS+=" --with-cuda=0" # 
 CONFIGURE_FLAGS+=" --with-debugging=0" # by default Petsc is build in debug mode
 CONFIGURE_FLAGS+=" --with-petsc4py=yes"
 CONFIGURE_FLAGS+=" --download-slepc-configure-arguments=--with-slepc4py=yes "
+
 echo
 if [ -n "${SAT_HPC}" ]
 then
@@ -43,7 +60,6 @@ then
   echo "*** configure --prefix=${PRODUCT_INSTALL} --with-mpi-dir=${MPI_ROOT_DIR} ${CONFIGURE_FLAGS}"
   ./configure --prefix=${PRODUCT_INSTALL} --with-mpi-dir=${MPI_ROOT_DIR} ${CONFIGURE_FLAGS}
 else
-  #CONFIGURE_FLAGS+=" --with-metis-dir=${METIS_ROOT_DIR}"
   CONFIGURE_FLAGS+=" --download-metis=ext/metis-5.1.0-p11.tar.gz"
   echo "*** configure --prefix=${PRODUCT_INSTALL} --with-mpi=0 ${CONFIGURE_FLAGS}"
   ./configure --prefix=${PRODUCT_INSTALL} --with-mpi=0 ${CONFIGURE_FLAGS}