# CFDSTUDY is improperly configured

**URL:** <https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251>\
**Category:** Installation issues\
**Created:** [January 5, 2023, 5:04pm UTC](https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251 "2023-01-05T17:04:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![trilbytim](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/t/8baadc/32.png) [@trilbytim](https://code-saturne.org/forum/u/trilbytim)\
**Post date:** [January 5, 2023, 5:04pm UTC](https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251/1 "2023-01-05T17:04:03Z")

</div>

I’ve been trying to get Code Saturne to run inside Salome following these instructions. I’m on Ubuntu 22.04

[![](https://img.youtube.com/vi/wVxtVCC9HKY/maxresdefault.jpg "[Tutorial] Installing Salome CFD in 2022 with Code Saturne 7.0") ](https://www.youtube.com/watch?v=wVxtVCC9HKY)

I have Salome running fine and Code Saturne also running fine through it’s own GUI. I went through the steps to install the CFD extensions shown in the video, it went through all the installation steps and I didn’t see any error messages. It showed:

```plaintext
SALOME KERNEL support: yes, SALOME GUI support: yes

```

before I made the CFD extensions. However now when I run it I don’t see the CFD extensions button in Salome but the only error I can see in the Terminal window is:

```plaintext
**************************************************************
     Warning: module CFDSTUDY is improperly configured!
     Module CFDSTUDY will not be available in GUI mode!
**************************************************************
Warning, no type found for resource "localhost", using default value "single_machine"

```

Is there somewhere I can look up for more detail on what’s improperly configured?

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [January 8, 2023, 10:53pm UTC](https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251/2 "2023-01-08T22:53:44Z")

</div>

Hello,

Could you post the config.log file for your installation ?. I assume the tutorial is correct but but after 4 commercials trying to fast-forward, I had enough, so I won’t be bothered to watch all commercials to see what’s in it.

in any case the INSTALL.md documentation for the salome\_cfd extensions is the reference install documentation, so make sure you followed that.

I was not able to find whether the error message you have is in salome itself or in the salome\_cfd\_extensions. Error messages are often not very verbose, and to debug this, I often need to add print statements in various salome scripts, This is often an iterative and quite long process, but i don’t know of a better one…

Best regards,

Yvan

---

<div class="post-metadata">

**Author:** ![trilbytim](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/t/8baadc/32.png) [@trilbytim](https://code-saturne.org/forum/u/trilbytim)\
**Post date:** [January 13, 2023, 7:05pm UTC](https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251/3 "2023-01-13T19:05:23Z")

</div>

Hi there, here is the config file:  
Thanks  
[config.log](https://code-saturne.org/forum/uploads/short-url/naTncvcavIFg9Uwowpfu3mgL0wK.log) (82.8 KB)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [January 13, 2023, 9:07pm UTC](https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251/4 "2023-01-13T21:07:03Z")

</div>

Hello,

The issue might be due to doing an in-tree build (configure && make && make install inside the source tree), while the installation manual explicitly recommends not doing this (see the second paragraph of the README.md).

We have had issues with this in the past, so It could be the cause of the incorrect install.  
If you still have the issue after doing an out-of-tree build, do not hesitate to post the new config.log.

You did not specify where the matching code\_saturne install is located either, unless you do that afeter install using CS\_ROOT\_DIR.

Regards,

Yvan

---

<div class="post-metadata">

**Author:** ![trilbytim](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/t/8baadc/32.png) [@trilbytim](https://code-saturne.org/forum/u/trilbytim)\
**Post date:** [January 20, 2023, 10:25pm UTC](https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251/5 "2023-01-20T22:25:50Z")

</div>

Hi, I’ve tried installing again in a separate build directory. Some improvement, I don’t get the immediate warning on the command line and I do have a CFDSTUDY icon in Salome (hooray!). However when I click the icon then I just get an error message when it fails to load.

What do you mean by:

> You did not specify where the matching code\_saturne install is located either, unless you do that afeter install using CS\_ROOT\_DIR.

?

Before I ran the configure command in salome shell I did

```plaintext
export CS_ROOT_DIR=/home/timbo/Code_Saturne/7.0.5-patch/code_saturne-7.0.5-patch/arch/Linux_x86_64/bin

```

and

```plaintext
export CFDMODULE_ROOT_DIR=/home/timbo/software/salome_cfd_extensions_build/cfd_study

```

The errors I’m getting in Terminal while I try to run the CFD Study module are:

```plaintext
timbo@timbo-laptop:~/software/SALOME-9.9.0-native-UB22.04-SRC$ /usr/local/bin/salome_cfd
runSalome running on timbo-laptop
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
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'

```

[config.log](https://code-saturne.org/forum/uploads/short-url/es7AFC60l5anFB4zGZj1vvM6nuL.log) (82.4 KB)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [January 22, 2023, 7:46pm UTC](https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251/6 "2023-01-22T19:46:24Z")

</div>

Hello,

If you use the CS\_ROOT\_DIR approach, you also need to define it in the terminal from which you run salome\_cfd (or set it in your environment).

Is this the case ?

Also, which version of code\_saturne and of the salome\_cfd\_extensions are you using ? For code\_saturne 7.0, you need to use the v7.0 branch of the salome\_cfd\_build\_scripts. For 7.1 or newer, use the main (master) branch. This is due to changes in the Python files organization. If you use the improper combination, you could have the sort of issues you observe.

Regards,

Yvan

---

<div class="post-metadata">

**Author:** ![trilbytim](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/t/8baadc/32.png) [@trilbytim](https://code-saturne.org/forum/u/trilbytim)\
**Post date:** [January 23, 2023, 9:38pm UTC](https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251/7 "2023-01-23T21:38:11Z")

</div>

I’ve got Code Saturne v7.0.5. When I used the v7.0 of the CFD extensions then when I run salome\_cfd then I don’t have the CFD extensions icon in the menu and get this error in Terminal as soon as I start it:

```plaintext
**************************************************************
     Warning: module CFDSTUDY is improperly configured!
     Module CFDSTUDY will not be available in GUI mode!
**************************************************************

Warning, no type found for resource "localhost", using default value "single_machine"

```

When I use the Master branch of CFD extensions then I can start it with no error messages, I have the icon for CFD extensions but when I click it then I get the “Failed to Start” dialog box and this error in Terminal:

```plaintext
ModuleNotFoundError: No module named 'code_saturne.gui'

```

I’ve tried installing CFD extensions from a separate build folder and I’ve run the “export CS\_ROOT\_DIR=” command in Terminal before launching salome, neither helps.

I’ve now just tried installing v8.0 of Code Saturne. I’m not sure how to update it, so I just deleted the Code\_Saturne application directory and went through the installation again with v8.0. However now I can’t get this to install, it fails while trying to compile Scotch, I’ve attached the install log from that attempt.

It seems there’s an endless number of different ways of getting this to not work! I’ve now restored my previous version from the trash bin so I at least can run Code Saturne as a standalone again.  
[install\_saturne.log](https://code-saturne.org/forum/uploads/short-url/1ZZK3dDxOTSeq4ivDMxQB6WWycM.log) (5.34 MB)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [January 25, 2023, 4:52pm UTC](https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251/8 "2023-01-25T16:52:01Z")

</div>

Hello,

The error for Scotch is not very explicit. I don’t have an Ubuntu 22.04 system available to try to reproduce it, though I could try on an Ubuntu 22.10 virtual machine.

In any case, Scotch is not very important when running on a workstation (it is useful mainly to obtain a better partition quality when running on many nodes/cores). It’s build system is somewhat obsolete (and its new CMake option is incomplete).

So for now you can simply install without Scotch. It will at least allow you to finish the install and see if the salome\_cfd\_extensions are working or not (though I am not sure the extensions are so useful/worth the effort unless you really want to do everything from the Salome workbench).

code\_saturne v8.0 is not validated yet (the validation campaign has just started), but it should be as good as v7.3, and soon better…

To install multiple code\_saturne versions side by side, you simply need to specify a different installation prefix for each of those.

Best regards,

Yvan

---

<div class="post-metadata">

**Author:** ![trilbytim](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/t/8baadc/32.png) [@trilbytim](https://code-saturne.org/forum/u/trilbytim)\
**Post date:** [January 25, 2023, 7:48pm UTC](https://code-saturne.org/forum/t/cfdstudy-is-improperly-configured/2251/9 "2023-01-25T19:48:56Z")

</div>

Thank you for all your help. So it seems I have finally got it working! Code Saturne v8.0beta (installed without Scotch), and CFD extensions main branch, and it does now work. Hooray!

Now I have it installed I just have to remember what it was that I wanted to do with it, it seems so long ago… 😆
