10 SOME ADVICE
How to proceed:
-
Adapt sysdepen.f to your system. If nothing works, use dummy.f instead of sysdepen.f . In this
case you will miss information on date and time of the run and the cpu-time used. Nothing else.
- Check whether the setting in O8PARA.INC is appropriate for your machine. The present setting
needs about 8MB user memory (due to the setting of NRESM and NX), the maximum number of variables and constraints allowed) Reset these parameters appropriately. You need about
NX*(NX+NRESM+10)+NRESM*(50+NSTEP)+ (NX+NRESM)*((NX+NRESM)*2+8)+CONST
double precision numbers to store. Observe that there must hold NRESM ³ NX.
- If you work on a UNIX-system, edit the Makefile (you possibly must modify the
compilerflags).
- Having written your problem-description, first compile and link it with testgrad.f in order to check
your analytical gradients if you have supplied these. You should supply analytical expressions whenever this is possible. The numerical differentiation feature will normally degrade reliability and efficiency. With DIFFTYPE=3 , which of course is quite costly, all testcases but one could be solved to almost the same precision as with analytical gradients. However the costs are very high (6n function evaluations for a single gradient).
- !!! In writing your example, remember you must completely specify your problem, such that the
evaluation of any function is well defined in the box given by the bound constraints. E.g. if you have to use log , Ö, xy with y
real or double, /(....) when you must add the appropriate lower
bounds ³ Î > 0 ( or £ -Î < 0 for denominators ) for the expressions occuring there.
- !!! Many machines nowadays use IEEE-arithmetic and have floating-errors disabled. Optimizing
NaN's of course is useless. If possible, use linker- or compiler switches which enable error reporting of floating point errors in order to detect such
behaviour.
- Compile your application programs and link with donlp2.o , donlp2main.o and sysdepen.o . If you
work on a UNIX-system, you may copy the suite of function evaluation routines to run.f and type "make exe"
- !!! If DONLP2 behaves "strange", proceed as follows: use
SUBROUTINE SETUP
'INCLUDE O8COMM.INC'
TE2=.TRUE.
C**** the following for small N, NG only
TE3=.TRUE.
.......
RETURN
END
after runnning the testcase, grep for 'NaN' in the *.PRO-file. If these are present, you can be sure that there is an error in your coding of the example of the kind indicated above.