Overview
The MADCAP software package
-
is written in ansi C, and uses standard MPI and the
LAPACK
& ScaLAPACK libraries
(either C or Fortran) for efficiency and portability.
-
is communication-intensive, and so works most efficiently
when the matrices are dense on the processors.
-
performs all calculations in core in 8-byte precision, but
stores all intermediate data products on disc as unformatted 4-byte float
binary files.
-
stores all matrices on disc in full column-major form, but
only guarantees the lower triangle of any symmetric matrix to be correct.
-
does not have a makefile since parallel systems differ so
widely (even on the same hardware at different sites).
-
should be compiled with linkage to the local MPI, LAPACK
& ScaLAPACK (and hence BLAS/BLACS/PBLAS) libraries, as well as the
madcap.h header file and madtool.o object file.
madcap.h
The MADCAP header file includes
machine-specific pre-processor instructions to make the code machine-independent.
These cover
-
REQUIRED datatype definitions for 4-byte
integers, 4-byte floats and 8-byte floats to ensure that variables have
the required sizes.
-
OPTIONAL redefinition of malloc to
allow for the use of more efficient but non-standard memory allocation.
-
OPTIONAL redefinition of ScaLAPACK
C-type function calls to meet local standards.
-
REQUIRED definition of the function
mad_char() used to pass character variables to ScaLAPACK function calls
in the locally required manner.
madtool.c
The MADCAP tool code includes I/O
and error-handling functions for
-
converting input/output between a 4-byte
float binary file and an 8-byte float variable.
-
scattering/gathering matrices between
disc and processors according to ScaLAPACK block cyclic distribution.
-
error-checking and distributed error-handling.