anchor.diff:      else
         c_maxl=0
       end if
  -    this%ls=sunspgmr(this%x,pOpt,c_maxl) ! use solution vector as template
  +    this%ls=sunlinsol_spgmr(this%x,pOpt,c_maxl) ! use solution vector as template
       if(.not.c_associated(this%ls))then
         write(*,'(a)')"[E] initBDFNewtonKrylov(): linear solver object not allocated"
         stop
       end if
  -    info=cvspilssetlinearsolver(this%work,this%ls)
  +    info=cvodesetlinearsolver(this%work,this%ls,C_NULL_PTR)
       if(info/=0)then
  -      write(*,'(a,i3)')"[E] initBDFNewtonKrylov(): CVSpilsSetLinearSolver error code ",info
  +      write(*,'(a,i3)')"[E] initBDFNewtonKrylov(): CVodeSetLinearSolver error code ",info
         stop
       end if
       if(present(pSet).and.present(pSol))then
         pOpt=PREC_LEFT
         this%pSet=c_funloc(pSet)
         this%pSol=c_funloc(pSol)
  -      info=cvspilssetpreconditioner(this%work,this%pSet,this%pSol)
  +      info=cvodesetpreconditioner(this%work,this%pSet,this%pSol)
         if(info/=0)then
  -        write(*,'(a,i3)')"[E] initBDFNewtonKrylov(): CVSpilsSetPreconditioner error code ",info
  +        write(*,'(a,i3)')"[E] initBDFNewtonKrylov(): CVodeSetPreconditioner error code ",info
           stop
         end if
       else
  
positive.code:     end function
      
      !> SUNLinearSolver create GMRES linear solver
      function sunspgmr(tmpl,pType,maxl) bind(c,name='SUNSPGMR')
        use iso_c_binding
        type(C_PTR),value::tmpl !< template N_Vector pointer
        integer(C_INT),value::pType !< preconditioning type
        integer(C_INT),value::maxl !< maximum dimensions of the Krylov subspace
        type(C_PTR)::sunspgmr !< value of the linear solver pointer
      end function
      
      !> SUNLinearSolver free linear solver
  
negative.code:       type(C_PTR)::mem !< location of memory pointer
      end subroutine
      
      !> KINSOL set linear solver
      function kinsetlinearsolver(mem,ls,mat) bind(c,name='KINSetLinearSolver')
        use iso_c_binding
        type(C_PTR),value::mem !< memory pointer
        type(C_PTR),value::ls !< sparse iterative linear solver pointer
        type(C_PTR),value::mat !< matrix template
        integer(C_INT)::kinsetlinearsolver !< error code
      end function
      
      !> KINSOL solve
  