http://www.cs.sandia.gov/~wehart/SGOPT
The CVS repository for SGOPT can be accessed by executing
cvs -d :ext:GEUutili@gaston.cs.sandia.gov:/usr/local/cvs/cvsroot checkout sgopt
cvs-s
can be used to encapsulate the access to the CVS repository. The cvs-s
script can be downloaded at ftp://ftp.cs.sandia.gov/pub/papers/wehart/src/cvs-shells.tar
ssh
command, version 1.x.gunzip sgopt-$VERSION.tar.gz # uncompress the archive tar xf sgopt-$VERSION.tar # unpack it
sgopt
directory and run the configure script. ./configure
The configure
script automates much of the setup activity associated with building large suites of programs like SGOPT on various hardware platforms. This includes
By default, the configure script does not assume that SGOPT relies on any other software libraries. There are a number of configuration options that can be used to customize the installation. The full parameter list for the configure
script is:
configure hosttype [--target=target] [--srcdir=dir] [--rm] [--site=site] [--prefix=dir] [--exec-prefix=dir] [--program-prefix=string] [--tmpdir=dir] [--with-package[=yes/no]] [--without-package] [--enable-feature[=yes/no]] [--disable-feature] [--norecursion] [--nfp] [-s] [-v] [-V | --version] [--help]
Many of these options are not necessary since system information can be often acquired from your local machine. Refer to the Cygnus configure
documentation for complete information. The following options are either commonly used or specific to SGOPT (examples of arguments are provided):
[--with-compiler=<gcc,CC>] | Sets up a specific compiler; The native compiler is the default.
|
[--target=<solaris>] | Optional flag to specify the target machine that you are cross-compiling for.
|
[--site=<snl980>] | Specifies the site-specific locations for MPI, etc.
|
[--with-debugging] | Turns on the DEBUGGING macro and sets the OPTIMIZATION macro to <flag> (code is compiled with -g by default).
|
[--with-mpi] | Turns on the use of the MPI package.
|
[--with-mpe] | Turns on the use of the MPE package.
|
[--with-swig] | Enables the use of swig to wrap SGOPT for use with the Python scripting language.
|
[--with-static] | Enables the compilation of statically linked libraries (the default).
|
[--with-insure] | Enables the compilation with the insure++ debugging tool.
|
[--with-shared] | Enables the compilation of dynamically linked libraries, which can be shared.
|
[--with-optimization=<level>] | Sets the optimization level used when compiling the source files. This is overridden by the --with-debugging flag.
|
[--with-ansi] | Sets up the compiler to use ANSI standard constructs for C++. (the default)
|
[--with-ansiheaders] | Creates flags that force the use of ANSI standard C++ header conventions. (the dfault)
|
The configure script creates Makefiles from Makefile.in
template files, which outline the basic `targets' that need to get built. Variables that are package, site or hardware dependent are stored in individual `fragment' files. These `fragment' files are added to the custom created Makefiles when users and code developers (recursively) configure this repository with specific host, target, package and/or site parameters.
Running configure
takes a while, so be patient. Verbose output will always be displayed unless the user/developer wishes to silence it by specifying the parameter, `--silent'. If you wish to configure only one level/directory, remember to use the option `--norecursion'. All generated "config.status" files include this parameter as a default for easy makefile re-generation; after editing a Makefile.in file, you can construct the associate Makefile file by typing config.status
.
After the configure
command is completed, three files will be generated in each configured directory (specified by the file, `configure.in').
The suffix, ${target}, will depend on the target specified. Native builds have identical host and target values.
This will be a symbolic link to the file mentioned above. A user or developer will simply type make
and the last generated Makefile-${target} will then be referenced.
A `recording' of the configuration process (i.e., what commands were executed to generate the makefile). It can be used by the custom makefile to re-generate itself with a command such as this
make Makefile.
Fragment files exist so that configure
can support multi-platform environments. SGOPT can be configured for code development and execution on the following platforms :
SPARC-SUN-SOLARIS2.5.1 (Sun ULTRAsparc) MIPS-SGI-IRIX6.4 (SGI Octane) HPPA1.1-HP-HPUX9.05 (HP 9000/700 series) PENTIUM-INTEL-COUGAR (Intel TFLOP supercomputer at SNL) i686-UNKNOWN-LINUX (Red Hat 7.1)
The fragment files for these platforms and for the packages that SGOPT relies on are located in the sgopt/config
directory. There are five types of files in this directory:
mf-<host>-<target>-<site> Automatically generated by the configure scripts. mh-<host> Fragments that define the utilities provided by the host (e.g. the definition of MAKE. mp-<target>-<site> Fragments that define information for the packages that are used by SGOPT (e.g. MPI). ms-<site> Fragments that define the site-specific general configuration information. If this does not exist for a given site, then the default ms-default fragment is used. mt-<target> Fragments needed to specfy how to compile code for a target architecture (e.g. compiler name/location).
make
Note that the makefiles in SGOPT may not be portable to all make
commands. However, they do work with the GNU gmake
command. The latest file Makefile-${target}
generated by configure
will be referenced by this command. The target directory for the library is created for the particular target platform as a subdirectory of sgopt/lib.
Prior to making object files header files are linked into the directory sgopt/include
.
make html
This requires the doxygen
utility.
make ps
This requires the doxygen
, latex
, and dvips
.
make pdf
This requires the doxygen
, latex
, dvips
and ghostscript packages.
sgopt/src/vcpp
. This project defines a DLL that will be compiled for SGOPT, and it can be easily included in a user's workspace. The project file relies on the environmental variable `SGOPT', which is defined from the MS Windows Control Panel under System/Environment
. This variable should be set to the path of the sgopt
directory. Note: this project file is out of date.