Welcome

                The set of links needed for nlfit as a standalone code are in

NlfitMPCR.doc .htm

Debug

1.       The executable for MFAPFAC.vfproj is placed in ..\..\Robfit\Templfit\EFF.  This code translates the output file from Poly to double precision.

2.       The executable for NlfitM.vfproj or NlfitM.wpj is placed in ..\..\Robfit\Templfit\EFF.  These two codes differ by an allocatable statement.

Introduction

The Nlfit code easily breaks into three distinct parts, NlfitM, ..\NlfitSub\Welcome.htm, and..\PolySA\Welcome.htm.  NlfitM communicates with the outside world.  It initiates NlfitSub, and after it finishes prepares files for plotting.  It uses very little execution time and can be compiled with almost any compiler and in principle could be written in C.  PolySA calculates fA(xi) and its partials with respect to the varying parameters.  It can use a fair amount of execution time, but again can be compiled with almost any compiler.  It is initiated for each minimization step, usually several hundred are required, and returns a file that is read by Nlfitsub.  Nlfitsub begins with the present set of constants and returns a set for which the predicted chip is equal to fr ´ chi.

Options 

                The MP values are

Multi-option 0 DM 1 QM 2 MM 3 DD 4 DQ 5 QQ

Options

0.      Poly is double precision (easiest to write) and that the rest of the code is multiple precision (slowest code).

1.      Poly is quadruple precision – (easy to write using Intel-10), rest of code is multiple precision.

2.      Poly is multiple precision as is the rest of the code – most accurate possible.

3.      Poly and the rest of the code are double precision – fastest code for each step.

4.      Poly double and the rest quadruple

5.      Poly and the rest of the code quadruple

Codes

1.      NlfitM.wpj, NlfitM.vfproj initiates Nlfitsub.exe ( NlfitSub\Welcome.htm) which in turn initiates PolySA.exe many times.  The routines wait for NlfitSub to finish, then write output file with coefficients and standard deviations, err.out with the errors at the data points, res.out with the residuals at the data points and fit.dat which can be plotted with the input data.  Comments CV, CW and CI-10 to indicate changes needed to go from one to the other.  The use of NlfitSub rather than directly calling chiders and robmin eliminates overhead and adds no complications for those wanting to fit data to the function defined by PolySA.
NlfitM name.dir

a.      CV, vanilla f77, with maximum number of coefficients to be fitted and the maximum dimension of the vector x are set as parameters.  These will probably need to be changed for each application.  The exe file appears in the current directory.

b.      CW, watcom. with allocated dimensions so that the code reads the input file before deciding on the dimensions.

c.       CI-10, intel-10, differs from above in that the line with allocatable is required.  The executable is sent directly to C:\Watcom|binnt which is normally in the execution path.

2.      NlfitMPCR.wpj, NlfitMPCR.vfproj – NlfitMPCR.exe is in ..\NlfitM.  This routine initiates PolySA.exe, then ChiDers.exe, and finally RobMinSA.exe repeatedly until IEND = 0.  Then the code MPFAPFAC is inititated to convert Poly output to doubled precision. The watcom version has the allocatable line commented out and sends the executable to the current folder.  The intel-10 version puts the executable directly into C:\Watcom\binnt.  This has somewhat more overhead than NlfitM but provides a sample for the use of chiders and robmin for those wishing to use these in other applications.

3.       nlfitq.vfproj – real*16, but real *8 poly, initiates polysa only – uses optimization\Robmin\for\qrobmin.for – variables passed in common, quad precision sminv, which moves up to mphsminv or mpsminv, depending on value of mp.  This has the routines all included in the executable.  The entire code needs to be recompiled using Intel 10.  This will move into another folder.

4.       nlfitqq.vfproj  real*16 with real*16 polysa. – uses same robmin as the above.

5.      MFAPFAC.vfproj – Renames double precision file FAPFA.tmp à FAPFAC.tmp, copies Quad precision FAPFA.tmp to double precision FAPFAC.tmp,  copies Multiple precision FAPFA to double precision  FAPFAC.tmp.

Fortran codes
05/02/2009  06:14 PM             7,746 nlfitCP.for – used in 2

05/30/2009  04:30 PM             7,903 NlfitM.for – used in 1a and 1b

04/28/2009  07:08 AM            11,527 nlfitq.for – used in 2a

04/28/2009  07:16 AM            11,579 nlfitqq.for – used in 2b