GSvit documentation

open source FDTD solver with GPU support

User Tools

Site Tools


opt:memory_usage

Memory usage

As FDTD is memory demanding, GSvit is designed to save some amount of memory, not allocating the data arrays that might not be needed. This option is by default switched off and can be switched on via XSvit or by setting MATMODE_CHECK option in the parameter file. It still does not cover the whole spectrum of possible memory savings that will be implemented in future, however in certain cases it can be still helpful.

In the following example the memory demands for running calculation on the same box size (300x300x300) with different materials inside it are evaluated. First, no material is in the computational domain, which means that no material arrays need to be allocated. Second, a tabulated material is used, so material is represented only by an array of integers. Next, material is fully allocated, which corresponds to a general case when the material properties can vary from voxel to voxel continuously (which would be ineffective for tabulated material). Finally, two metal treatment algorithms are used, that allocate several additional arrays for the calculation.

material Used memory [GB] computation time
none 1.64 7 min 10 s
dielectric tabulated 1.75 8 min 8 s
dielectric full 1.85 7 min 42 s
metallic ADE 6.44 9 min 10 s
metallic PLRC 7.07 9 min 45 s

We can see that namely use of metal handling auxiliary algorithms has dramatic impact on memory needs. Also the time of calculation is shown, which reflects the fact that different algorithms are used (so only the two dielectric and two metallic entries are mutually comparable).


Sample parameter file: memory handling.
A 300x300x300 computational domain with a plane wave and a sphere of different material, with different material storage modes used.


Memory can be further saved by using only tabulated materials or defining that there is no electrical or no magnetic properties variance in the computational domain. On the other hand, the most demanding material regime are related to handling of metals (PLRC, ADE), where we need to store some extra fields.

opt/memory_usage.txt · Last modified: 2018/08/31 16:09 by pklapetek