ansys / pymapdl

Pythonic interface to MAPDL
https://mapdl.docs.pyansys.com
MIT License
419 stars 117 forks source link

PyMapdl crahes/looses connection, when running in a loop #3156

Open mrcklg opened 4 weeks ago

mrcklg commented 4 weeks ago

🤓 Before submitting the issue

🔍 Description of the bug

I want to do a mesh convergence study. For this i am running PyMapdl in a loop, solving the problem for different mesh sizes. This works up until a point but then it crashes (at a random meshsize so the crash does not occur at the same mesh size every time) with the following Error Message:

ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated with the following error <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Connection reset" debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-06-06T11:36:14.151348247+00:00", grpc_status:14, grpc_message:"Connection reset"}"

I tried also to exit and reopening it for each solve (this takes extra time so not an ideal solution) however the problem remains.

🕵️ Steps To Reproduce

The log will automatically be formatted as Python code! No need to type backticks.

💻 Which Operating System are you using?

Windows

🐍 Which Python version are you using?

3.11

💾 Which MAPDL version are you using?

MAPDL: 22.2, PyMapdl: 0.68.1

📝 PyMAPDL Report

Show the Report! ```text # PASTE HERE THE OUTPUT OF `python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())"` here ```

📝 Installed packages

Show the installed packages! ```text # PASTE HERE THE OUTPUT OF `python -m pip freeze` here ```

📝 Logger output file

Show the logger output file. ```text # PASTE HERE THE CONTENT OF THE LOGGER OUTPUT FILE. ```
germa89 commented 3 weeks ago

Hi @mrcklg

Would it be possible for you to share the code that generates that error??