7. Writing Application Codes with TAO

The examples throughout the library demonstrate the software usage and can serve as templates for developing custom applications. We suggest that new TAO users examine programs in
   ${TAO_DIR}/src/examples . 
Additional examples are available on our website and in
   ${TAO_DIR}/src/<unconstrained,bound,..>/examples/tutorials, 
where <component> denotes any of the TAO components, such as bound or unconstrained. The HTML version of the manual pages located at
   ${TAO_DIR}/docs/manualpages/index.html 
or
   http://www.mcs.anl.gov/tao/documentation/manualpages/index.html 
provides indices (organized by both routine names and concepts) to the tutorial examples.

We suggest the following procedure for writing a new application program using TAO:

    1. Install TAO according to the instructions in http://www.mcs.anl.gov/tao/documentation/index.html.
    2. Copy the examples and makefile from the directory f: R^n R where n = 2m is the number of variables. The code in Figure is only the main program. We have not included the code for evaluating the function and gradient or for evaluating the Hessian matrix.

    rosenbrock1.c
    Figure 3: Example of Uniprocessor TAO Code

    Note that while we use the C language to introduce the TAO software, the package is also fully usable from C++ and Fortran77/90. Section discusses additional issues concerning Fortran usage.

    The code in Figure contains many of the components needed to write most TAO programs and thus, is illustrative of the features present in complex optimization problems. Note that we have omitted the code required for the routine FormFunctionGradient, which evaluates the function and gradient, and the code for FormHessian, which evaluates the Hessian matrix for Rosenbrock's function. The following sections annotates the lines of code in Figure .