-
Dear, First, I would like to thank the team for their amazing job in providing this practical interface for Fluent. After a fresh install of the latest version (0.16), I can run the simple mixing elbow case on my local machine. Things get more complicated when trying to run on our remote machines for better performance. By running the same script (that was previously successful on my local computer), I obtain the following log file:
To my understanding, pyfluent tries to connect to an IP address (which changes every new try) but couldn't succeed, do you think it might come from our remote machine access privileges or settings? Or do you have any other ideas/recommendations? Please find the script (nothing much complicated as it stops quite early). import ansys.fluent.core as pyfluent
from ansys.fluent.core import examples
from ansys.fluent.visualization.pyvista import Graphics
import h5py
import os
# Start the Fluent session with a visible GUI
session = pyfluent.launch_fluent(precision="double", processor_count=2, show_gui=False)
# Import the mixing elbow sample .cas file. INPUT_DIRECTORY is a global variable specific to our environment, I previously ensured that the file is at the expected location) but I commented the line to be sure the error was not coming from this line
# session.file.read(file_type="case", file_name=INPUT_DIRECTORY + "/mixing_elbow.cas.h5")
# # Configure the turbulence model
session.setup.models.viscous = {"model": "k-epsilon"} Thank you and have a nice day. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 2 replies
-
Can you try connect_to_fluent method to check if that is working? |
Beta Was this translation helpful? Give feedback.
-
If I'm not mistaken, the line Can you look at what the Fluent |
Beta Was this translation helpful? Give feedback.
-
Hi @raph-luc and @mkundu1, thank you very much for your quick reply on the matter. @raph-luc , I took a look at one @mkundu1, thanks for this hint. I could indeed open a session using the GUI and following the instructions could create a server text file and give it to the Just one question left. The main problem is that I cannot run simultaneous jobs on multiple machines. As only one session is opened, one machine has to wait until the first simulation terminates to run the next one. Could you think of anything else regarding this matter? Cheers |
Beta Was this translation helpful? Give feedback.
-
@Ziemnono Is the IP address written out in the server-info file the same as what is seen in the error message while launching from PyFluent? It should be possible to create multiple session instances launching/connecting multiple Fluent processes:
|
Beta Was this translation helpful? Give feedback.
-
Hi @mkundu1, When creating the server file from the GUI, the Txt file contains that information:
So it seems they both try to connect to the localhost but the port seems to be a problem. Any suggestions? Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hi @mkundu1 , After a deeper investigation, I tried the following code session_test = pyfluent.launch_fluent(
precision="double",
processor_count=2,
show_gui=False,
gpu=False,
)
ip = session_test.connection_properties.ip
port = session_test.connection_properties.port
pwd = session_test.connection_properties.password
session = pyfluent.connect_to_fluent(ip=ip, port=port, password=pwd) On my local session, everything works perfectly but when running the job on a remote worker I obtain the following error.
To my understanding, the server is immediately shut down after launching fluent, resulting in the timeout error. Do you have any recommendations? Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @raph-luc , thanks for continuing on this matter. Yes sorry or this, I know it is not the best way of using PyFluent but I just wanted to see if I could still connect to the IP and port of the Fluent session. To answer your question, I manually launched fluent using the GUI to create the session. Than used the steps described before to generate the server file information used by the After setting up the import ansys.fluent.core as pyfluent
import os
print("Version of pyFluent is ", pyfluent.__version__)
# Meshing
meshing = pyfluent.launch_fluent(mode="meshing", precision="double", show_gui = False, cleanup_on_exit=False)
EDIT: My biggest concern is that I also need to mesh some files. From my understanding, it is not possible of starting a server from the meshing mode nor switching from the solver to the meshing mode. But if you have a workaround for this matter it would be great! Cheers, |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, |
Beta Was this translation helpful? Give feedback.
Hi everyone,
Finally, eliminate this error that might have been related to #2588.
Our worker/user also needed to own the directory the command is run from apparently - our task worker also needs to be running from a directory owned by the user - with read/write permissions even though it seemingly doesn't read or write to that directory.
Thank you and have a nice day.