pyfluent: pyfluent session crashes on shared drive when user does not have read/write permissions
π Before submitting the issue
- I have searched among the existing issues
- I am using a Python virtual environment
π Description of the bug
Launching pyfluent standalone on a network drive directory that the user does not have read/write permissions causes the following error;
>>> solver = pyfluent.launch_fluent(precision='double', processor_count=2, mode='solver')
Shutting down Server...
pyfluent.launcher WARNING: PyFluent Watchdog did not initialize correctly, proceeding without it...
The session continues to run until user tries to carry out further instructions, at which point the following message is given;
>>> solver.file.read(file_type="case", file_name = "pyfluent_meshing_examples/wing.msh.h5")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\ansys\fluent\core\session_solver.py", line 263, in __getattr__
self._populate_settings_api_root()
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\ansys\fluent\core\session_solver.py", line 260, in _populate_settings_api_root
self._settings_api_root = _import_settings_root(self._root)
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\ansys\fluent\core\session_solver.py", line 198, in _root
self._settings_root = flobject.get_root(
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\ansys\fluent\core\solver\flobject.py", line 1896, in get_root
obj_info = flproxy.get_static_info()
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\ansys\fluent\core\services\settings.py", line 112, in _fn
return fn(self, *args, **kwds)
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\ansys\fluent\core\services\settings.py", line 295, in get_static_info
response = self._service_impl.get_static_info(request)
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\ansys\fluent\core\services\settings.py", line 76, in get_static_info
return self.__stub.GetStaticInfo(request, metadata=self.__metadata)
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\grpc\_interceptor.py", line 216, in __call__
response, ignored_call = self._with_call(request,
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\grpc\_interceptor.py", line 254, in _with_call
call = self._interceptor.intercept_unary_unary(continuation,
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\ansys\fluent\core\services\interceptors.py", line 122, in intercept_unary_unary
return self._intercept_call(continuation, client_call_details, request)
File "C:\ANSYSDev\ANSYS Inc\v242\commonfiles\CPython\3_10\winx64\Release\python\lib\site-packages\ansys\fluent\core\services\interceptors.py", line 112, in _intercept_call
raise ex from None
RuntimeError: failed to connect to all addresses; last error: UNAVAILABLE: WSA Error
Running the same scenario on a pyconsole session does not give any errors and user can successfully read case and use the session as normal
π Steps to reproduce
- on a shared network drive that the user does not have read/write access for, launch a standalone pyfluent session from the python executable in commonfiles;
import ansys.fluent.core as pyfluent
solver = pyfluent.launch_fluent(precision='double', processor_count=2, mode='solver')
- see above
Shutting down Servermessage in pyfluent session - continue by trying to read a file into session from the network drive
solver.file.read(file_type="case", file_name = "<>")
- See above error generated
- Repeat in pyfluent session on drive that the user has permissions for
- Repeat in same working directory but in a pyconsole session with new pyfluent integration enabled
π» Which operating system are you using?
Windows
π Which ANSYS version are you using?
v242
π Which Python version are you using?
3.10
π¦ Installed packages
N/A - run from commonfiles python
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 21 (7 by maintainers)
@mkundu1
Any suggestion related tho above error, it will be very helpful
β¦but setting
SERVER_INFO_DIRto that same path triggers the original error. Is the file ever written in that case?@millerj97 Can you please check if this issue is fixed by setting the environment variable
SERVER_INFO_DIRto a path that the user has permissions for?We shall look into for a general fix for this issue.
We actually want to do something better, but I was just putting the general information thereβ¦
I think we can check for write permissions before launching Fluent, abort the launch if no permissions, and provide a more helpful error message
edit: BTW that
Shutting down Server...message is coming from Fluent@seanpearsonuk can the user get a better error to tell them this?