[petsc-users] Strange compiling error in DMPlexDistribute after updating PETSc to V3.11.0
Smith, Barry F.
bsmith at mcs.anl.gov
Sat Apr 6 13:53:56 CDT 2019
Great, thanks for letting us know. This will be fixed in our next 3.11.1 release https://bitbucket.org/petsc/petsc/pull-requests/1513/dmplexdistribute-sf-argument-need-not-be/diff
Barry
> On Apr 6, 2019, at 1:33 PM, Danyang Su <danyang.su at gmail.com> wrote:
>
>
> On 2019-04-06 12:13 a.m., Smith, Barry F. wrote:
>>
>>> On Apr 5, 2019, at 4:05 PM, Danyang Su via petsc-users <petsc-users at mcs.anl.gov> wrote:
>>>
>>> Hi Satish,
>>>
>>> Because of the intent(out) declaration, I use a temporary solution that passing a PetscSF type variable to DMPlexDistribute instead of passing PETSC_NULL_SF. But I am still confused how the example works without problem.
>> Yes this is strange. I cannot explain the inconsistent behavior between the two codes. Any chance you can send us your code (petsc-maint at mcs.anl.gov) so we can reproduce the problem?
>>
>> The intent(out) is obviously wrong in the interface definition since the function need not return the value. Could you please try removing the intent from the interface definition in http://bitbucket.org/petsc/petsc/commits/fdb49207a8b58c421782c7e45b1394c0a6567048, run make again on PETSc and see if that allows you to use PETSC_NULL_SF in your code?
>>
>> We would like to fix PETSc to handle this case
>>
>> Thanks
>>
>> Barry
>
> Hi Barry,
>
> After changing "PetscSF, intent(out) :: sf" to "PetscSF :: sf" in DMPlexDistribute interface, it allows me to use PETSC_NULL_SF in my code.
>
> Thanks,
>
> Danyang
>
>>> Thanks,
>>>
>>> Danyang
>>>
>>> On 2019-04-05 2:00 p.m., Balay, Satish wrote:
>>>> Ah - the message about distributed_dm - not PETSC_NULL_SF. So I'm off base here..
>>>>
>>>> Satish
>>>>
>>>>
>>>> On Fri, 5 Apr 2019, Balay, Satish via petsc-users wrote:
>>>>
>>>>> A fortran interface definition was added in petsc-3.11 so the compile now checks if its used correctly.
>>>>>
>>>>> http://bitbucket.org/petsc/petsc/commits/fdb49207a8b58c421782c7e45b1394c0a6567048
>>>>>
>>>>> + PetscSF, intent(out) :: sf
>>>>>
>>>>> So this should be inout?
>>>>>
>>>>> [All auto-generated stubs don't quantify intent()]
>>>>>
>>>>> Satish
>>>>>
>>>>> On Fri, 5 Apr 2019, Danyang Su via petsc-users 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?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Danyang
>>>>>>
>>>>>>
>>>>>>
More information about the petsc-users
mailing list