This code was developed on the IBM-SP called seaborg at NERSC. Included in the distribution is a csh script called compileScript.sh which will compile the code on seaborg. This script will most likely need to be altered in order to compile the code on other machines. There are three platform dependent things which may need to be changed.
sizedType.h
The first thing that must be determined is whether or not the machine you are
working on has been incorporated into sizedType.h .
This header file is an altered version of madcap.h which is part of
MADCAP .
The description Julian Borrill gives of the original file
can be found here.
sizedType.h contains the definitions for
flt8: An eight byte floating point type (probably a double).
flt8mpiType: MPI type for an eight byte floating point number.
flt4: A four byte floating point type (probably a float).
flt4mpiType: MPI type for a four byte floating point number.
int8: An eight byte integer (might be a long int).
int8mpiType: MPI type for an eight byte integer.
int4: A four byte integer (might be an int)
int4mpiType: MPI type for a four byte integer.
These types should be properly defined for your platform
in sizedType.h.
Defining the machine name
Once you are sure that sizedType.h has a set of
definitions for the machine you are working on
you must make use of them by defining the machine name (as specified by
sizedType.h) in the default flags sent to the C
compiler. These default flags are set near the top of
compileScript.sh in the alias call. The
default flag used with this distribution is
-D SPwhich tells the code that the sizes of the data types is the same as on the IBM-SP running AIX with 32 bit addressing. The following is a list of names and the corresponding architecture:
Including the FFTW library
ccSHT requires that the FFTW library be installed.
This library is free, and should be quite trivial to install.
The last machine specific alteration to make to compileScript.sh
is to determine where the
FFTW include and library directories are. In
compileScript.sh this is done by the call to
module load fftwwhich on seaborg defines a variable called FFTW. This variable is a string that has the following value:
-I/usr/common/usg/fftw/2.1.3/include -L/usr/common/usg/fftw/2.1.3/libWhen this string is inserted into the compile command line the fftw include directory (where fftw.h is located) and the fftw library directory (where libfftw.a is located) are defined. Note that the above definition for FFTW is specific to seaborg, and the line
module load fftwshould probably be replaced with something along the lines of:
set FFTW = "-I/usr/local/include -L/usr/local/lib"
Running the compile script
Now that all of the machine specific changes have been made to
compileScript.sh and
sizedType.h the compile
script should be run. This script should make the file:
MADmapwhich is the executable.