[petsc-users] Usage of PETSC_NULL_INTEGER for PCASMGetSubKSP via Fortran interface
Barry Smith
bsmith at petsc.dev
Fri Dec 11 13:55:02 CST 2020
Nathan,
This is an oversight on our part. We need to provide each possibility for the function arguments as scalars or arrays, some of them are missing in the interface definition.
git checkout barry/2020-12-11/fix-fortran-pcasmgetsubksp/release will get you the fix.
Barry
The MR for getting the fix into release is https://gitlab.com/petsc/petsc/-/merge_requests/3475 <https://gitlab.com/petsc/petsc/-/merge_requests/3475>
> On Dec 11, 2020, at 8:49 AM, WUKIE, NATHAN A DR-02 USAF AFMC AFRL/RQVC via petsc-users <petsc-users at mcs.anl.gov> wrote:
>
> Hello,
>
> It looks like there has been some recent reorganization of Fortran interfaces. One item that has cropped up is that the interface for procedure PCASMGetSubKSP has been moved to a module via src/ksp/f90-mod/petscksp.h90.
>
> The question I have arrises when trying to pass PETSC_NULL_INTEGER, which seems to be an array, but the module interface to PCASMGetSubKSP now checks type rank consistency. PCASMGetSubKSP PetscInt arguments expect scalar values so just passing PETSC_NULL_INTEGER generates a compile-time error due to Scalar - Rank(1) mismatch.
>
> It seems one could pass PETSC_NULL_INTEGER(0) or PETSC_NULL_INTEGER(1), but I haven't found any documentation about how that's defined or if this is even the correct approach to resolve that issue. Could someone provide some insight or advise on the correct way forward?
>
> Thanks,
> Nathan
>
> petsc version: v3.14.2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20201211/8b40e09c/attachment.html>
More information about the petsc-users
mailing list