<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2019-04-05 6:00 p.m., Matthew
      Knepley wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMYG4G=BCx1+Yu9J4z-v++JOZM0AQdD0f1U25s6p2FUctgquwg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">On Fri, Apr 5, 2019 at 4:44 PM Danyang Su via
          petsc-users <<a href="mailto:petsc-users@mcs.anl.gov"
            moz-do-not-send="true">petsc-users@mcs.anl.gov</a>>
          wrote:<br>
        </div>
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">Hi All,<br>
            <br>
            I got a strange error in calling DMPlexDistribute after
            updating PETSc <br>
            to V3.11.0. There sounds no change in the interface of
            DMPlexDistribute <br>
            as documented in<br>
            <br>
            <a
href="https://www.mcs.anl.gov/petsc/petsc-3.10/docs/manualpages/DMPLEX/DMPlexDistribute.html#DMPlexDistribute"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://www.mcs.anl.gov/petsc/petsc-3.10/docs/manualpages/DMPLEX/DMPlexDistribute.html#DMPlexDistribute</a><br>
            <br>
            <a
href="https://www.mcs.anl.gov/petsc/petsc-3.11/docs/manualpages/DMPLEX/DMPlexDistribute.html#DMPlexDistribute"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://www.mcs.anl.gov/petsc/petsc-3.11/docs/manualpages/DMPLEX/DMPlexDistribute.html#DMPlexDistribute</a><br>
            <br>
            The code section is shown below.<br>
            <br>
                   !c distribute mesh over processes<br>
                   call <br>
DMPlexDistribute(dm,stencil_width,PETSC_NULL_SF,distributed_dm,ierr)<br>
            <br>
            When I use PETSc V3.10 and earlier versions, it works fine.
            After <br>
            updating to latest PETSc V3.11.0, I got the following error
            during compiling<br>
            <br>
                   call <br>
DMPlexDistribute(dm,stencil_width,PETSC_NULL_SF,distributed_dm,ierr)<br>
                                                                      1<br>
            Error: Non-variable expression in variable definition
            context (actual <br>
            argument to INTENT = OUT/INOUT) at (1)<br>
/home/dsu/Soft/PETSc/petsc-3.11.0/linux-gnu-opt/lib/petsc/conf/petscrules:31:
            <br>
            recipe for target '../../solver/solver_ddmethod.o' failed<br>
            <br>
            The fortran example <br>
/home/dsu/Soft/PETSc/petsc-3.11.0/src/dm/label/examples/tutorials/ex1f90.F90
            <br>
            which also uses DMPlexDistribute can be compiled without
            problem. Is <br>
            there any updates in the compiler flags I need to change?<br>
          </blockquote>
          <div><br>
          </div>
          <div>What includes do you have? It looks like it does not
            understand PETSC_NULL_SF.</div>
        </div>
      </div>
    </blockquote>
    #include <petsc/finclude/petscsys.h><br>
    #include <petsc/finclude/petscdmplex.h><br>
    #include <petsc/finclude/petscdmlabel.h><br>
    <p>It looks like DMPlexDistribute requires the third parameter to be
      in/out declaration while PETSC_NULL_SF does not allow to do this.
      <br>
    </p>
    <p>Danyang<br>
    </p>
    <blockquote type="cite"
cite="mid:CAMYG4G=BCx1+Yu9J4z-v++JOZM0AQdD0f1U25s6p2FUctgquwg@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div><br>
          </div>
          <div>  Thanks,</div>
          <div><br>
          </div>
          <div>    Matt</div>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            Thanks,<br>
            <br>
            Danyang<br>
            <br>
            <br>
          </blockquote>
        </div>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>What most experimenters take for granted before
                      they begin their experiments is infinitely more
                      interesting than any results to which their
                      experiments lead.<br>
                      -- Norbert Wiener</div>
                    <div><br>
                    </div>
                    <div><a href="http://www.cse.buffalo.edu/~knepley/"
                        target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>