Installation of Code_Saturne, Salome-meca and Syrthes

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

Installation of Code_Saturne, Salome-meca and Syrthes

Post by c.jauselabert »

Hi everyone,

I know that this is one typical topic of this forum but I have troubles installing code_saturne-4.0.2 with Salome-meca V2015-2 and Syrthes4.3.0.

I work on the Ubuntu 14.04.1 LTS.

First, I installed Salome_meca with the SALOME-MECA-2015.2-LGPL.run and the installation did not return any error information.

I then tried to install Syrthes ang got somme errors concerning med and metis library. You can find attached the config file and the ERREUR.log file. Code_Saturne would be built under /home/jause/CS_build

Anyway, I tried to install code_saturne : compile works nicely.

The configure command is :

Code: Select all

../Downloads/code_saturne-4.0.2/configure \
PYTHON=python2.7 \
--with-mpi=/usr/bin \
--with-scotch=/usr/local \
--with-hdf5=/home/jause/salome_meca/V2015_2/prerequisites/Hdf5-1810 \
--with-med=/home/jause/syrthes4.3.0/extern-libraries/opt/med-3.0.7/arch/Linux_x86_64 \
--with-cgns=/home/jause/salome_meca/V2015_2/prerequisites/Cgnslib-3134 \
--with-libxml2=/home/jause/salome_meca/V2015_2/prerequisites/Libxml2-290 \
--without-salome-med
I installed in /usr/local the 6.0.4 version of scotch because the installation was not working with the scotch-5.1.1 of the Salome meca directory and with the scotch-6.0.2 of syrthes.

But I get this error :

Code: Select all

libtool: link: gcc -shared  .libs/cs_solver.o  -Wl,--whole-archive ../../src/fvm/.libs/libfvm_filters.a ../../src/base/.libs/libcsbase.a ../../src/base/.libs/libcscore.a ../../src/base/.libs/libcsrenumber.a ../../src/pprt/.libs/libcspprt.a ../../src/alge/.libs/libcsalge.a ../../src/mesh/.libs/libcsmesh.a ../../src/mesh/.libs/libcspartition.a ../../src/turb/.libs/libcsturb.a ../../src/atmo/.libs/libcsatmo.a ../../src/cfbl/.libs/libcscfbl.a ../../src/cogz/.libs/libcscogz.a ../../src/comb/.libs/libcscomb.a ../../src/ctwr/.libs/libcsctwr.a ../../src/darc/.libs/libcsdarc.a ../../src/elec/.libs/libcselec.a ../../src/gui/.libs/libcsgui.a ../../src/lagr/.libs/libcslagr.a ../../src/rayt/.libs/libcsrayt.a ../../src/user/.libs/libcsuser.a ../../src/.libs/libcsmodules.a ../../src/mei/.libs/libmei.a ../../src/bft/.libs/libbft.a -Wl,--no-whole-archive  -Wl,-rpath -Wl,/home/jause/CS_build/libple/src/.libs -Wl,-rpath -Wl,/home/jause/syrthes4.3.0/extern-libraries/opt/med-3.0.7/arch/Linux_x86_64/lib -Wl,-rpath -Wl,/home/jause/syrthes4.3.0/extern-libraries/opt/med-3.0.7/arch/Linux_x86_64/lib -Wl,-rpath -Wl,/home/jause/salome_meca/V2015_2/prerequisites/Cgnslib-3134/lib -Wl,-rpath -Wl,/home/jause/salome_meca/V2015_2/prerequisites/Hdf5-1810/lib -Wl,-rpath -Wl,/usr/local/lib -L/home/jause/salome_meca/V2015_2/prerequisites/Cgnslib-3134/lib -L/home/jause/syrthes4.3.0/extern-libraries/opt/med-3.0.7/arch/Linux_x86_64/lib -L/home/jause/salome_meca/V2015_2/prerequisites/Hdf5-1810/lib -L/usr/bin/lib ../../libple/src/.libs/libple.so -lcgns /home/jause/syrthes4.3.0/extern-libraries/opt/med-3.0.7/arch/Linux_x86_64/lib/libmedC.so -lhdf5 -L/usr/local/lib -lptscotch -lscotch -lmpi -L/home/jause/salome_meca/V2015_2/prerequisites/Libxml2-290/lib -lxml2 -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lgfortran -lm -lquadmath -lnsl -lz -ldl  -pthread -Wl,-export-dynamic   -pthread -Wl,-soname -Wl,libsaturne.so.0 -o .libs/libsaturne.so.0.0.0
/usr/bin/ld: /usr/local/lib/libptscotch.a(library_dgraph.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libptscotch.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[3]: *** [libsaturne.la] Error 1
make[3]: Leaving directory `/home/jause/CS_build/src/apps'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/jause/CS_build/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jause/CS_build'
make: *** [all] Error 2

Can someone help me?

Thanks!

I join the config.log of the compile step.

Regards,

CJL
Attachments
config.log
(275.14 KiB) Downloaded 417 times
setup.txt
Setup.ini file of Syrthes
(4.63 KiB) Downloaded 427 times
ERREUR.log
(4.77 KiB) Downloaded 455 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Installation of Code_Saturne, Salome-meca and Syrthes

Post by Yvan Fournier »

Hello,

I guess I'll need to add more comments on the specifics of the installation of Scotch in our installation manual...

When in stalling Scotch/PT-Scotch, I assumed you needed to copy a Makefile.inc template to "src" in its directory tree. Most templates generate static libraries, which do not mix well with dynamic libraries (you can call dynamic from static, but not the opposite).

So one solution would to to add "--disable-shared" to Code_Saturne's configure options, but a better option is to compile Scotch with dynamic libraries, using for example the Makefile.inc.x86-64_pc_linux2.shlib template (and removing -DSCOTCH\_PTHREAD as recommended in the Code_Saturne installation doc).

On a small number of ranks, Scotch might not be that useful at all (the built-in Morton or Hilbert curve partitioners are OK), so installing it may be a "luxury".

Best regards,

Yvan
c.jauselabert

Re: Installation of Code_Saturne, Salome-meca and Syrthes

Post by c.jauselabert »

Yvan,

Thank you for your answer. I might have read too quickly the installation guide. Sorry about that...

However, "make" works great and I get another issue typing "sudo make install"

Code: Select all

make[5]: Entering directory `/home/jause/CS_build/salome/cfd_study/src/CFDSTUDYGUI'
/home/jause/salome_meca/V2015_2/prerequisites/Pyqt-496/bin/pyuic4 ../../../../../Downloads/code_saturne-4.0.2/salome/cfd_study/src/CFDSTUDYGUI/CFDSTUDYGUI_QProcessDialog.ui -x -o ui_CFDSTUDYGUI_QProcessDialog.py
Traceback (most recent call last):
  File "/home/jause/salome_meca/V2015_2/prerequisites/Pyqt-496/lib/python2.7/site-packages/PyQt4/uic/pyuic.py", line 31, in <module>
    from PyQt4 import QtCore
ImportError: No module named PyQt4
make[5]: *** [ui_CFDSTUDYGUI_QProcessDialog.py] Error 1
make[5]: Leaving directory `/home/jause/CS_build/salome/cfd_study/src/CFDSTUDYGUI'
make[4]: *** [install-am] Error 2
make[4]: Leaving directory `/home/jause/CS_build/salome/cfd_study/src/CFDSTUDYGUI'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/jause/CS_build/salome/cfd_study/src'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/jause/CS_build/salome/cfd_study'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/jause/CS_build/salome'
make: *** [install-recursive] Error 1
If you have any idea, it would be much appreciated :D

Regards,

CJL
c.jauselabert

Re: Installation of Code_Saturne, Salome-meca and Syrthes

Post by c.jauselabert »

Hello,

I finally got through the installation process of CS successfully!! The PyQt4 compilation issue is over.

However, do you have an idea concerning the problems I encounter considering syrthes installation?

Thanks,

Regards,

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

Re: Installation of Code_Saturne, Salome-meca and Syrthes

Post by Yvan Fournier »

Hello,

I was starting to answer:
Could you try installing in a user directory, so you can use "make install instead of sudo make install ?"

I am not sure, but sudo might not propagate some environment variables required for SALOME (as you used SALOME's Qt4, I assume you sourced the SALOME environment first) ?

Otherwise, using Ubuntu's Python and Qt4 could probably solve the issue (though it might cause others ; SALOME having its own user, but not developer libraries often causes issues/mixes with the base OS).
whe I saw your new post...

As for Syrthes, it does not see to find MED ,so your setup.ini might be wrong.

Regards,

Yvan
c.jauselabert

Re: Installation of Code_Saturne, Salome-meca and Syrthes

Post by c.jauselabert »

Yvan,

Thanks again for your very fast answer.

I did as you adviced and installed CS in a user directory. The installation process seems to go well but when I try to launch CS, I got the following error :
jause@PC466:~$ code_saturne gui
bash: /home/jause/Code_Saturne_4.0.2/bin/code_saturne: python2.7: bad interpreter: No such file or directory
I am sorry to bother you again!!!

And I did not use the metis library for Syrthes (only scotch) and it all went well!

Regards,

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

Re: Installation of Code_Saturne, Salome-meca and Syrthes

Post by Yvan Fournier »

Hello,

Did you source the Salome environment (If you used Salome's Python for Code_Saturne, you might need to).

Regards,

Yvan
c.jauselabert

Re: Installation of Code_Saturne, Salome-meca and Syrthes

Post by c.jauselabert »

Hello,

I did source source Salome environment typing :

Code: Select all

source /home/jause/salome_meca/appli_V2015_2/env.d/envProducts.sh
and I do have the same error message.

When I try to configure CS without "PYTHON=python2.7" in the configure command and do make and make install, I can launch salome with "code_saturne salome" and it seems to work.
I'll get back at you if somme errors appear.

By the way, what is the interest of specifying "PYTHON=python2.7"?

Thanks again

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

Re: Installation of Code_Saturne, Salome-meca and Syrthes

Post by Yvan Fournier »

Hello,

This confirms the issue is related to Salome.

Depending on the version of Python installed on your sytem and that of Salome,
PYTHON=python2.7 may force the install to use the one which also has a varient "python2.7" name (assuming this is true for only one of the 2).

Regards,

Yvan
Post Reply