Why does DMDA objects require so much memory on PETSc 3.2-p7.
When running the code:
... N = 8000; ierr = DMDACreate2d(PETSC_COMM_WORLD, DMDA_BOUNDARY_PERIODIC, DMDA_BOUNDARY_PERIODIC, DMDA_STENCIL_STAR, N, N, size, PETSC_DECIDE, PETSC_DECIDE, 0, PETSC_NULL, PETSC_NULL, &da); //ierr = DMCreateGlobalVector(da, &x); CHKERRQ(ierr); ...
using the command ./prog -log_summary, I get the following memory usage summary:
Distributed Mesh: 512004856 bytes Vector: 2944 bytes Vector Scatter: 1256 bytes Index Set: 256003752 bytes IS L to G Mapping: 256000572 bytes
By uncommenting the DMCreateGlobalVector line, the vector size in the memory summary increases to:
It appears that DMDA objects have a size proportional to the vector data size. According to the documentation, the data is not stored in the Distributed Mesh. Therefore, why does the DMDA object require this much memory? Is there a way to reduce the memory overhead used by DMDA?