[petsc-dev] lovely developers note in manual page

Jed Brown jedbrown at mcs.anl.gov
Wed Feb 6 21:42:17 CST 2013


On Wed, Feb 6, 2013 at 9:29 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>   I never said I wasn't to blame :-)
>
>   You, fortunately escape blame because your famed code reviews had not
> yet started.
>

Hah, I just cover my tracks better and don't comment, supposedly to avoid
letting them get stale. ;-)


>
>   So how will we fix this for 64 bit indices? and enums mixed in
>

We currently have

include/finclude/petscdmdadef.h:#define DMDALocalInfo PetscInt

so the PetscInt parts are fine, but the enums are not. (And is
DMDA_LOCAL_INFO_SIZE really the name we want to use for the stencil type?)

We could explicitly pad to make the enums also addressable as PetscInt.
It's messy because we have to know big/little endian to pad correctly.


>
>    Barry
>
> On Feb 6, 2013, at 9:25 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
> > On Wed, Feb 6, 2013 at 3:10 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >
> >   Well, no, first they are not int and second some aren't necessarily
> int at all.
> >
> >   Developer note: Then entries in this struct are int instead of
> PetscInt so that the elements may
> >                   be extracted in Fortran as if from an integer array
> >
> > Version control is a bitch:
> >
> >
> https://bitbucket.org/petsc/petsc-dev/commits/e3362a471c3554df2e80e856b22727951a83bea8#Linclude/petscda.hT194(PetscInt-> int; comment added; author=Barry)
> >
> >
> https://bitbucket.org/petsc/petsc-dev/commits/0be48fdba6c75be1fcd648c7325467a545674f39#Linclude/petscda.hF203T203(int -> PetscInt; comment not removed; author=Barry)
> >
> >
> > .seealso:  DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMDestroy(),
> DM, DMDAGetLocalInfo(), DMDAGetInfo()
> > S*/
> > typedef struct {
> >   PetscInt         dim,dof,sw;
> >   PetscInt         mx,my,mz;    /* global number of grid points in each
> direction */
> >   PetscInt         xs,ys,zs;    /* starting point of this processor,
> excluding ghosts */
> >   PetscInt         xm,ym,zm;    /* number of grid points on this
> processor, excluding ghosts */
> >   PetscInt         gxs,gys,gzs;    /* starting point of this processor
> including ghosts */
> >   PetscInt         gxm,gym,gzm;    /* number of grid points on this
> processor including ghosts */
> >   DMDABoundaryType bx,by,bz; /* type of ghost nodes at boundary */
> >   DMDAStencilType  st;
> >   DM               da;
> > } DMDALocalInfo;
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130206/8c0ef6d1/attachment.html>


More information about the petsc-dev mailing list