# Issue with launching calculation involving code\_saturne, Persalys, and SALOME

**URL:** <https://persalys.discourse.group/t/issue-with-launching-calculation-involving-code-saturne-persalys-and-salome/125>\
**Category:** Persalys usage\
**Created:** [May 24, 2023, 7:35am UTC](https://persalys.discourse.group/t/issue-with-launching-calculation-involving-code-saturne-persalys-and-salome/125 "2023-05-24T07:35:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![freddy.fang](https://yyz2.discourse-cdn.com/free1/user_avatar/persalys.discourse.group/freddy.fang/32/96_2.png) [@freddy.fang](https://persalys.discourse.group/u/freddy.fang)\
**Post date:** [May 24, 2023, 7:35am UTC](https://persalys.discourse.group/t/issue-with-launching-calculation-involving-code-saturne-persalys-and-salome/125/1 "2023-05-24T07:35:26Z")

</div>

Hi everyone,

I’m currently working on launching a calculation that requires the coupling of **code\_saturne & Persalys** (in Linux). I want to use the ‘Design of experiments’ feature so that I can launch a series of CFD calculations with different mesh parameters. Since I need to change some parameters of the mesh, I use a python scripts to generate a mesh automatically by SALOME for each run.

The issue is that when the shell commands include the SALOME command, e.g. (./salome -t generate\_mesh.py), when i click ‘check model’, Persalys is unable to read the output, resulting in the software becoming unresponsive. Strangely, when I comment out this line, everything runs smoothly.

I believe that the environment parameters or something else using by Persalys may be altered due to my using SALOME, but I’m not sure how to fix that since I know very little about the software. Please let me know if you need any further information or if there are any suggestions you can provide.

PS: The version of _Persalys is 12.0_ and the version of _SALOME is 9.6.0_, the ‘code\_saturne’ shell command is posted

[code\_saturne.sh.xml](https://persalys.discourse.group/uploads/short-url/wsgd8OwP92VrYLI7dtbKq8JAk22.xml)  
and ‘salome’ script is here [salome.xml](https://persalys.discourse.group/uploads/short-url/vO5ushxuFRb3VHm8ftcGnXVM2b0.xml).

Regards,  
Freddy

---

<div class="post-metadata">

**Author:** ![dumas](https://yyz2.discourse-cdn.com/free1/user_avatar/persalys.discourse.group/dumas/32/5_2.png) [@dumas](https://persalys.discourse.group/u/dumas)\
**Post date:** [May 30, 2023, 1:49pm UTC](https://persalys.discourse.group/t/issue-with-launching-calculation-involving-code-saturne-persalys-and-salome/125/2 "2023-05-30T13:49:44Z")

</div>

Hi Freddy,

I think there may be a problem of path between the python of Persalys and the one of SALOME. @GGarcia do you think it could be this problem ?

Regards,  
Antoine

---

<div class="post-metadata">

**Author:** ![freddy.fang](https://yyz2.discourse-cdn.com/free1/user_avatar/persalys.discourse.group/freddy.fang/32/96_2.png) [@freddy.fang](https://persalys.discourse.group/u/freddy.fang)\
**Post date:** [May 31, 2023, 1:45am UTC](https://persalys.discourse.group/t/issue-with-launching-calculation-involving-code-saturne-persalys-and-salome/125/3 "2023-05-31T01:45:20Z")

</div>

Hello Antoine,

Thanks for your reply. I’ve also thought about it, and then I attempted to isolate this command ( i.e. _’ /media/freddy/c5df8610-7837-463e-a21e-f276a63b0639/freddy/code\_saturne/SALOME-9.6.0-UB20.04-SRC/salome -t wt\_mesh.py '_) by adding ‘bash (…) exit’ or by running it by calling another shell file. But unfortunately, it didn’t work.

I’m not sure if my solution is correct or if it’s the key to this issue. I would appreciate it if you have any more ideas about it.

Regards,  
Freddy

---

<div class="post-metadata">

**Author:** ![jschueller](https://yyz2.discourse-cdn.com/free1/user_avatar/persalys.discourse.group/jschueller/32/6_2.png) [@jschueller](https://persalys.discourse.group/u/jschueller)\
**Post date:** [July 4, 2023, 9:45am UTC](https://persalys.discourse.group/t/issue-with-launching-calculation-involving-code-saturne-persalys-and-salome/125/4 "2023-07-04T09:45:35Z")

</div>

it could probably be the PYTHONPATH/PYTHONHOME or PATH environment variables  
that are inherited from the persalys environment that are overriding the ones in your script  
you may want to overload them in your script

---

<div class="post-metadata">

**Author:** ![freddy.fang](https://yyz2.discourse-cdn.com/free1/user_avatar/persalys.discourse.group/freddy.fang/32/96_2.png) [@freddy.fang](https://persalys.discourse.group/u/freddy.fang)\
**Post date:** [July 5, 2023, 1:43am UTC](https://persalys.discourse.group/t/issue-with-launching-calculation-involving-code-saturne-persalys-and-salome/125/5 "2023-07-05T01:43:27Z")

</div>

Hello Julien,

Thanks for your advice, in fact I’ve also renewed the env variables after calling SALOME but it doesn’t work. This issue’s eventually caused by not closing SALOME after calling it through _tui_ and can be easily solved by simply adding ‘_-w1_’ after this command.

Regards,  
Freddy
