fix: avoid verbose grpc interface when solving#3608
Merged
Conversation
Contributor
|
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 |
clatapie
approved these changes
Dec 10, 2024
clatapie
reviewed
Dec 10, 2024
…https://github.com/ansys/pymapdl into fix/avoid-verbose-grpc-interface-when-solving
Collaborator
Author
|
@pyansys-ci-bot LGTM. |
This was referenced Dec 13, 2024
23 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR solves #3591 issue. This issue covers the instability/bug seen where MAPDL gets stuck while running some commands, very frequently, the
/SOLVEcommand.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
anstmpfile, it usesstd:getline(only!), hence if the line is empty, thegetlinewaits 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
/VERIFYavoid 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
/VERIFYwhen we instantiate the object.Issue linked
Related to #3591
Checklist
draftif it is not ready to be reviewed yet.feat: adding new MAPDL command)