[petsc-users] Multiple in-flight communications with PetscSFs

Jed Brown jed at jedbrown.org
Sat Feb 7 07:57:43 CST 2015


Lawrence Mitchell <lawrence.mitchell at imperial.ac.uk> writes:
> Thanks, patch (plus simple test) here https://bitbucket.org/petsc/petsc/pull-request/255/sf-fix-multiple-in-flight-comm-rounds-for/diff

Thanks; I'll test here.

> Before this change the communication completion into A get's B's data and vice versa.  This doesn't occur for -sf_type window.
>
> While I'm here, is there any reason that DMs don't call setfromoptions on their SFs: it looks like one can't select an an sf type except programmatically.
>
> Maybe the following:
>
> diff --git a/src/dm/interface/dm.c b/src/dm/interface/dm.c
> index 324b101..9e9b130 100644
> --- a/src/dm/interface/dm.c
> +++ b/src/dm/interface/dm.c
> @@ -49,6 +49,8 @@ PetscErrorCode  DMCreate(MPI_Comm comm,DM *dm)
>    v->coloringtype             = IS_COLORING_GLOBAL;
>    ierr                        = PetscSFCreate(comm, &v->sf);CHKERRQ(ierr);
>    ierr                        = PetscSFCreate(comm, &v->defaultSF);CHKERRQ(ierr);
> +  ierr                        = PetscSFSetFromOptions(v->sf); CHKERRQ(ierr);
> +  ierr                        = PetscSFSetFromOptions(v->defaultSF); CHKERRQ(ierr);

Please use PetscObjectSetOptionsPrefix on the SFs and call
PetscSFSetFromOptions in DMSetFromOptions.

>    v->defaultSection           = NULL;
>    v->defaultGlobalSection     = NULL;
>    v->defaultConstraintSection = NULL;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150207/2fe0c72d/attachment.pgp>


More information about the petsc-users mailing list