<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Fellow PETSc developers (cc: PFLOTRAN developers),<br>
<br>
I am trying to get PFLOTRAN (which currently uses PETSc 3.9) working with the recent PETSc 3.10 release. One problem I am hitting is that VecScatterRemap() calls that were fine with PETSc 3.9 cause compile time errors due to mismatched ranks in some arguments.
 Digging around in the 3.10 source code, I see that in my auto-generated interfaces in $PETSC_DIR/src/vec/f90-mod/ftn-auto-interfaces/petscvec.h90 there is<br>
<br>
<tt>      subroutine VecScatterRemap(a,b,c,z)</tt><tt><br>
</tt><tt>      use petscvecdef</tt><tt><br>
</tt><tt>       VecScatter a ! VecScatter</tt><tt><br>
</tt><tt>       PetscInt b ! PetscInt</tt><tt><br>
</tt><tt>       PetscInt c ! PetscInt</tt><tt><br>
</tt><tt>       integer z</tt><tt><br>
</tt><tt>       end subroutine</tt><br>
<br>
but I think arguments b and c need to be defined something like<br>
<br>
<tt>       PetscInt, dimension(:), pointer :: b</tt><tt><br>
</tt><tt>       PetscInt, dimension(:), pointer :: c</tt><br>
<br>
(Though my modern Fortran skills are rusty and I'm not sure if this is quite how these should be declared.) Note that this interface doesn't appear to be generated at all in PETSc 3.9. It's been a very long time since I've done any hacking on the Fortran interface
 stuff in PETSc. How do I go about fixing this?<br>
<br>
Related Fortran usage question: At one point in PFLOTRAN, there is the call<br>
<br>
  call VecScatterRemap(ugdm%scatter_ltol,int_ptr,PETSC_NULL_INTEGER, &<br>
                       ierr);CHKERRQ(ierr)<br>
<br>
If I manually change the Fortran interface code to be as above, then I get<br>
<br>
  Error: Actual argument for 'c' must be a pointer at (1)<br>
<br>
If argument 'c' should indeed be defined as a pointer to a one-dimensional array, what variant of PETSC_NULL are we to pass?<br>
<br>
--Richard<br>
</body>
</html>