# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # --------------- 1. Introduction --------------- SimanIO library provides interaction of SALOME modules with SIMAN (SALOME Simulation Data Manager) server using Web Services and based on WSO2 Web Services Framework for C++ (wso2-wsf-cpp-x.x.x). --------------- 2. Installation --------------- 2.1 Pre-requisites SimanIO library is based on CMake build system (http://www.cmake.org/); this means that you must have CMake installed on your system (minimum version 2.8.8) in order to build and install SimanIO. Additional pre-requisites: - C++ compiler with standard libraries - WSO2 Web Services Framework for C++ (wso2-wsf-cpp-2.1.0) 2.2. Building and installing library To build the library, you will have to extract the source package in a directory where you have write permissions: $ tar xzf simanio-x.y.z.tar.gz (x.y.z is a version signature) You can then build the library directly in the source tree, but it is strongly advised to use an independant build tree. For that, just go to the directory where you extracted SimanIO and type for instance: $ mkdir simanio_build $ cd simanio_build After that, you will just need to run cmake to generate the Makefiles and to run make and make install to install the library: $ cmake ../simanio-x.y.z (x.y.z is a version signature) $ make $ make install Normally, the pre-requisites are automatically detected during the configuration procedure basing on the current environment; this procedure is managed by CMake by analyzing standard directories and environment variables. However, if it fails or if you want to specify alternative installation of some pre-requisite, you can do it by setting the corresponding environment variable. For example, you might want to specify installation directory of wso2-wsf-cpp-2.1.0 with WSO2_ROOT_DIR environment variable: export WSO2_ROOT_DIR=/usr/local/wso2-wsf-cpp-2.1.0 Alternatively, to change CMake behavior, you can either preset the environment variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH (see CMake documentation for more details) or use CMake graphical interface. For this, run cmake once to populate the cache and then run ccmake: $ cmake ../simanio-x.y.z (x.y.z is a version signature) $ ccmake ../simanio-x.y.z (x.y.z is a version signature) Note, that by default 'make install' will install all staff to the /usr directory. The installation directory can be changed by specifying custom location with CMAKE_INSTALL_PREFIX variable (passed to cmake or ccmake): $ cmake -DCMAKE_INSTALL_PREFIX=/home/user/siman ../simanio-x.y.z -------------------------------------- 3. Generating Web Service Client Stubs -------------------------------------- It is the optional action for current version. SimanIO library sources include a set of web services client stubs generated by means of WSO2 Web Services Framework for C++. Properly installed WSO2 includes the java based tool that is used to generate all required web services client stubs and other supporting files from the SIMAN wsdl file. Use the following parameters to generate the Axis2/C client stub code with ADB (Axis Data Binding) support: $ ./siman_stabs_code_generator.sh -uri -d adb -u The SIMAN stabs code generator script (/scripts/siman_stabs_code_generator.sh) generates the client stub files .h and .cpp from the given SIMAN wsdl file, path to which is specified via (/scripts/SimanSalomeService.wsdl) and puts generated files to the src sub-directory of a source tree. ------------------------------------------------- 4. Build SALOME KERNEL module with SIMAN support ------------------------------------------------- To build SALOME KERNEL with SIMAN support, the SIMANIO_ROOT_DIR environment variable should be specified to point to the directory containing preinstalled SimanIO library. Then, use SALOME_USE_SIMAN variable to build SALOME KERNEL with SIMAN support: $ cd KERNEL_BUILD $ cmake -DSALOME_USE_SIMAN=ON [] ../KERNEL_SRC $ make $ make install Note, that other SALOME modules (GEOM, MED, SMESH, ...) that implement interaction with SIMAN are built as usual. Each SALOME module that requires communication with SIMAN should implement corresponindg interfaces as decribed in the documentation (SIMAN_Integration_of_SALOME_Modules_vx.y). ----------- 5. APPENDIX ----------- This paragraph provides some additional information about SIMAN and SimanIO. 5.1. Building and installing the library basing on SALOME installation The source code of the SimanIO library is delivered as part of the offcial SALOME distribution; alternatively it can be obtained from CVS repository: $ cvs -d :pserver:@cvs.opencascade.com:/home/server/cvs/SIMAN $ cvs checkout -PRA SIMANIO_SRC Building and installation of the SimanIO library is performed in accordance with the procedure described above (paragraph 2). 5.2. Testing The set of the tests using SimanIO library for accesing SIMAN server is developed and delivered separatelly from this package. These tests can be properly executed only when SIMAN web and database servers are properly configured and run. 5.3. Additional scripts The scripts sub-directory contains several scripts that can be used to set environment and and running specific configuration of SALOME session communicating with SIMAN. These scripts are automatically copied to the SimanIO installation directory (share/simanio/misc sub-directory) by the build procedure; they can be adjusted if necessary: run_salome_siman.sh - the script used by SIMAN to start SALOME session in SIMAN mode castem_env_products.sh - CASTEM module run time environment eficas_aster_env_products.sh - EFICAS & ASTER modules run time environment syrthes_env_products.sh - SYRTHES modules run time environment 5.4. Additional modules communicating with SIMAN These specific SALOME modules are delivered separatelly from SALOME platform; each module is built in accordance with the instructions provided by module maintainer. If necessary, build SALOME CASTEM (CEA/DEN) module using the latest CASTEM_SRC source code that includes all necessary updates of scripts (e0_donnees.py, CASTEM.py) in a usual way. Set proper value of CASTEM solver binaries location in e0_donnees.py, for example: castem_exe = modele("castem_exe" , "/bin/castem10") If necessary, build and configure EFICAS, ASTER and SYRTHES SALOME modules (EDF R&D) and the tools used by these modules: Eficasv1 (tool), EFICAS (module used by SALOME_MECA), CODE_ASTER (tool), ASTER_MODULE and CODE_SYRTHES (tool), MODULE_SYRTHES (module) in a usual way. 5.5. Test SALOME session with and without SIMAN support For properly built SimanIO and SALOME modules you can check operating of SALOME in two modes (with and without SIMAN) after setting run time environment with the script env_products.sh as following: $ . /env_products.sh $ . /share/simanio/misc/castem_env_products.sh (if necessary) $ . /share/simanio/misc/eficas_aster_env_products.sh (if necessary) $ . /share/simanio/misc/syrthes_env_products.sh (if necessary) $ runSalome $ runSalome --siman Here, is a SimanIO installation directory, e.g. /home/user/siman, and is a SALOME installation directory. Note: mentioned env_products.sh script is a part of SALOME Installation procedure; it sets up the environment required for proper SALOME operating. If SALOME is built/installed in another way than with SALOME Installation procedure, you will need to use alternative way to set proper environment. 5.6. Configuration of SIMAN web server and SIMAN database server Please find all necessary details concerning the configuration and running of SALOME SIMAN client and SIMAN Web server with SIMAN database in the SIMAN Administration Guide (SIMAN_AdminGuide_vX.Y). 5.7. Basic working mode of SALOME with SIMAN server If installation and configuration of SIMAN have been performed successfully the SIMAN server can be accesible on SALOME client side from your browser using URL: "http://:8080/siman". Normally, this should display the SIMAN start page. SALOME session connected to SIMAN is automatically started from the browser; this SALOME session will access SIMAN server providing all functionality defined in the SIMAN Detailed Functional Specifications for the current version of SIMAN (see SIMAN_Functional_Specifications_vx.y).