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

Processor is exited after non_interactive block when using Corba #1360

Closed
2 tasks done
rileychall opened this issue Aug 16, 2022 · 5 comments
Closed
2 tasks done

Processor is exited after non_interactive block when using Corba #1360

rileychall opened this issue Aug 16, 2022 · 5 comments

Comments

@rileychall
Copy link
Contributor

Before submitting the issue

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

Description of the bug

When using Corba, the current processor is preserved when entering a non_interactive block, but is not preserved when exiting the block, as if non_interactive is silently appending a FINISH command. This is both unexpected and differs from gRPC, which preserves the current processor throughout. This leads to confusing instances of the [command] is not a recognized BEGIN command... error.

Steps To Reproduce

from ansys.mapdl.core import launch_mapdl

mapdl = launch_mapdl(mode="corba")

mapdl.prep7()
print(mapdl.parameters.routine)
with mapdl.non_interactive:
    mapdl.n(1)
print(mapdl.parameters.routine)

This code outputs

PREP7
Begin level

However, this code behaves as expected when run through gRPC (launch_mapdl(mode="grpc")), outputting

PREP7
PREP7

Which Operating System are you using?

Windows

Which Python version are you using?

3.8

PyMAPDL Report

-------------------------------------------------------------------------------


PyMAPDL Software and Environment Report


Packages Requirements
*********************

Core packages
-------------
ansys.mapdl.core    : 0.63.1
numpy               : 1.23.1
appdirs             : 1.4.4
scipy               : 1.8.1
grpc                : Package not found
ansys.api.mapdl.v0  : Package not found
ansys.mapdl.reader  : 0.51.14
google.protobuf     : Package not found

Optional packages
-----------------
matplotlib          : 3.5.2
pyvista             : 0.35.1
pyiges              : 0.2.1
tqdm                : 4.52.0
ansys_corba         : 0.1.1


Ansys Installation
******************
Version   Location
------------------
222       C:\Program Files\ANSYS INC\v222


Ansys Environment Variables
***************************
ANSYSLMD_LICENSE_FILE          [email protected]
ANSYS_SYSDIR                   winx64
ANSYS_SYSDIR32                 win32
CADOE_LIBDIR222                C:\Program Files\ANSYS Inc\v222\CommonFiles\Language\en-us

Installed packages

aiohttp==3.8.1
aiosignal==1.2.0
ansys-api-mapdl==0.5.1
ansys-api-platform-instancemanagement==1.0.0b3
ansys-corba==0.1.1
ansys-mapdl-core==0.63.1
ansys-mapdl-reader==0.51.14
ansys-platform-instancemanagement==1.0.2
appdirs==1.4.4
async-timeout==4.0.2
attrs==21.4.0
bleach==3.2.1
charset-normalizer==2.1.0
colorama==0.4.4
cycler==0.11.0
docutils==0.16
fonttools==4.34.4
frozenlist==1.3.0
geomdl==5.3.1
googleapis-common-protos==1.56.4
grpcio==1.47.0
idna==3.3
imageio==2.19.3
importlib-metadata==4.12.0
keyring==21.5.0
kiwisolver==1.4.3
line-profiler==3.5.1
loguru @ file:///D:/bld/loguru_1649443371013/work
matplotlib==3.5.2
multidict==6.0.2
numpy @ file:///D:/bld/numpy_1657483969318/work
packaging==20.4
pandas @ file:///D:/bld/pandas_1656001298215/work
Pillow==9.2.0
pkginfo==1.6.1
protobuf==3.20.1
protoc-gen-swagger==0.1.0
Pygments==2.7.2
pyiges==0.2.1
pyparsing==2.4.7
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work
pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1647961439546/work
pyvista==0.35.1
pywin32-ctypes==0.2.0
readme-renderer==28.0
requests-toolbelt==0.9.1
rfc3986==1.4.0
scipy==1.8.1
scooby==0.5.12
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
tqdm==4.52.0
twine==3.2.0
vtk==9.1.0
webencodings==0.5.1
win32-setctime @ file:///home/conda/feedstock_root/build_artifacts/win32_setctime_1642883564726/work
wslink==1.6.6
yarl==1.7.2
zipp==3.8.1
@akaszynski
Copy link
Collaborator

Unable to reproduce this error on Ansys 2022R2 with ansys-mapdl-core==0.63.1 on Linux:

from ansys.mapdl.core import launch_mapdl

mapdl = launch_mapdl(mode="corba")

mapdl.prep7()
print(mapdl.parameters.routine)
with mapdl.non_interactive:
    mapdl.n(1)
print(mapdl.parameters.routine)
/home/akaszyns/source/pymapdl/src/ansys/mapdl/core/launcher.py:1566: UserWarning: CORBA AAS mode not recommended in MAPDL 2021R1 or newer.
Recommend using gRPC mode instead.
  warnings.warn(
PREP7
PREP7

@akaszynski
Copy link
Collaborator

@mikerife, could you please attempt to reproduce this error Windows?

@mikerife
Copy link

Hi @akaszynski I am unable to test this - MAPDL seems to start but I get the following message:

MapdlRuntimeError: Unable to connect to APDL server

And there is something odd (to me) with the MAPDL processes that started up - two instances of ansys222.exe are running (one w/ -aas flag and one without, but with a -rcp flag and value shared with the ansys.exe instance.

Mike

@akaszynski
Copy link
Collaborator

I've got another windows machine, debugging once #1378 is done.

@germa89
Copy link
Collaborator

germa89 commented Nov 21, 2023

Closing issue because #2517

Please @rileychall use the gRPC interface.

@germa89 germa89 closed this as completed Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants