Open tone-cukon opened 5 months ago
It seems you are trying to launch a windows program from within wsl which is not generally possible. If you have a Python environment in windows, you can install PyFluent and use it from there. Launching Fluent in windows and then connecting from PyFluent from wsl might work if the networking between windows and wsl can be established (I haven't tested this).
Testing this locally, I was able to launch Fluent installed on Windows through WSL, and this seems to be a configuration that we could support in PyFluent.
I've changed this bug tracker to a feature request, as I think this would be better classified as a new feature, rather than a bug fix.
Edit: Launching Fluent in the current working directory of WSL (Fluent ends up using the \\wsl.localhost
network path), one issue I've noticed so far is that some startup command line argument combinations don't seem to work properly and cause Fluent to fail to launch with a cx2420.exe
error, need to investigate further. Other than that, can read/write files with no issues in the Windows file system.
This appears to be the relevant WSL documentation: https://learn.microsoft.com/en-us/windows/wsl/filesystems#run-windows-tools-from-linux
Comming here from teams...
PyMAPDL can launch and connect to MAPDL if given the executable path: https://mapdl.docs.pyansys.com/version/stable/getting_started/wsl.html#launch-mapdl-in-the-windows-host-os
This was implemented here: https://github.com/ansys/pymapdl/issues/2315
I hope it helps!
🔍 Before submitting the issue
🐞 Description of the bug
I installed pyansys through minifiroge in separate mamba/conda virtual environment on ubuntu WSL I launched an example script from the virtual environment through ipython I specified the file path to my Ansys installation on windows in the .profile file
I get the following error:
File ~/conda/envs/pyansys/lib/python3.12/site-packages/ansys/fluent/core/launcher/launcher.py:797, in launch_fluent(failed resolving arguments) 795 except Exception as ex: 796 logger.error(f"Exception caught - {type(ex).name}: {ex}") --> 797 raise LaunchFluentError(launch_cmd) from ex 798 finally: 799 server_info_file = Path(server_info_filepath)
LaunchFluentError: Fluent Launch string: /mnt/c/Program Files/ANSYS Inc/ANSYS Student/v241/fluent/bin/fluent 3ddp -t2 -sifile=/tmp/serverinfo-o24xk9my.txt -nm -hidden
📝 Steps to reproduce
install ubuntu 22.04. (LTS) on windows ( WSL) install miniforge for linux create vritual environment using conda/mamba pip install pyansys[fluent-all] add environment variable export=AWP_ROOT232=/mnt/c/file/path/to/ANSYS to ~/.profile (mine is ---> export AWP_ROOT241="/mnt/c/Program Files/ANSYS Inc/ANSYS Student/v241")
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
ANSYS 2024 R1 student version
🐍 Which Python version are you using?
3.12
📦 Installed packages