Failed to activate module CFDSTUDY

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
blckwtr
Posts: 10
Joined: Mon Mar 21, 2022 9:36 pm

Failed to activate module CFDSTUDY

Post by blckwtr »

I have done everything said in the installation manual, but I can't get the code_aster CFDSTUDY module to run from Salome.

This is the terminal window after executing Salome, then trying to activate the CFDSTUDY from within application...

tommy@tommy-VB:~$ salome_cfd
runSalome running on tommy-VB
Searching for a free port for naming service: 2811 - 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 1.5 seconds
Start SALOME, elapsed time : 1.7 seconds
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/salome/CFDSTUDYGUI.py", line 43, in <module>
from code_saturne.Base.QtCore import *
ModuleNotFoundError: No module named 'code_saturne'
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/salome/CFDSTUDYGUI.py", line 43, in <module>
from code_saturne.Base.QtCore import *
ModuleNotFoundError: No module named 'code_saturne'
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/salome/CFDSTUDYGUI.py", line 43, in <module>
from code_saturne.Base.QtCore import *
ModuleNotFoundError: No module named 'code_saturne'

After checking further, it seems like the module is present in "/home/tommy/Code_Saturne/7.0.4/code_saturne-7.0.4/arch/Linux_x86_64/lib/python3.8/site-packages/code_saturne/" but not "/usr/local/lib/python3.8/site-packages/salome/" which is the path searched for...
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Failed to activate module CFDSTUDY

Post by Yvan Fournier »

Hello,

What's in your config.log or configure command ?

Regards,

Yvan
blckwtr
Posts: 10
Joined: Mon Mar 21, 2022 9:36 pm

Re: Failed to activate module CFDSTUDY

Post by blckwtr »

Please see attached, configura as .txt

I have also modified the .bashrc as follows:

cspath=/home/blckwtr/Code_Saturne/7.0.4-patch/code_saturne-7.0.4-patch/arch/Linux_x86_64/bin/
alias code_saturne="$cspath/code_saturne"

salomepath=/home/blckwtr/salome/SALOME-9.8.0-native-UB20.04-SRC/
alias salome="$salomepath/salome"

export PYTHONPATH=/home/blckwtr/Code_Saturne/7.0.4-patch/code_saturne-7.0.4-patch/arch/Linux_x86_64/lib/python3.8/site-packages
alias salome_cfd=/usr/local/bin/salome_cfd

However, I get a different error now in terminal when I try to launch code saturne from GUI:

blckwtr@blckwtr-VirtualBox:~$ salome_cfd
runSalome running on blckwtr-VirtualBox
Searching for a free port for naming service: 2810 - 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 3.0 seconds
Start SALOME, elapsed time : 3.2 seconds
Can't compile vertex shader.
0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

*** Abort *** an exception was raised, but no catch was found.
... The exception is:SIGSEGV 'segmentation violation' detected. Address 28250433486c
Attachments
configure.txt
(625.33 KiB) Downloaded 139 times
config.log
(67.18 KiB) Downloaded 130 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Failed to activate module CFDSTUDY

Post by Yvan Fournier »

Hello,

Your configuration seems quite "standard", but there is another test I forgot to recommend:

- run salome, using "salome shell"

-under the salome shell, type "which python" and "which python3".

- also run "python3" to see which version it is.

What does this produce ? It should help determine whether Salome uses the system Python or packages its own.

Best regards,

Yvan
blckwtr
Posts: 10
Joined: Mon Mar 21, 2022 9:36 pm

Re: Failed to activate module CFDSTUDY

Post by blckwtr »

I get this output:

blckwtr@blckwtr-VirtualBox:~$ salome shell
[NS=no_host:no_port]$ which python
/usr/bin/python
[NS=no_host:no_port]$ which python3
/usr/bin/python3
[NS=no_host:no_port]$ python3
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

However, in previous attempts to run full installation of saturne, salome, salome_cfd, I was forced to use python-is-pyhon3. So I get the same output when typing "python" in shell. I don't know if this has an affect on the whole operation?
blckwtr
Posts: 10
Joined: Mon Mar 21, 2022 9:36 pm

Re: Failed to activate module CFDSTUDY

Post by blckwtr »

I must also mention that I now acheive to start GUI from salome CFD interface, using the code saturne symbol. However, as soon as i try to rotate the model, it produces this error message (GUI), and no error messages in terminal.

SIGSEGV 'segmentation violation' detected. Address 0

... Now I have to force close the program using CTRL+C.

I think I was able to run the GUI when adding these lines in .bashrc

export MESA_GL_VERSION_OVERRIDE=3.3
export MESA_GLSL_VERSION_OVERRIDE=330

I also did a test without the latter in .bashrc, and I get the same error message, and the GUI is forced shut by the system trying to use code_saturne symbol:

blckwtr@blckwtr-VirtualBox:~$ salome_cfd
runSalome running on blckwtr-VirtualBox
Searching for a free port for naming service: 2810 - 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.0 seconds
Start SALOME, elapsed time : 2.2 seconds
Can't compile vertex shader.
0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

*** Abort *** an exception was raised, but no catch was found.
... The exception is:SIGSEGV 'segmentation violation' detected. Address 28250433486c
blckwtr@blckwtr-VirtualBox:~$
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Failed to activate module CFDSTUDY

Post by Yvan Fournier »

Hello,

It seems SALOME uses the native Python, so there should be no conflicts here.

So if the incompatibility does not come from Python and is graphics-related, the only thing left is Qt/PyQt...
which is not easy to solve.

You could try to install all of code_saturne and salome_cdf_extensions from a "salome shell" (perhaps on a separate build so as not to build the first one, which seems to work outside of SALOME). This is not the most practical solution (as it the requires running under at least a salome context or salome shell each time), but should work.

Best regards,

Yvan
blckwtr
Posts: 10
Joined: Mon Mar 21, 2022 9:36 pm

Re: Failed to activate module CFDSTUDY

Post by blckwtr »

I could give it a try. But do you think it may be related to Virtualbox? And maybe I should try dual boot instead, since all of the steps, dependencies and prerequisites worked perfectly this time?

It seems like the error message is graphics related and memory related...

Found this old post, where a driver incompatibility is mentioned when using virtualbox...

https://www.caelinux.com/CMS3/index.php ... linux-2018
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Failed to activate module CFDSTUDY

Post by Yvan Fournier »

Hello,

Yes, a driver issue is possible, but in this case you should have the same issue using SALOME only.

There is a option in SALOME to run under OSMesa (without acceleration) I think, but unfortunately, the launch mechanism for salome_cfd uses an older mechanism for launching a virtual application, and upgrading to the new system is not trivial (I have been able to experiment with it and see what files need to be updated, but automating this/building an installer is not trivial, and I already wasted an long evening on this while I have more urgent tasks from our roadmap to work on, an I am not aware of who else would be able to/volunteer to work on this).

So dual booting may be the option, IF you observe the same issues with SALOME outside of cfd_study. Otherwise, you are probably wasting your time. The fallback solution being to run code_saturne outside of SALOME (i.e. without CFD_STUDY), possibly using SALOME prerequisites such as MED, CGNS, ...

Best regards,

Yvan
Post Reply