CFDSTUDY is improperly configured

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
trilbytim
Posts: 32
Joined: Thu Jan 05, 2023 11:52 am

CFDSTUDY is improperly configured

Post by trilbytim »

I've been trying to get Code Saturne to run inside Salome following these instructions. I'm on Ubuntu 22.04
https://youtu.be/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:

Code: Select all

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:

Code: Select all

**************************************************************
     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?
Yvan Fournier
Posts: 4100
Joined: Mon Feb 20, 2012 3:25 pm

Re: CFDSTUDY is improperly configured

Post by Yvan Fournier »

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
trilbytim
Posts: 32
Joined: Thu Jan 05, 2023 11:52 am

Re: CFDSTUDY is improperly configured

Post by trilbytim »

Hi there, here is the config file:
Thanks
Attachments
config.log
(82.78 KiB) Downloaded 426 times
Yvan Fournier
Posts: 4100
Joined: Mon Feb 20, 2012 3:25 pm

Re: CFDSTUDY is improperly configured

Post by Yvan Fournier »

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
trilbytim
Posts: 32
Joined: Thu Jan 05, 2023 11:52 am

Re: CFDSTUDY is improperly configured

Post by trilbytim »

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

Code: Select all

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

Code: Select all

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:

Code: Select all

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'
Attachments
config.log
(82.41 KiB) Downloaded 430 times
Yvan Fournier
Posts: 4100
Joined: Mon Feb 20, 2012 3:25 pm

Re: CFDSTUDY is improperly configured

Post by Yvan Fournier »

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
trilbytim
Posts: 32
Joined: Thu Jan 05, 2023 11:52 am

Re: CFDSTUDY is improperly configured

Post by trilbytim »

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:

Code: Select all

**************************************************************
     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:

Code: Select all

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.
Attachments
install_saturne.log
(5.34 MiB) Downloaded 430 times
Yvan Fournier
Posts: 4100
Joined: Mon Feb 20, 2012 3:25 pm

Re: CFDSTUDY is improperly configured

Post by Yvan Fournier »

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
trilbytim
Posts: 32
Joined: Thu Jan 05, 2023 11:52 am

Re: CFDSTUDY is improperly configured

Post by trilbytim »

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..... :lol:
Post Reply