-
Notifications
You must be signed in to change notification settings - Fork 122
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
fix: avoid verbose grpc interface when solving #3608
Conversation
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3608 +/- ##
==========================================
+ Coverage 86.97% 86.99% +0.01%
==========================================
Files 187 187
Lines 14623 14628 +5
==========================================
+ Hits 12719 12725 +6
+ Misses 1904 1903 -1 |
…https://github.com/ansys/pymapdl into fix/avoid-verbose-grpc-interface-when-solving
@pyansys-ci-bot LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
This PR solves #3591 issue. This issue covers the instability/bug seen where MAPDL gets stuck while running some commands, very frequently, the
/SOLVE
command.The reason for this is that some MAPDL printouts was making MAPDL to wait infinitely for the next line.
These specific prints in MAPDL terminal were coming from a debug messenger (
_MsgDbg1
), an object which prints more output (sometimes for debugging purposes) if it is activated.It seems this debug messenger is activated by default, but deactivated if we issue
/VERIFY
.Additionally, the debugger can be also activated if we activate the gRPC debug messenger (
mapdl._ctrl("set_verb", 5)
) since these kind of messengers are singleton objects (unique in the whole program).MAPDL was getting stuck because for reading the
anstmp
file, it usesstd:getline
(only!), hence if the line is empty, thegetline
waits forever. See https://stackoverflow.com/a/39905660/6650211Until now, we did not realise because the first test running solve:
pymapdl/tests/test_commands.py
Lines 252 to 265 in afad43e
was using this fixture:
pymapdl/tests/test_commands.py
Lines 147 to 153 in afad43e
Which a verification manual example, which uses
/VERIFY
.The command
/VERIFY
avoid printing these extra debug printouts.Clearly this is a server side bug which should be fixed in the future versions. But for the moment, I am going to force MAPDL to run
/VERIFY
when we instantiate the object.Issue linked
Related to #3591
Checklist
draft
if it is not ready to be reviewed yet.feat: adding new MAPDL command
)