These are Andrey Asadchev's original notes.
Please see aaa.readme.1st for a longer and also
hopefully easier to follow set of notes.
----------------------------------------------
Building library requires the following:
boost = http://www.boost.org/
hdf5 = http://www.hdfgroup.org/HDF5/
and optionally
cheetah = http://www.cheetahtemplate.org/
GA = http://www.emsl.pnl.gov/docs/global/download.shtml

The cheetah must be installed *if* the software is reconfigured with --with-lmax=N
The default maximum angular momentum is 4 (G function).


The simplest way to compile/install boost is to:
$ cd boost && make # installs into boost directory
installation directory can be specified with PREFIX, eg:
$ cd boost && make PREFIX=/opt/boost

If building boost by hand:
boost must be patched to compile correctly.
boost 1.43, 1.46 patches are located in boost/
Patch can be applied after or before compiling/installing boost.

Global Arrays can be downloaded and built automatically:
$ cd ga && make # installs default GA into ga directory
To configure GA, pass the GA configure optionsspace via CONFIGURE variable:
$ cd ga && make CONFIGURE="--with-mpi-spawn"
Note that GA must be patched otherwise you will encounter segmentation faults with >2GB memory segments.
If using the above steps, GA is patched automatically.
In case of using Intel MPI, the fortran compiler can be changed via MPICH_F77:
$ cd ga && make MPICH_F77=ifort

The minimum CUDA version required is 3.2, some components may require 4.0 and above.
Those will be disabled if lesser version is found.

The project is configured and built using standard configure command:
$ ./configure [options]
Run ./configure -h to see full list of options

Typical configure command would be:
$ ./configure --prefix=$PWD \
    --with-boost=... \
    --with-gamess

My line is usually:
$ ./configure --prefix=$PWD --with-gamess --with-blas --with-ga=$HOME/gamess/ga --with-boost=$PWD/boost --with-hdf5=$HOME/opt/hdf5 \
     CXXFLAGS="-O3 -msse3" # CC=cc CXX=CC

To use 8 byte Fortran integer: --with-integer8
  Use this option to override automatically determined integer size
To build with BLAS (ACML,ATLAS,etc):  --with-blas
To build with MKL:  --with-blas=mkl
To disable CUDA:    --without-cuda
To build for Fermi: --with-gpu=fermi (default is tesla)
To build with GA:   --with-ga (optionally can specify path)
  Not all methods will run in parallel without GA
To build with parallel HDF5, add --with-mpi

To enable runtime instrumenation:
--enable-instrument

Once configure is done, build and install project:
$ make -j install

To generate documentation, run:
$ make doxygen-doc

To control runtime, specify key/value pairs separated by ";" in CCHEM environmental variable,
e.g. export CCHEM="devices=0,1;memory=1g"
To control GPU devices:
    to use device 0,1: CCHEM="devices=0,1"
    to disable devices: CCHEM="devices="
To control memory:
    CCHEM="memory=N[kmg]" where N is the number of units and k,m,g specify units (kilo,mega,giga)
