[petsc-users] CHKERRQ in PETSc 3.17 Fortran

Barry Smith bsmith at petsc.dev
Mon Apr 18 16:03:10 CDT 2022


  I don't think it is depreciated from Fortran. Isn't it only being replaced in C (though still available in C)? 

   The removal from Fortran was just an accident. 

 Barry


> On Apr 18, 2022, at 4:35 PM, Satish Balay via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> All CHKERRQ usages were initially removed from fortran examples
> 
> [now they are added back in main branch]
> 
> Satish
> 
> On Mon, 18 Apr 2022, Matthew Knepley wrote:
> 
>> How did any Fortran tests compile in the CI?
>> 
>>  Thanks,
>> 
>>     Matt
>> 
>> On Mon, Apr 18, 2022 at 4:09 PM Satish Balay via petsc-users <
>> petsc-users at mcs.anl.gov> wrote:
>> 
>>> Its deprecated - but the removal in fortran interface was not intentional.
>>> So its added in
>>> https://gitlab.com/petsc/petsc/-/commit/1d07488b31e9919329a73f04131a9987c281eb5e
>>> and should be in petsc-3.17.1
>>> 
>>> Satish
>>> 
>>> On Mon, 18 Apr 2022, Albert Mollen via petsc-users wrote:
>>> 
>>>> Hi,
>>>> Our code uses PETSc in both C++ and Fortran. After updating to using
>>> PETSc
>>>> 3.17.0 CHKERRQ is not found when compiling the Fortran part. I see that
>>>> CHKERRQ is now deprecated but is it intentional to remove it?
>>>> 
>>>> I could easily solve it by adding
>>>> 
>>>> #if PETSC_VERSION_GE(3,17,0)
>>>> #define CHKERRQ(...) PetscCall(__VA_ARGS__)
>>>> #endif
>>>> 
>>>> Thanks
>>>> ----------
>>>> Albert Mollén
>>>> Associate Research Physicist
>>>> 
>>>> Theory Department
>>>> Princeton Plasma Physics Laboratory
>>>> 
>>> 
>> 
>> 
>> 



More information about the petsc-users mailing list