Error while compiling CS-5.0.4 + Salome-8.3.0 under opensuse

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
pablocaron
Posts: 6
Joined: Thu Oct 26, 2017 12:58 am

Error while compiling CS-5.0.4 + Salome-8.3.0 under opensuse

Post by pablocaron »

Hello,

I am trying to compile Code_Saturne-5.0.4 and the CFDStudy module for Salome-8.3.0 under OpenSUSE 42.2.
Salome-8.3.0 was installed using the linux universal installer provided by (http://www.salome-platform.org).

I configured code_saturne using the following configuration

Code: Select all

../code_saturne-5.0.4/configure --prefix=/home/pablo/Programas/code_saturne/5.0.4 --with-salome=/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public --with-mpi-include=/usr/lib64/mpi/gcc/openmpi/include CC=mpicc --with-hdf5=salome --with-cgns=salome --with-med=salome
The config.log file is attached to this post. Then the make step stoped with the following error:

Code: Select all

Making all in salome
make[2]: Entering directory '/home/pablo/Programas/code_saturne-5.0.4_build/salome'
Making all in cfd_study
make[3]: Entering directory '/home/pablo/Programas/code_saturne-5.0.4_build/salome/cfd_study'
Making all in idl
make[4]: Entering directory '/home/pablo/Programas/code_saturne-5.0.4_build/salome/cfd_study/idl'
PYTHONPATH=/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Omniorb-416/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Omniorb-416/lib/python2.7/site-packages${PYTHONPATH:+:$PYTHONPATH} \
LD_LIBRARY_PATH=/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Python-2710/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} \
/usr/bin/python /home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Omniorb-416/bin/omniidl -bcxx -Wba -nf -I/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Omniorb-416/idl -I/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/modules/KERNEL_V8_3_0/idl/salome -I/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/modules/GUI_V8_3_0/idl/salome ../../../../code_saturne-5.0.4/salome/cfd_study/idl/CFDSTUDY_Gen.idl
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
Makefile:1080: recipe for target 'CFDSTUDY_GenSK.cc' failed
make[4]: *** [CFDSTUDY_GenSK.cc] Error 1
make[4]: Leaving directory '/home/pablo/Programas/code_saturne-5.0.4_build/salome/cfd_study/idl'
Makefile:629: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/pablo/Programas/code_saturne-5.0.4_build/salome/cfd_study'
Makefile:630: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/pablo/Programas/code_saturne-5.0.4_build/salome'
Makefile:1435: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pablo/Programas/code_saturne-5.0.4_build'
Makefile:926: recipe for target 'all' failed
make: *** [all] Error 2
I would appreciate your help in solving this problem.

Pablo

PS: I include some comments about the installation
1) I resolved some issues regarding tcl version since the system version is 8.6. I downloaded tcl8.5 and tk8.5 and added the libraries to the LD_LIBRARY_PATH variable also added the binary tclsh8.5 to the PATH variable.
2) The python version installed with the system is 2.7.13.
Attachments
config.log
(269.65 KiB) Downloaded 324 times
Yvan Fournier
Posts: 4075
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error while compiling CS-5.0.4 + Salome-8.3.0 under open

Post by Yvan Fournier »

Hello,

Combining Salome and openSUSE has often been quite difficult (you may have found some posts regarding this on this forum, dating back 2 or 3 years).

openSUSE uses a slightly different directory structure than most Linux distributions (for example uses lib instead of libexec for some files), but the issue might simply be due to different versions of Python.

I have a virtual machine with openSUSE TumbleWeed on which I could run some tests, but won't promise doing it right now (just back from vacation and have quite a few things on my TODO list).

Otherwise, your error messages may be related to an issue I encountered recently, and for which I made a small change in trunk in revision 10615, and v5.0 in revision 10617 (i.e. wil be in v5.0.5). The change is here https://www.code-saturne.org/viewvc/sat ... 5&r2=10617.

Pulling the code from svn or adapting your version of 5.0.4 to change this in both the Makefile.am and generated Makefile.in (before re-running configure) might (probably) solve your issue.

Otherwise I expect to release 5.0.5 withing a week or so.

Regards,

Yvan
pablocaron
Posts: 6
Joined: Thu Oct 26, 2017 12:58 am

Re: Error while compiling CS-5.0.4 + Salome-8.3.0 under open

Post by pablocaron »

Hello Yvan,

thank you for your quick reply. I changed the file salome/cfd_study/idl/Makefile.am by hand following the diff you passed to me. Then, I deleted all the content in my build directory to do a fresh install, repeated the configure and make steps. After a while compiling the process stops at the same place.

Please, let me known if I can do something to solve this issue, i.e. tests, changes, etc. If not, I will wait you to have some free time to solve this.

Regards

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

Re: Error while compiling CS-5.0.4 + Salome-8.3.0 under open

Post by Yvan Fournier »

Hello,

Did you also modify the Makefile.in file or run sbin/bootstrap in the sources directory ? If not, the change has no effect.

Regards,

Yvan
pablocaron
Posts: 6
Joined: Thu Oct 26, 2017 12:58 am

Re: Error while compiling CS-5.0.4 + Salome-8.3.0 under open

Post by pablocaron »

Hello Yvan,

I missed to change Makefile.in. I repeated the procedure again changing the following files acording to your recommendation

Code: Select all

code_saturne-5.0.4/salome/cfd_study/idl/Makefile.am
code_saturne-5.0.4/salome/cfd_study/idl/Makefile.in
code_saturne-5.0.4/salome/fsi_coupling/idl/Makefile.am
code_saturne-5.0.4/salome/fsi_coupling/idl/Makefile.in
Then the make and make install process finished without error but the CFDSTUDY module can not start. I launched salome with the following command

Code: Select all

code_saturne salome
I launched the CFDSTUDY module then I pressed the New button. The error message shown in the terminal is

Code: Select all

Traceback (most recent call last):
  File "/home/pablo/Programas/code_saturne/5.0.4/lib/python2.7/site-packages/salome/CFDSTUDYGUI.py", line 43, in <module>
    from code_saturne.Base.QtCore    import *
  File "/home/pablo/Programas/code_saturne/5.0.4/lib/python2.7/site-packages/code_saturne/Base/QtCore.py", line 7, in <module>
    from PyQt4.QtCore import *
ImportError: No module named PyQt4.QtCore
Maybe is something related with the Python version used by salome and the one installed in the system. Any ideas?

Regards

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

Re: Error while compiling CS-5.0.4 + Salome-8.3.0 under open

Post by Yvan Fournier »

Hello,

Yes, this is probably related to the differences in Python installs.

Does the GUI work normally when running Code_Saturne in "standalone" mode (ie "code_saturne gui" rather than "code_saturne salome") ?

If you run
. /home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/salome_prerequisites.sh; export ROOT_SALOME=/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public; . /home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/salome_modules.sh'
Then
echo $PYTHONPATH
what do you obtain ?

Regards,

Yvan
pablocaron
Posts: 6
Joined: Thu Oct 26, 2017 12:58 am

Re: Error while compiling CS-5.0.4 + Salome-8.3.0 under open

Post by pablocaron »

Hello,

The standalone mode seems to work ok. It starts but I did not try to solve a test case, yet.

After executing the command you passed to me the standalone mode stops working. Below you can see the PYTHONPATH variable contents and the error after executing the command.

Code: Select all

pablo@minah:~> code_saturne gui          "<----- This works ok!"

pablo@minah:~> . /home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/salome_prerequisites.sh; export ROOT_SALOME=/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public; . /home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/salome_modules.sh
pablo@minah:~> echo $PYTHONPATH
/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Lxml-340/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Pkgconfig-110/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/H5py-250/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Cython-0232/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/modules/SMESH_V8_3_0/share/salome/plugins/smesh/Verima:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/tools/Medcoupling-V8_3_0/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Scipy-0151/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Paraview-v512_EDF/lib/paraview-5.1/site-packages/paraview/vtk:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Paraview-v512_EDF/lib/paraview-5.1/site-packages/vtk:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Paraview-v512_EDF/lib/paraview-5.1/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Paraview-v512_EDF/lib/paraview-5.1:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Matplotlib-143/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Pyqt-560/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Jinja-273/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Numpy-192/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Libxml2-290/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/tools/Libbatch-V2_3_1/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/tools/Medfichier-321/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Omniorbpy-36/lib/python2.7/site-packages/omniidl_be:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Omniorbpy-36/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Docutils-012/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Pygments-202/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Omniorb-416/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Sip-418/lib/python2.7/site-packages:/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Python-2710/lib/python2.7/site-packages:
pablo@minah:~> code_saturne gui
  Error: Unable to import QtCore or QtGui modules.
  Please check your PyQt4 or PyQt5 installation.
Regards

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

Re: Error while compiling CS-5.0.4 + Salome-8.3.0 under open

Post by Yvan Fournier »

Hello,

I think I understand you you have an error: Salome 8.3 uses Qt5, while your build of Code_Saturne used Qt4. I recommend reinstalling with Qt5 instead of Qt4. Do do this:
- make sure PyQt5 is installed on your machine
- with version 5.0 of Code_Saturne, add QT_SELECT=5 at the end of the "configure" line (when both versions are available, the default is PyQt4 for Code_Saturne 5.0, PyQt5 for Code_Saturne 5.1 or later.

Regards,

Yvan
pablocaron
Posts: 6
Joined: Thu Oct 26, 2017 12:58 am

Re: Error while compiling CS-5.0.4 + Salome-8.3.0 under open

Post by pablocaron »

Hello,

I followed your instructions and configured and maked code_saturne from scratch. I attach two screenshots I taked just after starting "code_saturne salome". The result looks promising, although according the tutorial
https://www.code-saturne.org/cms/sites/ ... tyFlow.pdf (pages 8 and 9) there are several options/things missing.

Bellow you can find the error messages shown in the command line.

Code: Select all

~> code_saturne salome
runSalome running on minah
Searching for a free port for naming service: 2815 - OK
Searching Naming Service + found in 0.1 seconds 
Searching /Kernel/Session in Naming Service +Warning, no type found for resource "localhost", using default value "single_machine"
++++ found in 2.5 seconds 
Start SALOME, elapsed time :   2.7 seconds
Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/pablo/Programas/code_saturne/5.0.4/lib/python2.7/site-packages/salome/CFDSTUDYGUI.py", line 291, in deactivate
    ActionHandler = _DesktopMgr.getActionHandler(dsk)
  File "/home/pablo/Programas/code_saturne/5.0.4/lib/python2.7/site-packages/salome/CFDSTUDYGUI_DesktopMgr.py", line 94, in getActionHandler
    ah = CFDSTUDYGUI_ActionsHandler()
  File "/home/pablo/Programas/code_saturne/5.0.4/lib/python2.7/site-packages/salome/CFDSTUDYGUI_ActionsHandler.py", line 197, in __init__
    self.DialogCollector = CFDSTUDYGUI_DialogCollector.CFDSTUDYGUI_DialogCollector()
  File "/home/pablo/Programas/code_saturne/5.0.4/lib/python2.7/site-packages/salome/CFDSTUDYGUI_DialogCollector.py", line 823, in __init__
    self.SetTreeLocationDialog = SetTreeLocationDialogHandler()
  File "/home/pablo/Programas/code_saturne/5.0.4/lib/python2.7/site-packages/salome/CFDSTUDYGUI_DialogCollector.py", line 198, in __init__
    if "neptune_cfd" not in os.listdir(os.path.join(os.getenv("CS_ROOT_DIR"),"bin")):
  File "/home/pablo/Programas/Salome_8.3.0/Salome-V8_3_0-univ-public/prerequisites/Python-2710/lib/python2.7/posixpath.py", line 70, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Regards

Pablo
Attachments
Screenshot_20171031_102314.png
Screenshot_20171031_102138.png
Yvan Fournier
Posts: 4075
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error while compiling CS-5.0.4 + Salome-8.3.0 under open

Post by Yvan Fournier »

Hello,

This seems to be a bug introduced by the Salome_CFD packaging (not yet publicly available, but hopefully, shou should be able to download a precompiled Salome + CFD_Study/Code_Saturne in the future).

I'll fix it in version 5.0.5, but in the meantime, if you simply run:
export CS_ROOT_DIR=/home/pablo/Programas/code_saturne/5.0.4
before running "code_saturne salome"
you should be OK.

Best regards, and sorry for the bug.

Yvan
Post Reply