[petsc-users] pass PETSC_NULL_INTEGER to dynamic array of Vec in Frotran90
Satish Balay
balay at mcs.anl.gov
Thu Feb 21 11:05:31 CST 2013
For one - you might need PETSC_NULL_OBJECT. And even then - perhaps
the compiler might complain [as it expects an array].
And then the fortran interface to MatNullSpaceCreate() doesn't have
code to handle PETSC_NULL for this argument. [so it won't work anyway]
So you are better off passing in a dummy Vec
Vec :: dummyv(1)
Also - its best to pass in 'variables' not cosntants like '0' to
fortran subroutines.
PetscInt :: zero
zero = 0
Satish
On Wed, 20 Feb 2013, Mi Yan wrote:
> xlf9014.1 reported error for the below FORTRAN 90 code:
>
> ******
> MatNullSpace nullsp
> PetscErrorCode :: ierr
> call MatNullSpaceCreate( PETSC_COMM_WORLD, PETSC_TRUE, 0,
> PETSC_NULL_INTEGER, nullsp, ierr );
> ****
> The error message is:
> Actual argument attributes do not match those specified by an accessible
> explicit interface.
>
> The error implies the real argument the attribute of "PETSC_NULL_INTEGER"
> does not match with those specified by the interface. The interface of
> MatNullSpaceCreate is declared in finclude/ftn-auto/petscmat.h90 , whose
> 4th dummy argument is declared as
> Vec vecs (*)
>
> In my code, PETSC_NULL_INTEGER is passed to an array of Vec. Is there
> anything wrong here?
>
> thanks,
> Mi
More information about the petsc-users
mailing list