TAGGED: iteration, simulation-crash
-
-
April 27, 2023 at 8:50 am
Lorenzo Lazzari
SubscriberHello! I use MODE to retrieve guided modes of an integrated structure. I use a .lsf script with 3 nested cycles: at each iteration, relevant data are saved in arrays, while the structure is deleted and recreated with slightly different parametrs, for optimization purposes. Once the most internal cycle is over, the data arrays are saved to a file (matlabsave command); anything that is not strictly necessary for next steps is deleted (clear command). The problem is that, after 3 iterations of the second cycle (so after the internal cycle is concluded 3 times) successfully completed, the program crashes without even sending any error code. I tried to keep track of the RAM consumption, but it seems to never exceed critical values. In the meanwhile, the computer works as usual, without any particular problem. Any clue on how to solve this (or at least understand what is going on)?
Thanks in advance, Lorenzo
-
May 1, 2023 at 10:13 pm
Guilin Sun
Ansys EmployeeIt might be because you manipulated variables using "clear". "clear" will delete all vriables, including the loop counters.
I would suggest that you use a 3D matrix (3 layers of loops) to keep all the data. At the end of the simulation you save the data, if the data file is not very large. Later you can load/read the data for further processing.
Or you can reuse the matrix instead of clear it since you have already saved the data.
DO not use "clear" in the middle of the script. Only use it before any variables.
-
May 2, 2023 at 2:59 pm
Lorenzo Lazzari
SubscriberThanks for your answer!
I was using clear("var1", "var2", ...), erasing specific variables and not the loop counters; I got rid of this command now anyways. The simulation is actually working as expected - from the point of view of the results -, but crashes as described in the post.
Inspired by your advice, I noticed I was re-initializing the data arrays any time the internal cycle was concluded (so after the saving stage), and I changed it to initialize them only once before starting the first loops. However, the simulation crashed as before.
I also tried to build 3D matrices containing all the data, to be saved at the very end of the loop. Unfortunately, nothing changed even in this configuration... and no data was saved before the crash.
Any other idea that might help? Thanks again!
Lorenzo
-
May 2, 2023 at 4:20 pm
Guilin Sun
Ansys EmployeeWhen some parameters have conflict, such as a geometry cannot be formed, the file can be crashed. I would suggest to output the loop counters, and then reopen the file, use the loop counter data (and nearby data) and see if it works.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

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.
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- “Import optical generation” or “delta generation rate”?
- Error: addfdtd is not a valid function or a variable name
- Error on Lumerical device
- Using a license file on a new license server
- Ansys Insight: Transmission results greater than one
- Ansys Insight: Diverging Simulations
- Finding your Ansys (or Lumerical) account number
- Is there a Lumerical script command to output the Simulation and Memory requirements?
- Ansys Insight: Why my simulation result is different from published paper or experiment?
-
5290
-
3307
-
2469
-
1308
-
1016
© 2023 Copyright ANSYS, Inc. All rights reserved.