Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catching a server timeout #3476

Open
2 tasks done
christospliakos opened this issue Nov 12, 2024 · 1 comment
Open
2 tasks done

Catching a server timeout #3476

christospliakos opened this issue Nov 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@christospliakos
Copy link

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

Hello, I'm running PyFluent on a SLURM HPC environment where the amount of Ansys HPC licenses is finite. It is very often that I'm not able to find licenses and my code terminates with the following output:

INFO:
Queuing for license HPC_PARALLEL has been initiated.
      The application will resume once the license is granted.
      Please use the lmutil lmstat utility to see who is currently using the license.

E1112 15:56:51.479564186  195523 server_chttp2.cc:40]        {"created":"@1731419811.479514442","description":"Only 1 addresses added out of total 
2resolved","file":"/home/staff/kkripa/tfsagent/_work/20/b/.conan/data/grpc_base/1.25.0/thirdparty/stable/build/1036933dfdff90461d4bf4154f59e6aa78392d87/grpc/src/core/ext/transport/chttp2/server/chttp2_server.cc","file_line":403,"referenced_errors":[{"created":"@1731419811.479495877","description":"Address family not supported by protocol","errno":97,"file":"/home/staff/kkripa/tfsagent/_work/20/b/.conan/data/grpc_base/1.25.0/thirdparty/stable/build/1036933dfdff90461d4bf4154f59e6aa78392d87/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":395,"os_error":"Address family not supported by protocol","syscall":"socket","target_address":"[::1]:46831"}]}
Information: The server has started and is running.

Application is timed out, aborting ...

/mnt/apps/prebuilt/ansys/2023R2/ansys_inc/v232/fluent/fluent23.2.0/bin/fluent: line 2973: 195523 Aborted                 (core dumped) $NO_RUN $CORTEX_PRE $EXE -f $FLUENT_PROD $CX_FLAGS "$CX_FUNCTION"
pyfluent.general WARNING: Fluent Cortex properties unobtainable. 'force exit()' and othermethods are not going to work properly. Proceeding...

Is there a way (other than increasing the timeout to infinite) to catch this error, in order to re-launch FLUENT? I have tried the classic try/except but it seems that this error is internal.

📝 Steps to reproduce

Using:

        self.solver = pyfluent.launch_fluent(dimension=3, 
                                            precision='double', 
                                            mode="solver", 
                                            gpu=True, 
                                            processor_count=16, 
                                            ui_mode=gui, 
                                            additional_arguments="-gu -cflush", 
                                            cleanup_on_exit=True)

💻 Which operating system are you using?

Linux

📀 Which ANSYS version are you using?

ANSYS FLUENT 2023R2

PyFluent 0.21 (cannot really update right now)

🐍 Which Python version are you using?

3.11

📦 Installed packages

-
@christospliakos christospliakos added the bug Something isn't working label Nov 12, 2024
@christospliakos christospliakos changed the title Catching a server timout Catching a server timeout Nov 12, 2024
@mkundu1
Copy link
Contributor

mkundu1 commented Nov 15, 2024

@christospliakos Please check if the following solution works.

  1. Set the environment variable PYFLUENT_WATCHDOG_EXCEPTION_ON_ERROR to 1.
  2. Catch LaunchFluentError from launch_fluent.
from ansys.fluent.core.launcher.error_handler import LaunchFluentError
try:
    solver = pyfluent.launch_fluent(...)  
except LaunchFluentError as ex:
    <relaunch code>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants