Install Code_Saturne 2.0-rc1 with Salome 5.1.3 prerequisites

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Alexandre Douce

Install Code_Saturne 2.0-rc1 with Salome 5.1.3 prerequisites

Post by Alexandre Douce »

For the build of Code_Saturne with SALOME it is better to use prerequisites of the installation of SALOME.

The following how-to is based of the use of the install_saturne.py script. I suppose that an installation of Salome 5.1.3 is available.
1) in the Salome 5.1.3 installation create the following symbolic link ( adapt the paths depending on your installation ):
ln -s  /home/salome/Salome_5.1.3/PyQt-4.5.4/bin/pyuic4 /home/salome/Salome_5.1.3/Python-2.4.4/bin/.
ln -s  /home/salome/Salome_5.1.3/PyQt-4.5.4/bin/pyrcc4 /home/salome/Salome_5.1.3/Python-2.4.4/bin/.
ln -s  /home/salome/Salome_5.1.3/PyQt-4.5.4/bin/pylupdate4 /home/salome/Salome_5.1.3/Python-2.4.4/bin/.
2) source the environment variables of SALOME:
source /home/salome/Salome_5.1.3/env_product.sh
3) create the directory in which you want to install Code_Saturne:
mkdir -p /home/saturne/Code_Saturne/2.0-rc1
4) adapt the setup file of the Code_Saturne installer and particularly the following variables:
prefix    /home/saturne/Code_Saturne/2.0-rc1
python  /home/salome/Salome_5.1.3/Python-2.4.4/bin
cgns      None    yes   yes
hdf5      /home/salome/Salome_5.1.3/hdf5-1.6.9      yes   no
med      /home/salome/Salome_5.1.3/med-2.3.6       yes   no
metis    None    yes   yes
mpi       None    yes   yes
libxml2  /home/salome/Salome_5.1.3/libxml2-2.6.27  yes   no
swig      None    yes   yes
note that a new swig will be downloaded and installed, because the swig embedded with SALOME is too old for the mei library.

5) finally launch the installer:
./install_saturne.py
on the terminal you will have this output:
        Installation of Code_Saturne

The process will take several minutes.
You can have a look at the log file meanwhile.

Check the setup file and some utilities presence.
Installation of CGNS
Installation of MPI
Installation of Swig
Installation of BFT
Installation of FVM
Installation of MEI
Installation of ECS
Installation of NCS

Before using Code_Saturne, please update your path with:

  cspath=/home/saturne/Code_Saturne/2.0-rc1/cs-2.0-beta2/bin

  export PATH=$cspath:$PATH


The documentation should then be available through the commands:

  code_saturne info -g refcard

  code_saturne info -g user

Thank you for choosing Code_Saturne!
6) create a launcher for SALOME with CFDSTUDY and Code_Saturne:
#!/bin/sh
source /home/salome/Salome_5.1.3/env_products.sh
CS_HOME=/home/saturne/Code_Saturne/2.0-rc1/cs-2.0-beta2
export PYTHONPATH=$CS_HOME/lib/python2.4/site-packages:$PYTHONPATH
export PYTHONPATH=$CS_HOME/lib/python2.4/site-packages/mei:$PYTHONPATH
$INST_ROOT/KERNEL_5.1.3/bin/salome/runSalome --modules=GEOM,SMESH,CFDSTUDY,VISU,MED --killall
You can download here my setup file...
Attachments
setup.gz
(1.57 KiB) Downloaded 188 times
Alexandre Douce

Re: Installation of Code_Saturne 2.0-rc1 with Salome 5.1.3 prerequisites

Post by Alexandre Douce »

...and the script that launches SALOME with CFDSTUDY and Code_Saturne.
Attachments
salomesaturne.gz
(263 Bytes) Downloaded 185 times
salad

Re: Installation of Code_Saturne 2.0-rc1 with Salome 5.1.3 p

Post by salad »

It is interesting to see this. May I say by this method I can integrate Code_Saturne into the SALOME platform? I am sorry but I used them seperatedly.

I can compare with my post "Compile Code_Saturne with SALOME binary libraries" on http://code-saturne.blogspot.com

Regards, Wayne
Alexandre Douce

Re: Installation of Code_Saturne 2.0-rc1 with Salome 5.1.3 p

Post by Alexandre Douce »

Hi Wayne, there is no trouble to use Salome and Code_Saturne seperatedly ;)

With the method described above, Code_Saturne is build with the prerequisites of Salome. Fisrt, this allows a compatibility between the two softwares mainly  regarding the med format for meshes, and secondly, it allows the integration of the GUI of Code_Saturne in the desktop of Salome if the plugin CFDSTUDY is installed as an additional module of Salome (see here).
Alexandre Douce

Re: Installation of Code_Saturne 2.0-rc1 with Salome 5.1.3 prerequisites

Post by Alexandre Douce »

It seems that there are some issues with the installation of Metis in the prerequisites of Salome and the installer :|
As said here it is possible to not use Metis, and to use the internal partitioner of Code_Saturne.
Attachments
setup.gz
(1.57 KiB) Downloaded 198 times
Thomas Aumeier

Re: Installation of Code_Saturne 2.0-rc1 with Salome 5.1.3 p

Post by Thomas Aumeier »

Hi Alexandre,

I 'd like  to install code_saturne with Salome, but there is something wrong with my PyQt libraries. I followed your description above but I get always the same error massage:

checking for cs_preprocess... /data/saturne-2.0/opt/cs-2.0-rc1/bin/cs_preprocess
checking for python... /data/salome/binaries/Salome_5.1.3/SALOME5/Prerequis/Python-2.4.4/bin/python
checking whether /data/salome/binaries/Salome_5.1.3/SALOME5/Prerequis/Python-2.4.4/bin/python version >= 2.3... yes
checking for /data/salome/binaries/Salome_5.1.3/SALOME5/Prerequis/Python-2.4.4/bin/python version... 2.4
checking for /data/salome/binaries/Salome_5.1.3/SALOME5/Prerequis/Python-2.4.4/bin/python platform... linux2
checking for /data/salome/binaries/Salome_5.1.3/SALOME5/Prerequis/Python-2.4.4/bin/python script directory... ${prefix}/lib/python2.4/site-packages
checking for /data/salome/binaries/Salome_5.1.3/SALOME5/Prerequis/Python-2.4.4/bin/python extension module directory... ${exec_prefix}/lib/python2.4/site-packages
checking for PyQt4 version >= 4.3... Traceback (most recent call last):
File "<string>", line 4, in ?
ImportError: /data/salome/binaries/Salome_5.1.3/SALOME5/Prerequis/Python-2.4.4/lib/python2.4/site-packages/PyQt4/QtCore.so: undefined symbol: _ZNK7QLocale17standaloneDayNameEiNS_10FormatTypeE
no
configure: error: in `/data/saturne-2.0/install-200-rc1/ncs-2.0.0-rc1.build':
configure: error: cannot find PyQt4 support (>= 4.3), Graphical User Interface cannot be installed
See `config.log' for more details.

What can I do??

Regards, Thomas
Yvan Fournier

Re: Installation of Code_Saturne 2.0-rc1 with Salome 5.1.3 p

Post by Yvan Fournier »

Hello,

are you sure the SALOME environment correctly ? If you did, do you have another installation of qt4 or pyqt4 which might be mixed with the SALOME environment ? In any case, if things do not work right away with a minor correction, I would suggest upgrading to SALOME 5.1.4, in case it includes bug corrections which may help.

Best regards,

  Yvan
Thomas Aumeier

Re: Installation of Code_Saturne 2.0-rc1 with Salome 5.1.3 p

Post by Thomas Aumeier »

Hello Yvan,

is it compulsory to use the same python libraries when installing code saturne as a plugin within salome ? I could install CFDSTUDY but when running Salome the message 'CFD Code environment not found!' appears. Maybe I have to set some additional variables in a shell script fpr activating CFDSTUDY? I already set the CFDSTUDY_ROOT_DIR in envSalome-V5.1.3.sh .

Best regards

Thomas
Alexandre Douce

Re: Installation of Code_Saturne 2.0-rc1 with Salome 5.1.3 p

Post by Alexandre Douce »

Hello,

the message 'CFD Code environment not found' means that the solver is not found. You have to complete your PYTHONPATH variable,  you could try these commands :
source /home/salome/Salome_5.1.3/env_products.sh
CS_HOME=/home/saturne/Code_Saturne/2.0-rc1/cs-2.0-beta2
export PYTHONPATH=$CS_HOME/lib/python2.4/site-packages:$PYTHONPATH
export PYTHONPATH=$CS_HOME/lib/python2.4/site-packages/mei:$PYTHONPATH
$INST_ROOT/KERNEL_5.1.3/bin/salome/runSalome --modules=GEOM,SMESH,CFDSTUDY,VISU,MED --killall
As mentioned here http://code-saturne.org/forum/viewtopic.php?f=8&t=1022 you can put these commands in a launcher (i.e. an executable file).

Let us know if it works :-)
Thomas Aumeier

Re: Installation of Code_Saturne 2.0-rc1 with Salome 5.1.3 p

Post by Thomas Aumeier »

Hello,

Salome with CFDSTUDY is working now. The problem was simple (as usual :)) . I already used a laucher but with

export PYTHONPATH=$CS_HOME/lib/python2.6/site-packages:$PYTHONPATH
export PYTHONPATH=$CS_HOME/lib/python2.6/site-packages/mei:$PYTHONPATH

instead of

export PYTHONPATH=$CS_HOME/lib64/python2.6/site-packages:$PYTHONPATH
export PYTHONPATH=$CS_HOME/lib64/python2.6/site-packages/mei:$PYTHONPATH

Sorry for the confusion!

Best Regards

Thomas
Post Reply