From eb8c6641d3cfeb8c73c0ca07420b0ecf1e941fc9 Mon Sep 17 00:00:00 2001 From: bri Date: Mon, 10 Feb 2014 18:31:59 +0400 Subject: [PATCH] updated scripts --- scripts/INSTALL_Applications.txt | 107 +++++++++++++++++++++++++++ scripts/README | 11 ++- scripts/eficas_aster_env_products.sh | 39 ++++++++++ scripts/run_salome_siman.sh | 49 ++++++++++-- scripts/syrthes_env_products.sh | 19 +++++ 5 files changed, 217 insertions(+), 8 deletions(-) create mode 100644 scripts/INSTALL_Applications.txt create mode 100755 scripts/eficas_aster_env_products.sh create mode 100755 scripts/syrthes_env_products.sh diff --git a/scripts/INSTALL_Applications.txt b/scripts/INSTALL_Applications.txt new file mode 100644 index 0000000..a104797 --- /dev/null +++ b/scripts/INSTALL_Applications.txt @@ -0,0 +1,107 @@ + +Eficasv1 (TOOL) +=============== +tar xfz Eficasv1_SRC.tgz +cd +cmake /path/to/Eficasv1_SRC -DWITH_ALL_PACKAGES=ON -DCMAKE_INSTALL_PREFIX= +nb_cpu=`grep -c processor /proc/cpuinfo` +make -j ${nb_cpu} +make install + +Set EFICAS_ROOT to /path/to/install/Eficasv1 + + +EFICAS (MODULE used by SALOME_MECA) +=================================== +tar xfz EFICAS_SRC.tgz +cd EFICAS_SRC +./build_configure +cd +/path/to/EFICAS_SRC/configure --prefix= +nb_cpu=`grep -c processor /proc/cpuinfo` +make -j ${nb_cpu} +make install + +Set EFICAS_ROOT_DIR to /path/to/install/EFICAS + +Edit SalomeApp.xml to add EFICAS module: + + + +CODE_ASTER (TOOL) +================= +0. Prerequisites +flex, bison, zlib1g-dev, libmotif4-dev + +1. Download CODE_ASTER v11.3 +http://www.code-aster.org/FICHIERS/aster-full-src-11.3.0-3.noarch.tar.gz + +2. Go into extracted folder + +3. Create a configuration file for CODE_ASTER (copy setup.cfg file) and add the following: +import os +MATHLIB = '-L '+os.getenv('LAPACK_DIR') + '/lib -lblas -llapack' + +4. Prepare your environment +Check that LAPACK_DIR environment variable is set on your system. + +5. Build CODE_ASTER +python setup.py install --nocache --noprompt --cfg= --prefix= + + +ASTER_MODULE +============ +tar xfz SALOME_MECA_SRC.tgz +cd SALOME_MECA_SRC +python setup.py install --prefix= + +Set ASTER_ROOT_DIR to /path/to/install/SALOME_MECA + +Edit SalomeApp.xml to add ASTER module: + + + + + +CODE_SYRTHES (TOOL) +=================== +tar xfz CODE_SYRTHES_SRC.tgz +cd CODE_SYRTHES_SRC/src/syrthes-install +python syrthes_install.py +cd CODE_SYRTHES_SRC/src/syrthes-gui/src +./Install.sh +cp -r install/* + +source /path/to/CODE_SYRTHES_SRC/arch/Linux_x86_64/bin/syrthes.profile +Add /path/to/install/CODE_SYRTHES to PYTHONPATH + + +MODULE_SYRTHES +============== +tar xfz MODULE_SYRTHES_SRC.tgz +cd MODULE_SYRTHES_SRC + +Edit context.py to set path to salome prerequisites + +cd MODULE_SYRTHES_SRC && python components.py +cd MODULE_SYRTHES_SRC/SYRTHES_SRC +./autogen.sh + +cd +MODULE_SYRTHES_SRC/SYRTHES_SRC/configure --prefix= +nb_cpu=`grep -c processor /proc/cpuinfo` +make -j ${nb_cpu} +make install +cp SYRTHES.py /path/to/install/MODULE_SYRTHES/lib/python2.X/site-packages/salome/SYRTHES.py + +Set SYRTHES_ROOT_DIR to /path/to/install/MODULE_SYRTHES + +Edit SalomeApp.xml to add SYRTHES module: + + + + + +Running SALOME +============== +Consider modules named EFICAS, ASTER and SYRTHES when starting SALOME. diff --git a/scripts/README b/scripts/README index 00e8dc1..d26b964 100644 --- a/scripts/README +++ b/scripts/README @@ -29,6 +29,8 @@ README - this file env_siman.sh - SIMAN (SIMANIO) build environment siman_build.sh - SIMAN (SIMANIO) build script castem_env_products.sh - CASTEM run environment +eficas_aster_env_products.sh - EFICAS & ASTER run environment +syrthes_env_products.sh - SYRTHES run environment run_salome_siman.sh - the script used by SIMAN for SALOME running in the SIMAN mode For Mandriva 2010-64 rename and use env_build_mandiva-2010-64.sh env_products_mandriva-2010-64.sh. @@ -57,8 +59,15 @@ Use modified CASTEM_SRC codes include necessary updates of script scripts (e0_do Set proper value of CASTEM solver binaries location in e0_donnees.py, for example castem_exe = modele("castem_exe" , "/data/SIMAN/_CEA_V7_siman_6.6.0/castem10/bin/castem10") -6. Set SALOME runtime environment and Check runnability of SALOME in two modes - without and with SIMAN : +7. If necessary, build and configure EFICAS, ASTER and SYRTHES SALOME modules and the tools used by them : +Eficasv1 (TOOL), EFICAS (MODULE used by SALOME_MECA), CODE_ASTER (TOOL), ASTER_MODULE and CODE_SYRTHES (TOOL), MODULE_SYRTHES +in usual manner as described in INSTALL_Applications.txt by Cedric AGUERRE, EDF R&D. + +8. Set SALOME runtime environment and Check runnability of SALOME in two modes - without and with SIMAN : . env_siman.sh +. castem_env_products.sh (if necessary) +. eficas_aster_env_products.sh (if necessary) +. syrthes_env_products.sh (if necessary) runSalome runSalome --siman diff --git a/scripts/eficas_aster_env_products.sh b/scripts/eficas_aster_env_products.sh new file mode 100755 index 0000000..3108fd9 --- /dev/null +++ b/scripts/eficas_aster_env_products.sh @@ -0,0 +1,39 @@ +#!/bin/bash -noprofile + +if [ -z "${SALOME_ROOT_DIR}" ]; then + echo "You need to set the environment variable SALOME_ROOT_DIR" + exit 1 +fi + +#------ Eficasv1 (TOOL) ------ +##export EFICAS_ROOT=${SALOME_ROOT_DIR}/Eficasv1 +export EFICAS_ROOT=/data/SIMAN/_EDF_V7_siman_6.6.0/CODE_ASTER/public/eficas-6.6.0 + +#------ EFICAS (MODULE used by SALOME_MECA) ------ +export EFICAS_ROOT_DIR=${SALOME_ROOT_DIR}/EFICAS +##export PATH=${EFICAS_ROOT_DIR}/bin/salome:${PATH} +##export LD_LIBRARY_PATH=${EFICAS_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH} +##export PYTHONPATH=${EFICAS_ROOT_DIR}/bin/salome:${EFICAS_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${PYTHONPATH} + +#------ CODE_ASTER (TOOL) ------ +export LAPACK_DIR=${SALOME_ROOT_DIR}/numpy-1.5.1 + +export ASTER_ROOT=${SALOME_ROOT_DIR}/CODE_ASTER +#export PYTHONPATH=${ASTER_ROOT}/lib/python2.6/site-packages:${ASTER_ROOT}/public/numpy-1.5.1/lib/python2.6/site-packages:${PYTHONPATH} +export PYTHONPATH=${ASTER_ROOT}/lib/python2.6/site-packages:${PYTHONPATH} +export PYTHONPATH=${ASTER_ROOT}/ASTK/ASTK_SERV/lib:${PYTHONPATH} +#export PATH=${ASTER_ROOT}/public/numpy-1.5.1/bin:${PATH} +export PATH=${ASTER_ROOT}/ASTK/ASTK_SERV/bin:${PATH} + +export PATH=${ASTER_ROOT}/bin:${ASTER_ROOT}/outils:${PATH} +export PYTHONEXECUTABLE=${SALOME_ROOT_DIR}/Python-2.6.6/bin/python +export WISHEXECUTABLE=/usr/bin/wish + + +#------ ASTER_MODULE ------ +export ASTER_ROOT_DIR=${SALOME_ROOT_DIR}/SALOME_MECA +export PYTHONPATH=${ASTER_ROOT_DIR}/lib/python2.6/site-packages/salome:${PYTHONPATH} +#export PYTHONPATH=${SALOME_ROOT_DIR}/SALOME_MECA_SRC/salome/tests:${PYTHONPATH} +#------ SALOME_MECA_src ------ +##export ASTER_SRC_DIR=${SALOME_ROOT_DIR}/SALOME_MECA_SRC +# \ No newline at end of file diff --git a/scripts/run_salome_siman.sh b/scripts/run_salome_siman.sh index 1761fa9..4a4d82d 100644 --- a/scripts/run_salome_siman.sh +++ b/scripts/run_salome_siman.sh @@ -54,19 +54,56 @@ if [ -e $castem_env_script ] ; then fi echo "CASTEM_ROOT_DIR = " $CASTEM_ROOT_DIR +echo + +eficas_aster_env_script=${SALOME_ROOT_DIR}/eficas_aster_env_products.sh + +if [ -e $eficas_aster_env_script ] ; then + echo + echo ">>> Setting EFICAS & ASTER environment" + echo ">>> Environment script = " $eficas_aster_env_script + . $eficas_aster_env_script + else + echo + echo '!!! Warning !!! EFICAS & ASTER Environment is not set.' + echo 'No environment file (eficas_aster_env_products.sh) is found.' + echo 'Proceed with the current environment.' +fi + +echo "EFICAS_ROOT_DIR = " $EFICAS_ROOT_DIR +echo "ASTER_ROOT_DIR = " $ASTER_ROOT_DIR +echo + +syrthes_env_script=${SALOME_ROOT_DIR}/syrthes_env_products.sh + +if [ -e $syrthes_env_script ] ; then + echo + echo ">>> Setting SYRTHES environment" + echo ">>> Environment script = " $syrthes_env_script + . $syrthes_env_script + else + echo + echo '!!! Warning !!! SYRTHES Environment is not set.' + echo 'No environment file (syrthes_env_products.sh) is found.' + echo 'Proceed with the current environment.' +fi + +echo "SYRTHES_ROOT_DIR = " $SYRTHES_ROOT_DIR echo + echo ">>> Setting SALOME-SIMAN environment" export WSFCPP_HOME=${SALOME_ROOT_DIR}/wso2-wsf-cpp-2.1.0 export LD_LIBRARY_PATH=${WSFCPP_HOME}/lib:${LD_LIBRARY_PATH} echo "WSFCPP_HOME = " ${WSFCPP_HOME} +rm -f ${WSFCPP_HOME}/logs/SimanSalomeService.log export SIMANIO_ROOT_DIR=${SALOME_ROOT_DIR}/SIMANIO -export PATH=${SIMANIO_ROOT_DIR}/lib:${PATH} +#export PATH=${SIMANIO_ROOT_DIR}/lib:${PATH} export LD_LIBRARY_PATH=${SIMANIO_ROOT_DIR}/lib:${LD_LIBRARY_PATH} -export SIMAN_WS_HOST="172.22.0.102:8080" +export SIMAN_WS_HOST="172.22.0.100:8080" echo "SIMAN_WS_HOST = ${SIMAN_WS_HOST}" export SimanSalome_DIR="/tmp/SimanSalome/${1##*=}/${2##*=}/${3##*=}/" @@ -86,8 +123,8 @@ echo "display = " ${DISPLAY} echo echo ">>> SALOME-SIMAN running" -#modules="KERNEL,GEOM,MED,SMESH,VISU,PARAVIS,YACS,CASTEM" -modules="KERNEL,GEOM,MED,SMESH,CASTEM,VISU,YACS" +#modules="KERNEL,GEOM,MED,SMESH,VISU,YACS,CASTEM" +modules="KERNEL,GEOM,MED,SMESH,VISU,YACS,YACSGEN,EFICAS,ASTER,SYRTHES" export NOT_INTERCEPT_SIGNALS=1 @@ -100,10 +137,8 @@ if [[ $rc != 0 ]] ; then exit $rc fi +cd ${SALOME_ROOT_DIR} rm -rf "/tmp/SimanSalome/${1##*=}/${2##*=}" -rm -rf ${SalomeWorking_DIR} -echo -cd - echo echo = = = = = diff --git a/scripts/syrthes_env_products.sh b/scripts/syrthes_env_products.sh new file mode 100755 index 0000000..03dc55f --- /dev/null +++ b/scripts/syrthes_env_products.sh @@ -0,0 +1,19 @@ +#!/bin/bash -noprofile + +if [ -z "${SALOME_ROOT_DIR}" ]; then + echo "You need to set the environment variable SALOME_ROOT_DIR" + exit 1 +fi + +#------ CODE_SYRTHES (TOOL) ------ +syrthesprofile=${SALOME_ROOT_DIR}/CODE_SYRTHES_SRC/arch/Linux_x86_64/bin/syrthes.profile +if [ -f $syrthesprofile ] ; then + . $syrthesprofile +fi + +export CODE_SYRTHES_ROOT=${SALOME_ROOT_DIR}/CODE_SYRTHES +export PYTHONPATH=${CODE_SYRTHES_ROOT}:${PYTHONPATH} + + +#------ MODULE_SYRTHES ------ +export SYRTHES_ROOT_DIR=${SALOME_ROOT_DIR}/MODULE_SYRTHES \ No newline at end of file -- 2.39.2