July 28, 2023 at 2:00 pmLeonid PascarSubscriber
I am using the parametrized invese design function with 3D simulations. I used ~90 parameters and in each iteration the gradient calculation part was much longer than the forward and adjoint simulations. Suprisngily the GPU and CPU were not utilized (less than 10% during the grdient calculation. Moreover, in some cases the 32GB RAM, available in my computer, was not enough. The amount of memory used during the gradient calculation is much heigher then for the simulations
Are there general consitarts in scaling up the number of parameters in Lumopt? In topolgical optimization, I did not exprience this issue.
I will appreciate your reply,
August 4, 2023 at 6:14 pmTaylor RobertsonAnsys Employee
I've seen situations like this before and it is a bit cryptic especially without all the details. I think the issue is that python is not handling the memory very efficiently. The gradient calculation requires the shape derivative of the device as you vary the parameters, which it seems like the point of failure. During the solve steps CPU will be used, but the gradient (ie dots in terminal) is a significant part of the workflow that will be memory intensive because you are dealing spatial index data. If the simulation itself is well within the 32GB limit of your machine then it shouldn't theoretically be causing issues (unless you are using d_eps_num_threads?); however, I suspect that the datasets are not being cleared from the scope of the workspace in a timely manner as they are no longer needed. I suspect more RAM would help; not necessarily solving this issue but preventing you from bumping up against this limit so often. It may be helpful to try 45 params and see if the issue persists? Try another larger RAM machnine?
Other settings that may be adding to the memory requirements is if you are saving all the simulations and 3D indices, disabling these options may help with memory overflow. It may be that you have a very high number of frequency points?
Sorry I can't be more help, it is certainly a challenge, but an unavoidable one at this time. It is not always clear what the requirements of the computer will be for the optimization beforehand, but the only dependable solution I've found is to have the RAM buffer. Please let me know how it goes.
August 9, 2023 at 7:00 pmLeonid PascarSubscriber
Thank you very much for the reply. Would it be possible to use the Python- Lumerical API for simulation only and perfoem the gradient calculation via open source code package, where I can use the GPU and control the memoery handling? Could it be a possibe soultion to overcome the gradient calculation bottleneck?
- 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.
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.
- “Import optical generation” or “delta generation rate”?
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- Using a license file on a new license server
- Ansys Insight: Diverging Simulations
- Error: addfdtd is not a valid function or a variable name
- Questions about the calculation of the cross-polarization conversion efficiency of metasurface
- Error on Lumerical device
- Ansys Insight: About override mesh in FDTD: its use and settings
- Finding your Ansys (or Lumerical) account number
- Lumerical – error message when trying to open from Linux terminal
© 2023 Copyright ANSYS, Inc. All rights reserved.