prn1lb Subroutine

private subroutine prn1lb(n, m, l, u, x, Iprint, Itfile, Epsmch)

This subroutine prints the input data, initial point, upper and lower bounds of each variable, machine precision, as well as the headings of the output.

Credits

  • NEOS, November 1994. (Latest revision June 1996.) Optimization Technology Center. Argonne National Laboratory and Northwestern University. Written by Ciyou Zhu in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

the dimension of the problem

integer, intent(in) :: m

the maximum number of variable metric corrections allowed in the limited memory matrix.

real(kind=wp), intent(in) :: l(n)

the lower bound on x.

real(kind=wp), intent(in) :: u(n)

the upper bound on x.

real(kind=wp), intent(in) :: x(n)

initial solution point

integer, intent(in) :: Iprint

Controls the frequency and type of output generated

integer, intent(in) :: Itfile

iteration print file unit

real(kind=wp), intent(in) :: Epsmch

machine precision


Called by

proc~~prn1lb~~CalledByGraph proc~prn1lb lbfgsb_module::prn1lb proc~mainlb lbfgsb_module::mainlb proc~mainlb->proc~prn1lb proc~setulb lbfgsb_module::setulb proc~setulb->proc~mainlb

Source Code

      subroutine prn1lb(n,m,l,u,x,Iprint,Itfile,Epsmch)

      implicit none

      integer,intent(in) :: n !! the dimension of the problem
      integer,intent(in) :: m !! the maximum number of variable metric
                              !! corrections allowed in the limited memory matrix.
      integer,intent(in) :: Iprint !! Controls the frequency and type of output generated
      integer,intent(in) :: Itfile !! iteration print file unit
      real(wp),intent(in) :: Epsmch !! machine precision
      real(wp),intent(in) :: x(n) !! initial solution point
      real(wp),intent(in) :: l(n) !! the lower bound on `x`.
      real(wp),intent(in) :: u(n) !! the upper bound on `x`.

      integer :: i

      if ( Iprint>=0 ) then
         write (output_unit,'(a,/,/,a,/,/,a,1p,d10.3)') &
                  'RUNNING THE L-BFGS-B CODE',&
                  '           * * *',&
                  'Machine precision =',Epsmch
         write (output_unit,*) 'N = ' , n , '    M = ' , m
         if ( Iprint>=1 ) then
            write (Itfile,'(a,/,/,a,/,a,/,a,/,a,/,a,/,a,/,a,/,a,/,a,/,a,/,a,/,/,a,/,/,a,1p,d10.3)') &
                  'RUNNING THE L-BFGS-B CODE',                                      &
                  'it    = iteration number',                                       &
                  'nf    = number of function evaluations',                         &
                  'nseg  = number of segments explored during the Cauchy search',   &
                  'nact  = number of active bounds at the generalized Cauchy point',&
                  'sub   = manner in which the subspace minimization terminated:',  &
                  '        con = converged, bnd = a bound was reached',             &
                  'itls  = number of iterations performed in the line search',      &
                  'stepl = step length used',                                       &
                  'tstep = norm of the displacement (total step)',                  &
                  'projg = norm of the projected gradient',                         &
                  'f     = function value',                                         &
                  '           * * *',                                               &
                  'Machine precision =', Epsmch
            write (Itfile,*) 'N = ' , n , '    M = ' , m
            write (Itfile,'(/,3x,a,3x,a,2x,a,2x,a,2x,a,2x,a,2x,a,4x,a,5x,a,8x,a)') &
               'it','nf','nseg','nact','sub','itls','stepl','tstep','projg','f'
            if ( Iprint>100 ) then
               write (output_unit,'(/,a4,1p,6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))') 'L =' , (l(i),i=1,n)
               write (output_unit,'(/,a4,1p,6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))') 'X0 =', (x(i),i=1,n)
               write (output_unit,'(/,a4,1p,6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))') 'U =' , (u(i),i=1,n)
            endif
         endif
      endif

      end subroutine prn1lb