Embedded Software

Embedded Software

Stability of Workbench when run from command line

    • langlinator
      Subscriber
      Hi, 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
    • langlinator
      Subscriber
      Further 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
    • Karthik R
      Administrator
      Hello, 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
    • langlinator
      Subscriber
      I 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.