The purpose of this section is to explain how one can build interface tools for another optimization package, similar to those interfaces sdunc and unc provided for UNCMIN. We provide generic scripts sdgen and gen to make this process easier. These scripts can be found in the $CUTER/build/prototypes directory.
For illustrative purposes, we assume the package for which one wishes to provide an interface is called pack. We suppose that both single and double precision instances of the package are available and that interfaces in both precisions are required. An interface for just one of the precisions can be obtained by ignoring any of the comments relating to the other. A number of additional comments regarding the interfacing of packages written in C are given in §1.10.2. We suggest the following steps.
Now compile this program into an object file called packma.o. The double precision object should reside in the directory
$MYCUTER/double/bin
and the single precision object should reside in the directory
$MYCUTER/single/bin,
prompt% cd $CUTER/build/prototypes
prompt% cp sdgen.pro sdpack.pro
prompt% cp gen.pro pack.pro
at the command prompt,
setenv PAC = pack
setenv PACKAGE = pack
prompt% sed -f $MYCUTER/precision/config/script.sed
file.pro > $MYCUTER/bin/file
prompt% chmod a+x $MYCUTER/bin/file
at the command prompt, where file is successively sdpack and pack. If you altered runpackage.pro, the same should be done for file=runpackage.
Note: In case your package is not going to be available on all the platforms for which you have a CUTEr installation, modify the scripts sdgen, gen and runpackage found in $MYCUTER/bin instead of the prototype scripts. Otherwise, it is recommended that you write prototypes and store them in $CUTER/build/prototypes.
We would be very pleased if you could send your interface and driver program to us, so that we can redistribute it with future versions of CUTEr, with proper ackowledgments. Thank you in advance and good luck!