Page 1 of 2

Convergence tool

Posted: Sat Nov 05, 2022 1:33 pm
by jgd23
Hello,

I have install CS 7.2 on Ubuntu 22.04. I use the GUI of CS.

Convergence tool is not running during calculation. If I press the convergence tool button, nothing happens. I have follow Tjunction tutorial case.

How can I fix that?

Best regards

Re: Convergence tool

Posted: Sun Nov 06, 2022 4:56 am
by niuniuaba
Hello,

You are not alone. I have the same problem.

Code: Select all

Traceback (most recent call last):
  File "/home/wing/Apps/saturne-7.2.dbg/bin/code_saturne", line 94, in <module>
    retcode = cs.execute()
  File "/home/wing/Apps/saturne-7.2.dbg/local/lib/python3.10/dist-packages/code_saturne/base/cs_script.py", line 96, in execute
    return self.commands[command](options)
  File "/home/wing/Apps/saturne-7.2.dbg/local/lib/python3.10/dist-packages/code_saturne/base/cs_script.py", line 169, in trackcvg
    return cs_trackcvg.main(options, self.package)
  File "/home/wing/Apps/saturne-7.2.dbg/local/lib/python3.10/dist-packages/code_saturne/gui/cs_trackcvg.py", line 132, in main
    mv = MainView(cmd_package = pkg, cmd_case = case)
  File "/home/wing/Apps/saturne-7.2.dbg/local/lib/python3.10/dist-packages/code_saturne/gui/trackcvg/MainView.py", line 1275, in __init__
    self.timer.start(self.timeRefresh * 1000)
TypeError: arguments did not match any overloaded call:
  start(self, int): argument 1 has unexpected type 'float'
  start(self): too many arguments
Looks like some tricky incompatibility with python 3.10 because it works well with python 3.6.5 even in Ubuntu 22.04.

By the way, in python 3.10 $cspath is set to $cs_root_dir/local/lib/python3.10/dist-packages rather than $cs_root_dir/lib/python3.10/site-packages. It's not the cause of this problem but still it's weird.

Re: Convergence tool

Posted: Sun Nov 06, 2022 10:39 am
by jgd23
Hello,

I have check the pathes of python 3.10, in the file code_saturne_build.cfg, it is written:

pythondir: /usr/local/local/lib/python3.10/dist-packages
pkgpythondir: /usr/local/local/lib/python3.10/dist-packages/code_saturne
There is nothing wrong, the folders exist

Do I need to use python 3.6.5 insted ? How can I do that?

Best regards

Julien

Re: Convergence tool

Posted: Mon Nov 07, 2022 12:51 am
by Yvan Fournier
Hello,

I checked and found the problem, which is due to some timer quantity expecting an integer and receiving a floating-point value in recent PyQt versions (I did not check whether Python or PyQt is the cause).

The fix is pushed to GitHub for the master and v7.2 branches. So if your 7.2 build is based on a git clone, simply update and rebuild. Otherwise, the fix is simple, so you can do edit it manually if you really need to: https://github.com/code-saturne/code_sa ... 46e4bef607

Best regards,

Yvan

Re: Convergence tool

Posted: Tue Nov 08, 2022 4:47 am
by niuniuaba
Hello,

The commit works for 7.2 in Ubuntu 22.04. By the way, 7.0 also has the same problem and modifying the python script manually solves the problem.

Best regards

Re: Convergence tool

Posted: Sat Nov 12, 2022 8:34 pm
by jgd23
Hello,

I have update 2 files named MainView.py but the problem still persist.
Do I need to do something more?

Attached the MainView file

Best regards

Julien

Re: Convergence tool

Posted: Thu Nov 17, 2022 8:00 pm
by jgd23
Hello,

Still not working for me.

I change the 2 files MainView.py located in
- Home/Code_Saturne/code_saturne-7.2.0/python/code_saturne/gui/trackcvg
- Home/code_saturne/7.2.0/code_saturne-7.2.0/arch/Linux_x86_64/local/lib/python3.10/dist-packages/code_saturne/gui/trackcvg

Maybe I need to rebuild something?

Best regards

Julien

Re: Convergence tool

Posted: Fri Nov 18, 2022 5:57 pm
by Yvan Fournier
Hello,

Did you try running
"code_saturne trackcvg"
alone or only wih the GUI ?

If you run it alone, what error message do you have ?

Regards,

Yvan

Re: Convergence tool

Posted: Sat Nov 19, 2022 9:16 am
by jgd23
Hello Yvan,

The error message is

julien@julien-virtual-machine:~/Travail/test_cyl1/RESU/20221119-0915$ code_saturne trackcvg
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Traceback (most recent call last):
File "/home/julien/code_saturne/7.2.0/code_saturne-7.2.0/arch/Linux_x86_64/bin/code_saturne", line 94, in <module>
retcode = cs.execute()
File "/home/julien/code_saturne/7.2.0/code_saturne-7.2.0/arch/Linux_x86_64/local/lib/python3.10/dist-packages/code_saturne/base/cs_script.py", line 96, in execute
return self.commands[command](options)
File "/home/julien/code_saturne/7.2.0/code_saturne-7.2.0/arch/Linux_x86_64/local/lib/python3.10/dist-packages/code_saturne/base/cs_script.py", line 169, in trackcvg
return cs_trackcvg.main(options, self.package)
File "/home/julien/code_saturne/7.2.0/code_saturne-7.2.0/arch/Linux_x86_64/local/lib/python3.10/dist-packages/code_saturne/gui/cs_trackcvg.py", line 132, in main
mv = MainView(cmd_package = pkg, cmd_case = case)
File "/home/julien/code_saturne/7.2.0/code_saturne-7.2.0/arch/Linux_x86_64/local/lib/python3.10/dist-packages/code_saturne/gui/trackcvg/MainView.py", line 1277, in __init__
self.timer.start(self.timeRefresh * 1000)
TypeError: arguments did not match any overloaded call:
start(self, int): argument 1 has unexpected type 'float'
start(self): too many arguments


Best regards

Julien

Re: Convergence tool

Posted: Sat Nov 19, 2022 5:48 pm
by Yvan Fournier
Hello,

It seems your installation is still using the old (non-corrected) code. Did you reinstall after patching the sources ?

Regards,

Yvan