Closed anskgiannok closed 12 months ago
@giannoko
Could you please confirm once again with python 3.11.
It works fine for me with python 3.11 - '0.19.dev1' - 23R2 and 24R1.
Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ansys.fluent.core as pyfluent
>>> pyfluent.version_info()
'0.19.dev1'
>>> session_241 = pyfluent.launch_fluent(show_gui=False)
>>>
>>> import os
>>> os.environ["PYFLUENT_FLUENT_ROOT"] = r"D:\Installations\Ansys\v232_14092023\ANSYS Inc\v232\fluent"
>>> session_232 = pyfluent.launch_fluent(show_gui=False)
>>>
>>>
Thank you.
The reason why it is slow is because your system for some reason fails to launch Fluent in the standard detached (and more robust) way, and that times out after 60 seconds by default when it notices Fluent isn't working. After timeout, it tries launching Fluent again, but now as a child of the Python process, which isn't good for multiple reasons, but mainly because it leaves Fluent vulnerable to bad termination attempts from IDEs such as Visual Studio (jupyter notebook "restart kernel" options and others like that) which may leave zombie processes behind that would need to be cleaned up manually.
As a quick workaround, can use the start_timeout
argument (see launch_fluent documentation) to reduce the default timeout from 60 seconds to something like 10 seconds for example (don't make it too short or it will fail to launch Fluent in both attempts).
If Python 3.11 as Harshal suggested doesn't work, and neither does updating Windows, I am going to be in touch with @giannoko to try to debug this properly and see if we can figure out a better solution.
@hpohekar I get the same issue with python 3.11 also.
🔍 Before submitting the issue
🐞 Description of the bug
When try to launch Fluent session, it takes a long time to get launched getting warnings messages regarding run-time issues.
Input:
Output:
The session starts but the launching time is quite high.
I get the same behavior for pyFluent 0.16.dev0 - 0.19.dev1 versions and for Fluent 23R2 and 24R1. I have no issues with v0.15.0.
📝 Steps to reproduce
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
tested pyfluent versions : 0.16.dev0 - 0.19.dev1 tested Fluent versions : 23R2, 24R1
🐍 Which Python version are you using?
3.10
📦 Installed packages