|
PROGRAM OPTEST
EXTERNAL FCN, GFCN, HFCN
CALL TSUB (FCN, GFCN, HFCN)
STOP
END
SUBROUTINE TSUB (FCN, D1FCN, D2FCN)
REAL XBAS(20), X(20), TYPSIZ(20), XPLS(20), GPLS(20)
REAL A(20, 20), WRK(20, 8)
INTEGER ITNLIM(10), NE(10)
COMMON Y1(100), Y2(100), Y3(100)
COMMON /COUNT/ IFCNT, IGCNT, IHCNT
EXTERNAL FCN, D1FCN, D2FCN
C
M = 20
READ (5, 904) N
READ (5, 903) (XBAS(I), I = 1, N)
READ (5, 903) (TYPSIZ(I), I = 1, N)
READ (5, 903) GRADTL, STEPTL, STEPMX
READ (5, 902) NSP
READ (5, 902) (NE(I), I = 1, NSP)
READ (5, 902) (ITNLIM(I), I = 1, NSP)
DO 120 I = 1, NSP
DO 110 IM = 1, 3
DO 100 IE = 1, 2
WRITE (6, 900)
IFCNT = 0
IGCNT = 0
IHCNT = 0
C
C ADJUST INITIAL VALUES OF X
C
DO 10 J = 1, N
X(J) = XBAS(J)*10.0**NE(I)
10 CONTINUE
CALL DFAULT(N, X, XPLS, FSCALE, METHOD, IEXP, MSG,
+ NDIGIT, ILIM, IAGFLG, IAHFLG, IPR, DLT, DUM,
+ STP, DUM)
IF (STEPMX .GT. 0.0) STP = STEPMX
METHOD = IM
IAGFLG = 0
IAHFLG = 0
IEXP = IE - 1
C***** MSG = 2 + 4
ILIM = ITNLIM(I)
T1 = SECOND(DUM)
CALL OPTIF9(M, N, X, FCN,
+ D1FCN, D2FCN, TYPSIZ, FSCALE,
+ METHOD, IEXP, MSG, NDIGIT, ILIM, IAGFLG, IAHFLG,
+ IPR, DLT, GRADTL, STP, STEPTL,
+ XPLS, FPLS, GPLS, ITRMCD, A, WRK)
T2 = SECOND(DUM)
XTIME = (T2 - T1)
WRITE (6, 901) IFCNT, IGCNT, IHCNT, XTIME
100 CONTINUE
110 CONTINUE
120 CONTINUE
RETURN
900 FORMAT(1H1)
901 FORMAT(23H OPTEST #FCN EVAL = , I10/
+ 23H OPTEST GRAD EVAL = , I10/
+ 23H OPTEST HSN EVAL = , I10/
+ 23H OPTEST EXEC TIME = , F10.4, 4H SEC)
902 FORMAT (20I4)
903 FORMAT (4F20.0)
904 FORMAT (/I4)
END
|