(git:3add494)
cp_lbfgs Module Reference

LBFGS-B routine (version 3.0, April 25, 2011) More...

Functions/Subroutines

subroutine, public setulb (n, m, x, lower_bound, upper_bound, nbd, f, g, factr, pgtol, wa, iwa, task, iprint, csave, lsave, isave, dsave, trust_radius, spgr)
 This subroutine partitions the working arrays wa and iwa, and then uses the limited memory BFGS method to solve the bound constrained optimization problem by calling mainlb. (The direct method will be used in the subspace minimization.) More...
 

Detailed Description

LBFGS-B routine (version 3.0, April 25, 2011)

Note
L-BFGS-B (version 3.0, April 25, 2011) converted to Fortran 90 module
History
02.2005 Update to the new version 2.4 and deleting the blas part of the code (Teodoro Laino) 11.2012 New version 3.0 converted to Fortran 90 (Matthias Krack) 12.2020 Implementation of Space Group Symmetry (Pierre-André Cazade)
Author
Fawzi Mohamed (first version)

Function/Subroutine Documentation

◆ setulb()

subroutine, public cp_lbfgs::setulb ( integer, intent(in)  n,
integer, intent(in)  m,
real(kind=dp), dimension(n), intent(inout)  x,
real(kind=dp), dimension(n)  lower_bound,
real(kind=dp), dimension(n)  upper_bound,
integer, dimension(n)  nbd,
real(kind=dp)  f,
real(kind=dp), dimension(n)  g,
real(kind=dp), intent(in)  factr,
real(kind=dp), intent(in)  pgtol,
real(kind=dp), dimension(2*m*n + 5*n + 11*m*m + 8*m)  wa,
integer, dimension(3*n)  iwa,
character(len=60)  task,
integer  iprint,
character(len=60)  csave,
logical, dimension(4)  lsave,
integer, dimension(44)  isave,
real(kind=dp), dimension(29)  dsave,
real(kind=dp), intent(in)  trust_radius,
type(spgr_type), optional, pointer  spgr 
)

This subroutine partitions the working arrays wa and iwa, and then uses the limited memory BFGS method to solve the bound constrained optimization problem by calling mainlb. (The direct method will be used in the subspace minimization.)

Parameters
nn is the dimension of the problem.
mm is the maximum number of variable metric corrections used to define the limited memory matrix.
xOn entry x is an approximation to the solution. On exit x is the current approximation.
lower_boundthe lower bound on x.
upper_boundthe upper bound on x.
nbdnbd represents the type of bounds imposed on the variables, and must be specified as follows: nbd(i)=0 if x(i) is unbounded, 1 if x(i) has only a lower bound, 2 if x(i) has both lower and upper bounds, and 3 if x(i) has only an upper bound.
fOn first entry f is unspecified. On final exit f is the value of the function at x.
gOn first entry g is unspecified. On final exit g is the value of the gradient at x.
factrfactr >= 0 is specified by the user. The iteration will stop when

(f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= factr*epsmch

where epsmch is the machine precision, which is automatically generated by the code. Typical values for factr: 1.d+12 for low accuracy; 1.d+7 for moderate accuracy; 1.d+1 for extremely high accuracy.

Parameters
pgtolpgtol >= 0 is specified by the user. The iteration will stop when

max{|proj g_i | i = 1, ..., n} <= pgtol

where pg_i is the ith component of the projected gradient.

Parameters
waworking array
iwainteger working array
taskis a working string of characters of length 60 indicating the current job when entering and quitting this subroutine.
iprintiprint is a variable that must be set by the user. It controls the frequency and type of output generated: iprint<0 no output is generated; iprint=0 print only one line at the last iteration; 0<iprint<99 print also f and |proj g| every iprint iterations; iprint=99 print details of every iteration except n-vectors; iprint=100 print also the changes of active set and final x; iprint>100 print details of every iteration including x and g; When iprint > 0, the file iterate.dat will be created to summarize the iteration.
csaveis a working string of characters
lsavelsave is a working array On exit with 'task' = NEW_X, the following information is available: If lsave(1) = .true. then the initial X has been replaced by its projection in the feasible set If lsave(2) = .true. then the problem is constrained; If lsave(3) = .true. then each variable has upper and lower bounds;
isaveisave is a working array On exit with 'task' = NEW_X, the following information is available: isave(22) = the total number of intervals explored in the search of Cauchy points; isave(26) = the total number of skipped BFGS updates before the current iteration; isave(30) = the number of current iteration; isave(31) = the total number of BFGS updates prior the current iteration; isave(33) = the number of intervals explored in the search of Cauchy point in the current iteration; isave(34) = the total number of function and gradient evaluations; isave(36) = the number of function value or gradient evaluations in the current iteration; if isave(37) = 0 then the subspace argmin is within the box; if isave(37) = 1 then the subspace argmin is beyond the box; isave(38) = the number of free variables in the current iteration; isave(39) = the number of active constraints in the current iteration; n + 1 - isave(40) = the number of variables leaving the set of active constraints in the current iteration; isave(41) = the number of variables entering the set of active constraints in the current iteration.
dsavedsave is a working array of dimension 29. On exit with 'task' = NEW_X, the following information is available: dsave(1) = current 'theta' in the BFGS matrix; dsave(2) = f(x) in the previous iteration; dsave(3) = factr*epsmch; dsave(4) = 2-norm of the line search direction vector; dsave(5) = the machine precision epsmch generated by the code; dsave(7) = the accumulated time spent on searching for Cauchy points; dsave(8) = the accumulated time spent on subspace minimization; dsave(9) = the accumulated time spent on line search; dsave(11) = the slope of the line search function at the current point of line search; dsave(12) = the maximum relative step length imposed in line search; dsave(13) = the infinity norm of the projected gradient; dsave(14) = the relative step length in the line search; dsave(15) = the slope of the line search function at the starting point of the line search; dsave(16) = the square of the 2-norm of the line search direction vector.
trust_radius...
spgr...
History
12.2020 Implementation of Space Group Symmetry [pcazade]
Author
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.

Definition at line 183 of file cp_lbfgs.F.

Here is the call graph for this function:
Here is the caller graph for this function: