Convergence tool

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
jgd23
Posts: 141
Joined: Mon Jun 06, 2016 10:00 am

Convergence tool

Post 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
niuniuaba
Posts: 18
Joined: Mon May 17, 2021 10:22 am

Re: Convergence tool

Post 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.
jgd23
Posts: 141
Joined: Mon Jun 06, 2016 10:00 am

Re: Convergence tool

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

Re: Convergence tool

Post 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
niuniuaba
Posts: 18
Joined: Mon May 17, 2021 10:22 am

Re: Convergence tool

Post 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
jgd23
Posts: 141
Joined: Mon Jun 06, 2016 10:00 am

Re: Convergence tool

Post 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
Attachments
MainView.txt
(46.19 KiB) Downloaded 790 times
jgd23
Posts: 141
Joined: Mon Jun 06, 2016 10:00 am

Re: Convergence tool

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

Re: Convergence tool

Post 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
jgd23
Posts: 141
Joined: Mon Jun 06, 2016 10:00 am

Re: Convergence tool

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

Re: Convergence tool

Post 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
Post Reply