Memory Requirements #478
-
Are there any straightforward ways to predict the amount of memory a run will require? If a simulation is running without magnetic fields and with a known number of MeshBlocks/known MeshBlockSize, is there a way to calculate the required memory? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
If your block size is |
Beta Was this translation helpful? Give feedback.
If your block size is
Nx * Ny * Nz
, then you will haveNc = (Nx + 2 * Ng) * (Ny + 2 * Ng) * (Nz + 2 * Ng)
cells, whereNg
is the number of ghost cells. Each cell will containNv = 5
hydro variables (4 for isothermal) plusNu
(default 0) user-output variables. There will generally beNr = 4
registers (2 copies of the primitives, and 2 copies of the conserved variables, though this can change with choice of time integrator). Finally, if everything is double precision, there are 8 bytes per value. All other memory allocations (refinement buffers, 1D scratch arrays, etc.) are usually small compared to this, so you can estimate8 * Nc * (Nr * Nv + Nu)
bytes per block with just the basic physics.