-
Notifications
You must be signed in to change notification settings - Fork 115
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
In mapdl.input_strings(cmd)
, if cmd is very long command, it fails with MapdlExitedError
#3089
Open
2 tasks done
Labels
BUG
Issue, problem or error in PyMAPDL
Comments
Transferring to PyMAPDL repository - pinging @ansys/pymapdl-maintainers |
germa89
changed the title
in python, mapdl.input_strings(cmd), cmd is a very long command. If it is not called in the method, it will be executed normally. If it is put in the method, the error "ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated" will be reported.
In May 14, 2024
mapdl.input_strings(cmd)
, if cmd is very long command, it fails with MapdlExitedError
Hi @DeepLineD The following code runs a very long sequence of APDL commands using from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(start_instance=False, port=50082)
cmd = ["/prep7"]
for i in range(1000000):
cmd.append(f"/com hello {i}")
cmd = "\n".join(cmd)
print(len(cmd))
print("Running...")
out = mapdl.input_strings(cmd)
print(out[-400:]) And it does not fail: (.venv) ➜ pymapdl git:(main) python temp.py
17888896
Running...
999971
hello 999972
hello 999973
hello 999974
hello 999975
hello 999976
hello 999977
hello 999978
hello 999979
hello 999980
hello 999981
hello 999982
hello 999983
hello 999984
hello 999985
hello 999986
hello 999987
hello 999988
hello 999989
hello 999990
hello 999991
hello 999992
hello 999993
hello 999994
hello 999995
hello 999996
hello 999997
hello 999998
hello 999999 Using MAPDL v24.2 (docker image) and the following configuration: Details
Can you provide us with the model and code that fails for you? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🔍 Before submitting the issue
🐞 Description of the bug
in python, mapdl.input_strings(cmd), cmd is a very long command. If it is not called in the method, it will be executed normally. If it is put in the method, the error "ansys.mapdl.core.errors.MapdlExitedError: MAPDL server connection terminated" will be reported.
📝 Steps to reproduce
1,Define a string containing multiple commands
2,Then mapdl calls input_strings(cmd) to execute
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
2023R1
🐍 Which Python version are you using?
3.11
📦 Installed packages
The text was updated successfully, but these errors were encountered: