Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
iwan
Posts: 8
Joined: Thu Oct 03, 2019 1:04 pm

Re: Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

Post by iwan »

Hi.

I tried removing the SALOMERUN option (last line in my config fiile) and add the --with-modules=no \.
This time, ./code_saturne gui still works fine and ./code_saturne salome gave

Code: Select all

iwan@iwan-ub18-04:~/code_saturne/for_ub18.04_src/bin$ ./code_saturne salome
/bin/bash: line 4: /bin/salome/envSalome.py: No such file or directory
Kind regards,
Iwan
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

Post by Yvan Fournier »

Hello,

There may be 2 options to try:

- doing a websearch for your error, adding a symbolic link for the missing library between the system Python under /usr/lin/Python3.6 and the Salome Python under /home/iwan/salome/SALOME-9.3.0-UB18.04-SRC/BINARIES-DB09/Python/lib/python3.6/ may help (luckily here, we have the same Python version, so SALOME's could in theory be replaced by the system Python and appropriate PYTHONPATH settings, though there may be more subtle aspects).

- install outside "salome shell" (i.e. from regular environment), and add
SALOMEENVCMD="source /home/iwan/salome/SALOME-9.3.0-UB18.04-SRC/env_launch.sh
to the "configure" options when building (this should compensate for the fact that salome_modules.sh and salome_prerequisites.sh, which are detected by code_saturne in the universal build, do not exist in the Ubuntu build, but is more or less replaced by that file).

For the first option, I can run a few tests on my VM tonight. For the second one, if it does not work, you may combine it with installing from a "salome context".

Best regards,

Yvan
JeremyA
Posts: 31
Joined: Fri Jul 26, 2019 10:33 am

Re: Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

Post by JeremyA »

Hello,

Because it was impossible for me to compile from Sources Salome 9.3.0 (error in compile), and because I can't join their forum, I tried something else :

Salome binaries works well for me in standalone
./Logiciels_Simulation_EDF/SALOME-9.3.0-UB18.04-SRC/salome

Now, I succeeded to install CS 6.0.0 with install-saturne.py, by using libraries in BINARIES folder from Salome
You can see the config.log attached

I tested CS by running FullDomaine Case2, and I got this error message (error.png attached)

Furthermore, under Salome shell, when i ran code_saturne salome, as Iwan's issue, I got the same result "No module _sysconfigdata_m_linux_x86_64-linux-gnu.py"
I created so a symbolic link as you explained Ivan

sudo ln -fs /usr/lib/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py /home/jarancio/Logiciels_Simulation_EDF/SALOME-9.3.0-UB18.04-SRC/BINARIES-UB18.04/Python/lib/python3.6/

I now obtain :

[NS=arancio:2814]$ code_saturne salome
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 27, in <module>
from CommandNotFound.util import crash_guard
ModuleNotFoundError: No module named 'CommandNotFound'


So Code_Saturne Salome doesn't work for me

Anw, I don't even understand what code_saturne under Salome does ..
But It will help I think Iwan

Best regards,

Jeremy
Attachments
error.png
config.log
(210.56 KiB) Downloaded 194 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

Post by Yvan Fournier »

Hello,

The "command_not_found" error is strange. I am not aware of a usual library or module of that name in that place, so I wonder if the link or some other command did not create a file from an incorrect command output. I'll check on Ubuntu.

In any case, using code_saturne with Salome adds a few minor features, such as checking the boundary zone selection (if based on group names) and probe locations directly on SALOME (though this is not as easy to use as it should be due to the way Salome modules interact). Otherwise, with the EDF build, you can have OpenTURNS integration for uncertainty studies. All the rest you can have under "standalone" code_saturne, so using SALOME only to provide prerequisites is fine, the additional integration is probably not worth the effort when the installation does not work immediately.

The other error you have may be due to a bug, or a slightly more restrictive syntax in the MEI expression handling (now transformed to C code in the new MEG part for better performance). Could you post your XML file ? That is all I need to check that part.

Best regards,

Yvan
iwan
Posts: 8
Joined: Thu Oct 03, 2019 1:04 pm

Re: Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

Post by iwan »

Hello,

Congratulation on the compiling. I have not test the build yet, so I do not know if there is any error. However, upon reading the junction tutorial I notice there is no options to choose pre-processing or calculation mode in the my GUI. Do you have those in yours?
You can run code_saturne and salome saparately. i.e. you create geometry and mesh in salome and export the mesh to code_saturne for calculation. Running

Code: Select all

./code_saturne salome
should load a CFDSTUDY module inside salome, think of it like additional CFD module to CAD program. I am planning to integrate salome with code_saturne (CFD) and code_aster (FEA).

Kind regards,
Iwan
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

Post by Yvan Fournier »

Hello,

The preprocessing/calculation mode has been removed in the GUI (replaced by a "computation type" option in the Mesh/proprocessing section), so it is normal that you do not find it.

Also, to start the computation, you now have a button on the toolbar instead of a page in the tree. The other changes in the GUI should be relatively straightforward).

We will need to update the tutorial.

Best regards,

Yvan
JeremyA
Posts: 31
Joined: Fri Jul 26, 2019 10:33 am

Re: Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

Post by JeremyA »

Hello

Here's the XML.file
It was created with CS 5.2 for your information

Best regards

Jérémy
Attachments
setup.xml
(14.37 KiB) Downloaded 192 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

Post by Yvan Fournier »

Hello,

The crash in your setup.xml file is due to some "fragility" in the way the expression is parsed so as to transform it to C code. More work on this is planned.

In the meantime, you can avoid the crash by using line breaks (I recommend indentation also) beween the if, then, else clauses.

For example, replacing:

Code: Select all

if (0<=t<=3.8){ temperature=20 + 100*t; } else { temperature=400; }
with

Code: Select all

if (0<=t<=3.8){
 temperature=20 + 100*t;
}
else {
 temperature=400;
}
avoids the crash:

Best regards,

Yvan
JeremyA
Posts: 31
Joined: Fri Jul 26, 2019 10:33 am

Re: Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

Post by JeremyA »

Hello,

it works !
That was weird anw because I created a subroutine in SRC, which shall overwrite the GUI

However, I got a new issue linked to HDF5 (picture attached)
I found a solution in this forum, but I don't really understand how to solve it

viewtopic.php?f=3&t=2500&p=13644&hilit= ... ory#p13644

Could you explain me pls ?

Thank you very much

Jeremy
Attachments
error.png
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Issue when installing CS 6.0.0 with Salome - Ubuntu 18.04

Post by Yvan Fournier »

Hello,

Is it possible that you installed the code from inside a Salome environment ("salome shell" or "salome context") and are running outside one ?

Do you still have the error when running unde "salome shell" or "salome context" ?

Best regards,

Yvan
Post Reply