[petsc-users] Strange compiling error in DMPlexDistribute after updating PETSc to V3.11.0

Danyang Su danyang.su at gmail.com
Sat Apr 6 12:33:34 CDT 2019


On 2019-04-05 6:00 p.m., Matthew Knepley wrote:
> On Fri, Apr 5, 2019 at 4:44 PM Danyang Su via petsc-users 
> <petsc-users at mcs.anl.gov <mailto:petsc-users at mcs.anl.gov>> wrote:
>
>     Hi All,
>
>     I got a strange error in calling DMPlexDistribute after updating
>     PETSc
>     to V3.11.0. There sounds no change in the interface of
>     DMPlexDistribute
>     as documented in
>
>     https://www.mcs.anl.gov/petsc/petsc-3.10/docs/manualpages/DMPLEX/DMPlexDistribute.html#DMPlexDistribute
>
>     https://www.mcs.anl.gov/petsc/petsc-3.11/docs/manualpages/DMPLEX/DMPlexDistribute.html#DMPlexDistribute
>
>     The code section is shown below.
>
>            !c distribute mesh over processes
>            call
>     DMPlexDistribute(dm,stencil_width,PETSC_NULL_SF,distributed_dm,ierr)
>
>     When I use PETSc V3.10 and earlier versions, it works fine. After
>     updating to latest PETSc V3.11.0, I got the following error during
>     compiling
>
>            call
>     DMPlexDistribute(dm,stencil_width,PETSC_NULL_SF,distributed_dm,ierr)
>                                                                          
>     1
>     Error: Non-variable expression in variable definition context (actual
>     argument to INTENT = OUT/INOUT) at (1)
>     /home/dsu/Soft/PETSc/petsc-3.11.0/linux-gnu-opt/lib/petsc/conf/petscrules:31:
>
>     recipe for target '../../solver/solver_ddmethod.o' failed
>
>     The fortran example
>     /home/dsu/Soft/PETSc/petsc-3.11.0/src/dm/label/examples/tutorials/ex1f90.F90
>
>     which also uses DMPlexDistribute can be compiled without problem. Is
>     there any updates in the compiler flags I need to change?
>
>
> What includes do you have? It looks like it does not understand 
> PETSC_NULL_SF.
#include <petsc/finclude/petscsys.h>
#include <petsc/finclude/petscdmplex.h>
#include <petsc/finclude/petscdmlabel.h>

It looks like DMPlexDistribute requires the third parameter to be in/out 
declaration while PETSC_NULL_SF does not allow to do this.

Danyang

>
>   Thanks,
>
>     Matt
>
>     Thanks,
>
>     Danyang
>
>
>
>
> -- 
> What most experimenters take for granted before they begin their 
> experiments is infinitely more interesting than any results to which 
> their experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/ 
> <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190406/56d2f24b/attachment.html>


More information about the petsc-users mailing list