Coupling Salome_meca + CS + Syrthes

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
seirov
Posts: 9
Joined: Tue Jul 07, 2015 6:42 pm

Coupling Salome_meca + CS + Syrthes

Post by seirov »

Hello everybody!

I have tried to couple Salome + CS + Syrthes, all together. However, I haven't succeded yet :( The versions that I have:

Salome_meca 2015.1
CS 4.0.1
Syrthes 4.3.0
Opensuse 13.1

And the sequence that I followed has been:

1. Install Salome_meca, without problems.
2. Install Syrthes, setting it to install hdf5, med, mpi, metis & scotch; but without ple, syrthescfd & blas.
3. Install CS, setting it to install cgns and to point to the corresponding syrthes library folders for hdf5, med, scotch & metis (libxml2 already install by package manager).
4. Re-install Syrthes, resetting it to install syrthrescfd and to point to the corresponding CS library folder for ple; leaving blas without installing.[/list]

During this process I had to setup the ple folder to .../code_saturne-4.0.1/arch/Linux_x86_64 instead of .../code_saturne-4.0.1/libple, because file ple_config.h was not found.

The problems are that log files are not clean and that I didn't even get CS coupled with salome, because command "code_saturne salome" gives the following output:

/bin/bash: línea 4: /bin/salome/envSalome.py: No such file or directory

Any tip to fix it? Thanks.
Attachments
setup.txt
CS setup
(4.38 KiB) Downloaded 370 times
install_saturne.log
CS log
(1.3 MiB) Downloaded 325 times
seirov
Posts: 9
Joined: Tue Jul 07, 2015 6:42 pm

Re: Coupling Salome_meca + CS + Syrthes

Post by seirov »

And also the syrthes files.
Attachments
ERREUR.log
syrthes log
(220 Bytes) Downloaded 320 times
setup.ini
syrthes setup
(4.99 KiB) Downloaded 349 times
Yvan Fournier
Posts: 4075
Joined: Mon Feb 20, 2012 3:25 pm

Re: Coupling Salome_meca + CS + Syrthes

Post by Yvan Fournier »

Hello,

In the setup file, for SALOME, you should not provide the path to the applications, but to the libraries (the other directory aside the "applications" directory.

For the Syrthes problem, which seems independent, I'm not sure. I did not notice anything wrong in the setup.ini, and the error log is very short. If you have some lines on the screen ahead of the ERREUR.log, it might help.

Regards,

Yvan
seirov
Posts: 9
Joined: Tue Jul 07, 2015 6:42 pm

Re: Coupling Salome_meca + CS + Syrthes

Post by seirov »

Thanks for your quick reply!

CS:

If I remember well, my first option was as you said in the setup file, but it gave me some compilation error. By the way, I have just tried changing the line in the CS setup file:

Code: Select all

salome    /opt/salome/salome_meca/appli_V2015_1
by

Code: Select all

salome    /opt/salome/salome_meca/V2015_1
but then if fails to compile (see attached log file). Is it not the correct folder again? What am I doing wrong?

Syrthes:

Frankly speaking, I am not sure if Syrthes is coupled or not, as the log file said that there is an error, and I have not tried it. The end of output in the screen is:

Code: Select all

Before using SYRTHES, each user must source
the /opt/salome/syrthes4.3.0/arch/Linux_x86_64/bin/syrthes.profile file before using the code.

The easiest way is to put the following lines in each of the users
 '.profile' or '.bashrc' (depending on the shell)

syrthesprofile=/opt/salome/syrthes4.3.0/arch/Linux_x86_64/bin/syrthes.profile
#(adjust path to your system)
if [ -f $syrthesprofile ] ; then 
  . $syrthesprofile
fi

---------------------------------------------------------
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Warning : installation of some composants failed
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Check log files for more information....
And some log files are attached as well.

Thanks.
Attachments
log_files.zip
syrthes log
(8.74 KiB) Downloaded 351 times
install_saturne.log
CS log
(1.19 MiB) Downloaded 334 times
Yvan Fournier
Posts: 4075
Joined: Mon Feb 20, 2012 3:25 pm

Re: Coupling Salome_meca + CS + Syrthes

Post by Yvan Fournier »

Hello,

For Syrthes, the issue in pp.log seems to be related to some libraries (Scotch or Metis) linking with zlib, so you may try adding "-lz " to the "specific_lib=" (uncommenting it) in the syrthes.ini file (hope it works).

For the Code_Saturne+Salome issue, I'm not 100% sure, but it seems the issue may be related to conflicting Python paths in Salome and in your system. Which surprises me, as both SALOME Meca and OpenSuse 13.1 use Python 2.7, and this is not an issue on most systems (we have also had issues in the past with passing the right environment to the Makefile, so there might be a remaining Makefile issue in the code).

It seems what is failing in your machine is the following sequence:
PYTHONPATH=/opt/salome/salome_meca/V2015_1/prerequisites/Omniorb_416/lib/python2.7/site-packages:/opt/salome/salome_meca/V2015_1/prerequisites/Omniorb_416/lib/python2.7/site-packages${PYTHONPATH:+:$PYTHONPATH} \
LD_LIBRARY_PATH=/opt/salome/salome_meca/V2015_1/prerequisites/Python_273/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} \
/usr/bin/python /opt/salome/salome_meca/V2015_1/prerequisites/Omniorb_416/bin/omniidl -bcxx -Wba -nf -I/opt/salome/salome_meca/V2015_1/prerequisites/Omniorb_416/idl -I/opt/salome/salome_meca/V2015_1/modules/KERNEL_V7_5_1/idl/salome -I/opt/salome/salome_meca/V2015_1/modules/GUI_V7_5_1/idl/salome /opt/salome/code_saturne-4.0.1/salome/cfd_study/idl/CFDSTUDY_Gen.idl
In the (/opt/salome/code_saturne-4.0.1.build/salome/cfd_study/idl) directory. So omniidl is missing something. If you are comfortable enough with this, I would recommend cd'ing into that directory, and trying this command manually (either exporting the *PATH variables if defined on separate commands, or making sure they are on the same line). It should fail the same way, but you can experiment modifying/expanding the PATH* variables, or using Salome's python instead.

First, could you try:
export PYTHONHOME=/opt/salome/salome_meca/V2015_1/prerequisites/Python_273
Before running that command, or before running "make" again ?.

Regards,

Yvan
seirov
Posts: 9
Joined: Tue Jul 07, 2015 6:42 pm

Re: Coupling Salome_meca + CS + Syrthes

Post by seirov »

Hello,

For syrthes:
I succeeded in installing without any error. Finally, I didn't use your advise but it was related with scotch. I realized that scotch version of saturne is 6.0.4 and of syrthes 6.0.3, and even I tried to install the newer one and make that syrthes points to it, it doesn't like it and needs its own version. So, now I have installed both versions. I hope it doesn't give me any incompatibility.

For Saturne:
I didn't undertand quite well the issue. First of all, I am using the python script to do the installation, not the sequence "configure; make; make install". In this case, I guess it is enough with doing the "export" before running the "install_saturne.py" command.

However, I have installed python 2.7.6 in my OS, and the required version seems to be 2.7.3. Might it be the problem? If not, can you please explain it further?

Thanks a lot!
Yvan Fournier
Posts: 4075
Joined: Mon Feb 20, 2012 3:25 pm

Re: Coupling Salome_meca + CS + Syrthes

Post by Yvan Fournier »

Hello,

Code_Saturne and Syrthes partition their domains independenty, so using a different version/build of Scotch for each is not an issue.

Yes, I believe the different Python versions, or more importantly installs, may be the cause for the issues between SALOME-Meca and Code_Saturne. Python searches for some libraries in its directory structure, so mixing two Python installs with different paths may cause issues.

So if my hypothesis is correct, simply doing the export I mentioned before running the Python installer should work (or at least help things go a bit further).

Regards,

Yvan
seirov
Posts: 9
Joined: Tue Jul 07, 2015 6:42 pm

Re: Coupling Salome_meca + CS + Syrthes

Post by seirov »

Hello,

I tried the export without any result:

Code: Select all

# export PYTHONHOME=/opt/salome/salome_meca/V2015_1/prerequisites/Python_273
# ../code_saturne-4.0.1/install_saturne.py 
ImportError: No module named site
If I open a new xterm, the PYTHONHOME variable returns nothing:

Code: Select all

# echo $PYTHONHOME

Any other idea? Thanks.
Yvan Fournier
Posts: 4075
Joined: Mon Feb 20, 2012 3:25 pm

Re: Coupling Salome_meca + CS + Syrthes

Post by Yvan Fournier »

Hello,

I reproduced the issue on an OpenSUSE 13.2 virtual machine, and have made some progress.

You may first need to "cd" to /opt/salome/salome_meca/V2015_1/prerequisites/Omniorb_16/lib/python2.7/site-packages/, and add a symbolic link : "ln -s _omniidlmodule.so.4.1 _omniidlmodule.so"
to avoid a later issue (different from the initial one) during the build.

After that, the install procedure proper is as follows:

- source SALOME prerequisites (this will always need to be done before running Code_Saturne installed this ways):

source /opt/salome/salome_meca/V2015_1/salome_prerequisites.sh
source /opt/salome/salome_meca/V2015_1/salome_modules.sh

- In the build directory of Code_Saturne (code-saturne-4.0.x-build), check the "configure" command given at the top of the config.log file. Copy this command, add PYTHON=python2.7 to that command, and hit "enter". You may also remove the "--with-salome=/opt/salome/salome_meca/V2015_1" option (as the sourced files provide an alternative)

You should be able to run "make" followed by "make install" after that.

Regards,

Yvan
Yvan Fournier
Posts: 4075
Joined: Mon Feb 20, 2012 3:25 pm

Re: Coupling Salome_meca + CS + Syrthes

Post by Yvan Fournier »

Hello,

Even with my suggestions, there are still later issues:

In the configure command, you need to use an absolute path for Python:
PYTHON=/opt/salome/salome_meca/V2015_1/prerequisites/Python_273/bin/python2.7
Also I needed to add a symbolic link:
cd /opt/salome/salome_meca/V2015_1/prerequisites/Python_273/bin
ln -s python2.7 python
With this, the install and build finishes, but running "code_saturne solame" failed, due to a missing library (or Python import path) related to the Python omniidl wrapper from Salome.

So basically, OpenSUSE is causing additional difficulties compared to other distributions (I know it uses different naming schemes, for example, compared to at least Debian, Ubuntu, and Arch, <prefix>/lib becomes <prefix>/lib64, and <prefix>/libexec becomes <prefix>/lib, so this might cause your initial problem.

After that, the solution I suggested, based on using all tools from the SALOME environment, would work if that environment were complete, but fails due to packaging issues:

For example, with the SALOME-MECA resources loaded, "python2.7" will use Python from SALOME-MECA, while "python" will use that from the system (the symbolic link suggested above solves this, but this is just one of several issues).

So at this point, it is a SALOME packaging/build issue.
There might still be possibilities going back to my initial suggestions, with PYTHONPATH, PYTHONHOME, ..., but finding the right combination may take some time.

Sorry, but that is the most I could do. So for now, you may need to run Code_Saturne outside SALOME (though you can still use SALOME-MECA's prerequisites, such as MED, HDF5, CGNS, ... for Code_Saturne).

Regards,

Yvan
Post Reply