fix: avoid MAPDL commands execution when gRPC connection fails.#3686
Conversation
|
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
…ing-more-mapdl-calls-when-the-gRPC-connection-failed
|
Profiler info: InsightsOptimize Hooks in pytest:Investigate why pluggy hooks are being called so frequently. Consider reducing the number of hooks or optimizing hook implementations. Analyze Locking Overhead:The high time spent in _thread.lock.acquire suggests contention or excessive synchronization. Profiling thread usage in ansys.mapdl or other parts of the code could identify improvements. Improve ansys.mapdl Functions:Functions like wrapper and inner_wrapper should be examined for overhead. Profiling within these functions might reveal inefficient logic or excessive I/O calls. Investigate gRPC Communication:High cumulative time in gRPC functions suggests delays in message handling or transport. Review the communication patterns, message sizes, and server-client interactions. Focus on High Cumulative Time:Target the functions with the highest cumtime (pytest_runtest_protocol, wrapper, inner_wrapper) for optimization, as they are the biggest contributors to runtime. |
|
Checking the profiler, it seems that a lot of time is spent on wrapping the XSEL commands:
which basically seems to come from pymapdl/src/ansys/mapdl/core/mapdl_core.py Lines 1449 to 1462 in 8be236d I need to improve this mess... |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3686 +/- ##
==========================================
- Coverage 87.14% 87.08% -0.07%
==========================================
Files 187 187
Lines 14697 14698 +1
==========================================
- Hits 12808 12800 -8
- Misses 1889 1898 +9 |
ReasonIt seems we are executing ErrorError code
From: https://github.com/ansys/pymapdl/actions/runs/12907800033/job/35992191911?pr=3686#step:11:197 |
|
@pyansys-ci-bot LGTM. |


Description
Making sure we avoid executing more commands when exiting MAPDL.
Issue linked
Close #3685
Checklist
draftif it is not ready to be reviewed yet.feat: adding new MAPDL command)