Hello,
        How should i implement the function below in Fortran
    PetscErrorCode func (SNES snes,PetscInt it,PetscReal xnorm,PetscReal gnorm,
PetscReal f,SNESConvergedReason *reason,void *cctx)

       should it be a subroutine
    subroutine func (SNES snes,PetscInt it,PetscReal xnorm,PetscReal gnorm,
PetscReal f,SNESConvergedReason *reason,void *cctx, PetscErrorCode ierr)
       or a function whose result is of type PetscErrorCode

thanks
Reddy

--
-----------------------------------------------------
Dharmendar Reddy Palle
Graduate Student
Microelectronics Research center,
University of Texas at Austin,
10100 Burnet Road, Bldg. 160
MER 2.608F, TX 78758-4445
e-mail: dharmareddy84@gmail.com
Phone: +1-512-350-9082
United States of America.