Acro User Manual Version Version 1.0

## Configuration

### Overview

The configure script automates much of the setup activity associated with building large suites of programs like Acro on various hardware platforms. This includes

1. making symbolic links so that files used for configuration can be accessed from one location

2. generating Makefiles so that objects, libraries, executables and other 'targets' can be created for specific and unique hardware platforms

3. calling itself recursively so that sub-directories can also be configured

There are a number of configuration options that can be used to customize the installation. The core 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.

### Standard Options

The following options are either commonly used or specific to Acro packages:

[--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 Acro packages 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-gprof] | Sets the compiler to use flags that force executables to dump output files that can be read by the unix gprof utility to profile the code.

### Details of the Configuration Process

The configure script creates Makefiles from Makefile.in template files, which outline the basic `targets' that need to get built. This script can be customized using the configure.in file. Variables that are package, site or hardware dependent are stored in individual `fragment' files. These `fragment' files are added to the custom created Makefiles using the host, target, package and/or site parameters. After the configure command is completed, three files will be generated in each configured directory.

1. Makefile-${target}

   The suffix, ${target}, will depend on the target architecture, which defaults to the host architecture; native builds have identical host and target values.

2. Makefile

   This will be a symbolic link to Makefile-${target}. Consequently, when make is executed, the default behavior is to use the last generated Makefile-${target} file.

3. config.status

   A `recording' of the configuration process (i.e., what configure options were used to generate the current makefile).

Running configure takes a while, so be patient. Verbose output will always be displayed unless the parameter `--silent' is used. Further, the parameter '--norecursion' can be used to configure only the current directory. 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 executing config.status.

The configure command supports multi-platform environments using Makefile fragment files. The fragment files for these platforms and for the packages that Acro relies on are located in the acro/config directory. There are five types of files in this directory:

        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
        Acro (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).

        mf-<host>-<target>-<site>
        Automatically generated by the configure scripts.

### Platforms Supported

Acro can be configured for code development and execution on the following platforms:

        SUN		Solaris 2.8		CC v5.4		solaris
        PC		Red Hat LINUX 9		g++ v3.2.2	linux
        SGI		IRIX 6.5		CC v7.41	irix
        DEC		OSF 5.1			cxx v6.3-002	osf
        IBM		AIX 5.1			xlC v6		aix
        TFLOP	Cougar (compute)	ciCC v4.4.0	cougar
        TFLOP	OS (service)		iCC  v4.4.0	tflop
        Cplant	Compute OS		c++		cplant
        Cplant  	Service OS		g++		cplant
        PC		Windows (Cygwin)	g++		cygwin
        Mac		OSX (Darwin)		g++		darwin
        HP		HP-UX 10.20		CC		hpux

The last column shows the configuration target used to configure Makefiles for each of these systems.

The standard configure and build process described in Section Installation works on almost all of these platforms. A noteable exception are cougar builds, which generate executables for the ASCI Red compute nodes. These builds need to performed with a cross-compiler. For example, when building on sasn100.sandia.gov, you would configure as follows:

        ./configure --site=sasn100 --target=cougar