                   **********************************
                   *                                *
                   *  USING CG_DESCENT WITH CUTEst  *
                   *                                *
                   **********************************

                   (Last modified on 15 February 2022)

WHAT IS CG_DESCENT?
-------------

The CG_DESCENT package is for solving unconstrained optimization problems.
It is one component of the package SuiteOPT.

HOW DO I GET SuiteOPT?
------------------

It can be downloaded from the following web site of William W. Hager
(hager@ufl.edu):

http://users.clas.ufl.edu/hager/papers/Software/

INSTALLING CG_DESCENT IN CUTEst
-------------------------

You first need to download and install the CUTEst package. It can
currently be download from here: https://github.com/ralna/CUTEst/wiki
(authors: Nicholas Gould, Dominique Orban, and Philippe Toint).
As you will see, there are three components to CUTE: archdefs,
cutest, and sifdecode. Also, you will want to download the CUTE
set of test problems. When CUTE is installed, it is also necessary to
create some environment variables. The environment variables that are
used in the installation of PASA are $CUTEST, which is the full path
to the location of your cutest directory, and $MYARCH, which is a string
providing information about your operating system and computer architecture.
After setting up CUTE, go to the directory $CUTEST/bin/sys and add two
lines to provide your BLAS and LAPACK information. This same information
appears in your Userconfig.mk file except that quotation marks should
be inserted around the libraries.

BLAS="... -lgfortran -lpthread"
LAPACK="..."

Another environment variable which is likely needed is LD_LIBRARY_PATH.
This provides the path to dynamic libraries that are loaded at run time.
The command for setting up this environment variable is something like
the following (the full path name should be in quotes):

setenv LD_LIBRARY_PATH "path"

If there are multiple paths in the load library, then each path is
separated by a colon.

NOTE: If you already have a version of CUTEst installed on your computer,
it is important to update to a version after August, 2019, since
CUTE was modified at that date to enable use with PASA.

Once this setup is complete, the installation of cg descent in CUTEst
is completed by typing "make cgcute" in the top level directory of
SuiteOPT. As the codes are compiled and installed into CUTEst, the
following file is created:

    SuiteOPT/CGDESCENT/CUTEst/runcutest

This files contain an alias for running cg_descent in CUTEst.
If the alias is placed in a file such as ".cshrc" or ".bashrc" that
is executed at startup, then the aliases can be used in any window that
is opened subsequently. The command for solving an unconstrained
optimization problem PROB.SIF using the CGDESCENT alias is "cgrun PROB".

The default parameter values and their documentation appear in the
file cg_default.c which is found in the "Source" directories for CGDESCENT.
New values can be set in the cg_descent_main.c file of this directory, right
before execution of the call to cg_descent.  Of course, when new parameter
values are set, then cg_descent_main must be recompiled by typing "make".
A future version of cg_descent will check for a spec file, and when parameter
values are read from a spec file, there would be no need to type "make" after
changing parameter values.
=====================================
