☰ Contents

How to resolve insufficient memory for software simulation resources at runtime?

Problem Description

During simulation execution, the software occasionally displays an “Resources Memory Is Insufficient” warning (as in the figure below). In some cases, the simulation may terminate abruptly due to memory overload during operation. How can I prevent such cases and ensure the successful simulations?

FAQ_warning_resource_memory

Possible Causes

The key factors affecting memory consumption in simulation calculations are categorized into three main aspects: mesh memory, running simulation memory, and data memory.

a Excessive mesh density

Results in mesh matrix memory requirements exceeding the configured memory limit of computing resources.

b High simulation runtime memory overhead

Includes excessive multi-frequency sampling points, and an overabundance of dispersive materials in the simulation.

c Heavy data processing load

Stems from the large volume of data recorded by monitors and processed in analysis groups during post-processing.

Solutions

Troubleshooting

SimWorks has the Check Simulation Memory feature. You can find instructions in our knowledge base under Memory Preview before Simulation. This feature lets you see how much memory your current project is using, as shown in the image below.

FAQ_memory_report

As shown in the Memory Report above, Mesh Memory consumption has reached 22.8 GB, exceeding the 16 GB memory limit configured for current computing resources. Meanwhile, Running Simulation memory usage has also reached 18.9 GB, similarly exceeding the available memory capacity. Only Data Memory exhibits relatively low memory consumption.

Resolution Methods

For issue a, the specific steps to reduce mesh discretization density are as follows:

1. If you currently use Uniform mesh, we recommend first switching to Auto nonuniform mesh for preliminary simulations. This approach not only significantly reduces the memory and time required for simulations but also helps verify whether the simulation results and trends are correct.

FAQ_mesh_size

2. If you currently use Auto Nonuniform mesh , you can set the Accuracy Level to a lower value without affecting calculation results. It is recommended to set it within the range of 2 to 4 to balance accuracy and speed.

3. Advanced users who understand the FDTD meshing can adopt Semi-Auto Nonuniform or Auto Nonuniform mesh combined with custom local Mesh for mesh generation.

4. After confirming that the preliminary simulation trends with using Auto Nonuniform are correct, if you continue to use Auto Nonuniform + local custom Mesh for optimization and still encounter memory errors, the simplest solution is to select cloud resources with sufficient memory.

For issues b and c, software default settings typically incur minimal memory usage. To reduce memory consumption without compromising simulation accuracy, follow these steps:

1. Source Parameter Optimization

If you use a multi-frequency source setup, reduce the number of Multi-Frequency Field points for broadband sources. This option is disabled by default and recommended only to be enabled for non-normal incidence scenarios with broadband sources. When enabled, it is recommended to use the default number of frequency points.

2. Material Setting Optimization

For materials without obvious dispersive characteristics in the simulation band, use materials with fixed refractive indices for equivalence. For example, silicon can be equivalent using a refractive index of 3.472 in the visible light band.
If the material exhibits significant dispersion, it is recommended to prioritize mesh refinement using the Auto nonuniform + VP-EP0 method. This avoids memory overflow from over-dense meshes with the VP-EP1, a common issue in dispersive material simulations.

3. Calculation Precision Adjustment

Change the calculation precision of the corresponding simulation solver from double-precision to single-precision.

4. Monitor Configuration Optimization

  • In simulations, preferentially use 1D or 2D monitors instead of 3D monitors.
  • Record only necessary electromagnetic field components.
  • Increase the time sampling interval and spatial sampling step size.
  • Narrow the recorded wavelength range.


5. Analysis Group Post-Processing Optimization

Certain analysis groups may generate large matrices during computation. This is caused by FDTD mesh settings and can lead to memory shortages. Prioritize using Auto Nonuniform refinement, which can resolve this issue in most cases. If memory issues persist, contact SimWorks Technical Support.

If the above adjustments significantly impact the user’s simulation results, the most straightforward solution is to expand the memory of computing resources.

Further Reading

Memory Preview before Simulation