Tagged: command-line, python, workbench
-
-
March 7, 2021 at 3:27 pm
langlinator
SubscriberHi, I have a project in which I am automatically running Workbench. I have a Python 3.* script which runs Windows Command Line, which calls a Workbench project (with 1 mechanical system). It does some data i/o, runs an analysis, then outputs the result. I call this iteratively, hundreds of time through my Python script. I am encountering a problem where, for no apparent reason, the Command Line entry (calling Ansys) gets stuck. Normally when my script starts Ansys, I get a nice CMD window with the Workbench coding showing. On occasion, the CMD window opens, but no text shows. My script is waiting for the output of Ansys, which never runs. This happens maybe 1 in 1000 times. I can run the same data again, without the problem replicating. It is very inconvenient as it renders my script run (taking many hours) useless. I have had some success avoiding this by adding a 20s delay before each time my script runs Ansys, however it has not eliminated the problem. My thought here was that it could be an issue with delay of licenses checking in/out. I am looking at ways to program around this in Python, but wondered if anyone has any similar experience / solutions -
March 7, 2021 at 3:42 pm
langlinator
SubscriberFurther comment: After terminating the commandline process, due to Ansys being non-responsive, the project is locked. So I can't even just run the same command again, if some length of time without a result has passed. I investigated this further by unlocking the project, then sending the command (manually), identically to the last automated command (same command, same data). Ansys ran successfully. This must be an instability in the way Ansys is run from commandline -
March 15, 2021 at 3:55 pm
Karthik R
AdministratorHello, This might be a tricky issue to troubleshoot, especially because the issue is not reproducible. One possibility is that WB gets disconnected from the license. Perhaps reviewing the TEMP ansys log files upon failure to see if any logs display licensing errors. Which version of Ansys are you using? If you are not using the 2021R1, I suggest you give this a try and see if the issue resurfaces. Also, regarding the locked project, this is expected behavior when WB crashes. It is to salvage the WB files on the local hard drive. in the event of a crash. Please let us know your findings. Thanks. Karthik -
April 1, 2021 at 1:59 pm
langlinator
SubscriberI am using 2021R1. I scripted around this in Python in the end (to manage the hanging condition)
-
Viewing 3 reply threads
- You must be logged in to reply to this topic.
Ansys Innovation Space

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
Trending discussions
- legend min and max
- Ensight hot iron palette from an image
- Crash with Exit code 1073741819
- older version
- Streamlines in EnSight using MRI data
- Import MRI data into Ensight
- What are the OpenGL drivers supported by SCADE Display KCG?
- What are the target language supported by the SCADE code generators?
- FLUENT APPLICATIION ERROR
- save data error
Top Contributors
-
2564
-
2074
-
1289
-
1106
-
459
Top Rated Tags
© 2023 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.