Commit b8658c92 authored by chrmuell's avatar chrmuell

commented out EXIT when max number of iterations was reached (causes problems on LJ)

parent b43945dd
......@@ -31,9 +31,6 @@
IMPLICIT NONE
!This common Block is used in the lbfgs_nocedal line search
!see description there
!----------------
......@@ -50,11 +47,11 @@
!-------------------------------------------------------------------------
! Purpose : runs lbfgsb algorithm on test problem
!
! Input :
! Input : fcn (E) External Function to call for Fitness Value
! n (I) Dimensions of problem
! m (I) Number of of limited memory corrections stored
! x(n) (R) Starting point of dimension n
! fcn (E) External Function to call for Fitness Value
!
! Input/Output f (R) Function Value (at start/end of bfgs)
!
!
......@@ -89,7 +86,7 @@
INTEGER :: iteration_counter
iprint = options%BFGS_print
! nbd is a status variable for boundaries (see lbfgs-b.f)
nbd = 0
l = options%LBounds
u = options%UBounds
......@@ -109,22 +106,20 @@
!radius for the minimum step size
srad = options%BFGS_sigmastep_min * sigma
srad = options%BFGS_sigmastep_min * sigma
distx = 1_MK
DO
DO
!saving the origin point
x_org = x
CALL setulb(n,m,x,l,u,nbd,f,g,factr,pgtol,wa,iwa,task,iprint,&
csave,lsave,isave,dsave)
iteration_counter = iteration_counter + 1
IF (iteration_counter .GT. options%BFGS_maxiter) THEN
BFGSexitcounter(6) = BFGSexitcounter(6) + 1
EXIT
!EXIT
END IF
......@@ -145,16 +140,18 @@
IF (options%use_LJ ) THEN
IF (options%use_LJ) THEN
!only get new x/g if we moved
!IF (task(1:2) .eq. 'FG') THEN
CALL LJ_GRAD(f,x,g,n,1) !IF we do Lennard Jones optimization use the analytical gradient
CALL LJ_GRAD(f,x,g,n,1) !For LJ optimization use the analytical gradient
countBFGSEval = countBFGSEval + 1
!END IF
ELSEIF (options%use_TIP) THEN
CALL TIP4P_GRAD(f,x,g,n,1) !For TIP4P optimization use the analytical gradient
countBFGSEval = countBFGSEval + 1
ELSE
IF (options%Benchfctnr .EQ. 9) THEN
!only get new x/g if we moved
!IF (task(1:2) .eq. 'FG') THEN
......@@ -165,8 +162,6 @@
!END IF
ELSE
!only get new x/g if we moved
!IF (task(1:2) .eq. 'FG') THEN
f = cmaes_funcwrap(x,n,fcn)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment