[petsc-users] petsc-users Digest, Vol 83, Issue 34

Åsmund Ervik asmund.ervik at ntnu.no
Tue Nov 10 06:51:30 CST 2015


> From: TAY wee-beng <zonexo at gmail.com>
> To: PETSc users list <petsc-users at mcs.anl.gov>
> Subject: [petsc-users] Memory usage with DMDACreate3d and
> 	DMDAGetCorners
> Message-ID: <56419DCE.4090106 at gmail.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> Hi,
> 
> I need a subroutine in Fortran to partition a subset of my grid in the 3 
> x,y,z directions for MPI. I thought of using DMDACreate3d and 
> DMDAGetCorners to get the starting and width of the partitioned grid.

You might want to look at dm/examples/ex13f90.F90 (and ex13f90aux.F90)
which does a detailed walkthrough of the DMDA routines for a very simple
case in 3D.

http://www.mcs.anl.gov/petsc/petsc-current/src/dm/examples/tutorials/ex13f90.F90.html

> 
> Because I need to partition at every time step and the subset grid 
> changes dimension and index at every time step, so I will also need to 
> use DMDestroy after each time step
> 
> Will that use alot of memory? Will the grid actually be created? So I 
> wonder if this DMDACreate3d and DMDestroy calls will take a lot of time.
> 
> 
> --
> Thank you.
>
> Yours sincerely,
>
> TAY wee-beng

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151110/2fd3ce71/attachment.pgp>


More information about the petsc-users mailing list