Open alcarnielo opened 11 months ago
Hello,
That tutorial is probably obsolete. Paths such as code_saturne.Base
correspond to the code_saturne 7.0 and older source tree. In v8.0, all the Python code was moved to a common python/code_saturne
subdirectory, with the same directory structure in the source and install directories.
The installation instructions in https://github.com/code-saturne/salome_cfd_extensions/blob/master/README.md are a bit minimalist, but are at least up to date.
Also, with SALOME 9.11, the SSL (server-less) mode is active by default, so an additional change my be needed to force the previous mode (I added a v8.0_pre_ssl branch so fixes can go there if needed).
Unless I am mistaken, starting with SALOME 9.12, the previous CORBA-based mode is removed, with only the SSL mode enabled (this is simpler and lighter), so the old way of running virtual SALOME applications is removed. Meaning the launch mechanism used for salome_cfd will not work anymore. To get things working (using the master branch), we also need to add files in the SALOME installation/configuration so that it can find the salome_cfd extensions. This is done in "in-house" binary builds of salome_cfd, which generate customized builds of SALOME for various applications, but the logic for this is not documented in the general SALOME documentation (as all the relevant documentation is completely out of date).
This is not yet handled in the salome_cfd_extensions installer, and not a priority, as that module is not used much (and not very useful, as the workbench integration is not a game-changer), but I may try to handle that in a coupled of months, if nobody tackles this before that.
I have the same issue as @alcarnielo. Here is my setup: OS : Linux mint 21.3 (Ubuntu 22.04) Code Saturne : 8.0.3 Python : 3.10
When I installed the Master Branch of salome cfd extension, it compiled successfully, but no /usr/local/bin/salome_cfd
When I installed the Branch v8.0_pre_ssl of salome cfd extension, it compiled succesfully, now whenever I type /usr/local/bin/salome_cfd, I got salome running with cfdstudy icon. But when I clicked the icon I got "Failed to activate module CFDSTUDY" message.
Start SALOME, elapsed time : 1.7 seconds Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/salome/CFDSTUDYGUI.py", line 43, in <module> from code_saturne.gui.base.QtCore import * ModuleNotFoundError: No module named 'code_saturne.gui' Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/salome/CFDSTUDYGUI.py", line 43, in <module> from code_saturne.gui.base.QtCore import * ModuleNotFoundError: No module named 'code_saturne.gui' Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/salome/CFDSTUDYGUI.py", line 43, in <module> from code_saturne.gui.base.QtCore import * ModuleNotFoundError: No module named 'code_saturne.gui' Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/salome/CFDSTUDYGUI.py", line 43, in <module> from code_saturne.gui.base.QtCore import * ModuleNotFoundError: No module named 'code_saturne.gui'
PS: I have tried installing Code Saturne 7.0 (the same as youtube video), but failed due to broken link.
@alcarnielo : Have you solved the problem. I came here also following the Youtube Tutorial. Thanks for sharing
@YvanFournier : A detailed description would be helpful especially for a newbie like me. Many thanks
Hello @batoceragaming,
The error you have might be due to an incorrectly specified CS_ROOT_DIR
.
Which version of SALOME are you using ? What is the config.log of your installation ? The README.md file for this module was updated for recent SALOME versions (such as 9.12), which may be incompatible with the pre-ssl branches.
And for the SSL mode, there is no "salome_cfd" script anymore, but there is a configure/install option to directly add the module in you main SALOME installation. The installation is quite different from the pre-SSL version, but this is needed to keep up to date with SALOME changes.
@YvanFournier : Currenty I use the latest Salome (9.12.0). Where can I find the config.log?
If there is no "salome_cfd" anymore. Then How can I activate the salome_cfd extension?
As I mentioned above, I have tried both pre SSL and the master build.
Is there any simpler method to install salome_cfd extension like in FREECAD where there is a workbench? or like Code Aster which is built in Salome Meca? I am pretty sure that more people especially the newbie like me that would love to use salome cfd. The only hurdle is the installation which is very difficult in my opinion.
Many Thanks
config.log Here's the config.log file that I found via searching in the file manager.
Hello @batoceragaming,
Your CS_ROOT_DIR
variable should not contain the bin
directory, just /home/bato/code_saturne/8.0.3/code_saturne-8.0.3/arch/Linux_x86_64.
You can try the following command line (adapted to your paths:
/home/D43345/Code_Saturne/salome_cfd_extensions/configure --prefix=/home/bato/salome/SALOME-9.12.0/EDF/cfdstudy --with-salome=/home/bato/salome/SALOME-9.12.0 CS_ROOT_DIR=/home/bato/code_saturne/8.0.3/code_saturne-8.0.3/arch/Linux_x86_64 OMNIIDL=/home/bato/opt/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/bin/omniidl --with-env-id=120
This will install the salome_cfd extensions in an EDF subdirectory in your main SALOME install. In the SALOME Desktop, a code_saturne icon should appear on the toolbar if everything is good.
The OMNIIDL
specification might not be needed but seems needed on Debian 11 so as to find the correct Omni IDL (build tool) verion.
I used the latest salome cfd extension and your script, everything seems ok but I got error
Here is my step by step:
cd /home/bato/salome/salome_cfd_extensions
/home/bato/salome/salome_cfd_extensions/configure --prefix=/home/bato/salome/SALOME-9.12.0/EDF/cfdstudy --with-salome=/home/bato/salome/SALOME-9.12.0 CS_ROOT_DIR=/home/bato/code_saturne/8.0.3/code_saturne-8.0.3/arch/Linux_x86_64 OMNIIDL=/home/bato/opt/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/bin/omniidl --with-env-id=120
In file included from CFDSTUDY_GenSK.cc:3: CFDSTUDY_Gen.hh:6:10: fatal error: omniORB4/CORBA.h: No such file or directory 6 | #include <omniORB4/CORBA.h>
Hello,
The path above is incorrect (typo on my side). Try OMNIIDL=/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/bin/omniidl.
So for the whole,
/home/D43345/Code_Saturne/salome_cfd_extensions/configure --prefix=/home/bato/salome/SALOME-9.12.0/EDF/cfdstudy --with-salome=/home/bato/salome/SALOME-9.12.0 CS_ROOT_DIR=/home/bato/code_saturne/8.0.3/code_saturne-8.0.3/arch/Linux_x86_64 OMNIIDL=/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/bin/omniidl --with-env-id=120
If you still have the error, check if there a CORBA.h file somewhere in the SALOME-9.12.0 tre. The binaries might contain different prerequisites for Ubuntu 22 and Debian 11, depending on the available native packages. If this file is nor present at all, you may need to install the Debian package for omniorb
(and possibly omniorb-dev
if it exists).
But check the corrected path first.
Hi @YvanFournier, thanks for your reply. I can confirm that omniidl is in the correct path and the omniorb is included.
Here's my updated command from revision:
/home/bato/salome/salome_cfd_extensions/configure --prefix=/home/bato/salome/SALOME-9.12.0/EDF/cfdstudy --with-salome=/home/bato/salome/SALOME-9.12.0 CS_ROOT_DIR=/home/bato/code_saturne/8.0.3/code_saturne-8.0.3/arch/Linux_x86_64 OMNIIDL=/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/bin/omniidl --with-env-id=120
However I got this new error:
make all-recursive make[1]: Entering directory '/home/bato/salome/salome_cfd_extensions' Making all in cfd_study make[2]: Entering directory '/home/bato/salome/salome_cfd_extensions/cfd_study' Making all in idl make[3]: Entering directory '/home/bato/salome/salome_cfd_extensions/cfd_study/idl' make all-am make[4]: Entering directory '/home/bato/salome/salome_cfd_extensions/cfd_study/idl' /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -DNDEBUG -I/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/KERNEL/include/salome -I/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/include -I/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/include/omniORB4 -I/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/include/COS -I/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/GUI/include/salome -g -O2 -MT libSalomeIDLCFDSTUDY_la-CFDSTUDY_GenSK.lo -MD -MP -MF .deps/libSalomeIDLCFDSTUDY_la-CFDSTUDY_GenSK.Tpo -c -o libSalomeIDLCFDSTUDY_la-CFDSTUDY_GenSK.lo
test -f 'CFDSTUDY_GenSK.cc' || echo './'CFDSTUDY_GenSK.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -DNDEBUG -I/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/KERNEL/include/salome -I/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/include -I/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/include/omniORB4 -I/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/include/COS -I/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/GUI/include/salome -g -O2 -MT libSalomeIDLCFDSTUDY_la-CFDSTUDY_GenSK.lo -MD -MP -MF .deps/libSalomeIDLCFDSTUDY_la-CFDSTUDY_GenSK.Tpo -c CFDSTUDY_GenSK.cc -fPIC -DPIC -o .libs/libSalomeIDLCFDSTUDY_la-CFDSTUDY_GenSK.o mv -f .deps/libSalomeIDLCFDSTUDY_la-CFDSTUDY_GenSK.Tpo .deps/libSalomeIDLCFDSTUDY_la-CFDSTUDY_GenSK.Plo make[4]: *** No rule to make target 'CFDSTUDY_GenDynSK.cc', needed by 'libSalomeIDLCFDSTUDY_la-CFDSTUDY_GenDynSK.lo'. Stop.
It says:
make[4]: *** No rule to make target 'CFDSTUDY_GenDynSK.cc', needed by 'libSalomeIDLCFDSTUDY_la-CFDSTUDY_GenDynSK.lo'. Stop.
Hello,
The first command run by the makefile in the directory should be omniidl
, which creates the required files.
Can you post your new config.log
, and the output of the configure phase in a terminal, to see wy it does not to be found or called ?
Here's my new config.log config.log
Hello,
I suppose the issue is related to the following error:
./conftest: error while loading shared libraries: libomniORB4.so.2: cannot open shared object file: No such file or directory
Is there a libomniORB4.so.2
file somewhere under /home/bato/salome/SALOME-9.12.0
? Probably in /home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/
?
If so, you may need to source the SALOME environment (i.e. run the salome_cfd_extensions under a salome shell), or more simply try :
export LD_LIBRARY_PATH=/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB:$LD_LIBRARY_PATH
/home/bato/salome/salome_cfd_extensions/configure --prefix=/home/bato/salome/SALOME-9.12.0/EDF/cfdstudy --with-salome=/home/bato/salome/SALOME-9.12.0 CS_ROOT_DIR=/home/bato/code_saturne/8.0.3/code_saturne-8.0.3/arch/Linux_x86_64 OMNIIDL=/home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/bin/omniidl --with-env-id=120
Instead of just the configure command.
yes, I found it in this location. /home/bato/salome/SALOME-9.12.0/BINARIES-UB22.04/omniORB/lib
what should I do next?
I have tried both export LD_LIBRARY_PATH and configure command, still have the same issue
I tried the following today ...
cd /apps/Salome912U/ _# my Salome Ubuntu native 22.04 is in apps Salome912:_
bash ./env_launch.sh _# not sure if this is needed_
unzip salome_cfd_extensions-master.zip _# extract & rename the cfd extensions_
mv salome_cfd_extensions-master/ src_cfd-study _# rename source folder_
cd src_cfd-study/
export salome_root_dir=/apps/Salome912U _# exports_
export CS_ROOT_DIR=/apps/Salome912U/run-saturne/bin _# ... not sure about the /bin at the end?_
./sbin/bootstrap _# this worked to create the configure script (after autoconf failed)_
mkdir build && cd build
# configure the build from build folder with prefix:
../src_cfd-study/configure --prefix=/apps/Salome912U/run-cfd-study \
--with-salome=/apps/Salome912U \
CS_ROOT_DIR=/apps/Salome912U/run-saturne/bin \
OMNIIDL=/apps/Salome912U/BINARIES-UB22.04/omniORB/bin/omniidl \
--with-env-id=120
make && make install
So I got an install in the run-cfd-study folder ... but I'm not sure how to check integration in Salome after startup ?
I have just finished the installation of salome_cfd module based on this (tutorial)[https://www.youtube.com/watch?v=wVxtVCC9HKY&t=1605s].
When I run the CFD module in salome, I get this error:
Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/salome/CFDSTUDYGUI.py", line 43, in
from code_saturne.Base.QtCore import
ModuleNotFoundError: No module named 'code_saturne.Base'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/salome/CFDSTUDYGUI.py", line 43, in
from code_saturne.Base.QtCore import
ModuleNotFoundError: No module named 'code_saturne.Base'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/salome/CFDSTUDYGUI.py", line 43, in
from code_saturne.Base.QtCore import
ModuleNotFoundError: No module named 'code_saturne.Base'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/salome/CFDSTUDYGUI.py", line 43, in
from code_saturne.Base.QtCore import
ModuleNotFoundError: No module named 'code_saturne.Base'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/salome/CFDSTUDYGUI.py", line 43, in
from code_saturne.Base.QtCore import
ModuleNotFoundError: No module named 'code_saturne.Base'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/salome/CFDSTUDYGUI.py", line 43, in
from code_saturne.Base.QtCore import
ModuleNotFoundError: No module named 'code_saturne.Base'
I have already exported the PYTHONPATH and included in my .bashrc file, but the error persists.
I installed everything in an UBUNTU22.04 using the last stable version of each one of the packages.
Note.: It seems that the CFDSTUDYGUI.py is calling the "Base" pack when the existing one is "base".