Necessary outside libraries
The DFT++ software requires two outside libraries. The libraries are
needed to handle these two generic tasks:
1. Fast Fourier Transform library
For FFTs, we have opted to use the FFTW package. This is a freely
obtainable FFT package developed at MIT by Matteo Frigo and Steven
Johnson. The package is very easy to use and install, configures and
optimizes itself for your system, and can dynamically adjust itself at
runtime for optimum performance on the problem you are working on. It
can be run serial and parallel, does complex or real transforms, and
many other things that this simple description can not do justice to.
We highly recommend this package, and we've been *VERY* happy with its
performance and just as importantly, its portability!
FFTW has its own web site: http://fftw.org where you can get the
latest and greatest and a great deal of documentation, benchmarks,
etc. Please visit the site for detailed questions about FFT and
documentation and howtos.
For those in a hurry, here's the quick way that worked for me, and
probably will work for you. If it doesn't, please go to the FFTW site
and find the necessary help there.
- Download version 2.1.3: fftw-2.1.3.tar.gz
- Ungzip the file by running "gunzip fftw-2.1.3.tar.gz"
- Untar it with "tar -xvf fftw-2.1.3.tar", which will create a
directory named "fftw-2.1.3"with all the files in it.
- Go into the directory with "cd fftw-2.1.3". There is an
"INSTALL" file there with instructions, but since you're lazy, here
are the next two steps:
- Configure the FFTW system by running "./configure"
- Compile the FFTW package with "make"
- Run "make check" to have FFTW check its own
operation (fun to watch, but probably unnecessary)
2. Matrix diagonalization library
Basically, one needs to diagonalize symmetric or Hermitian matrices at some point in the program. There are two ways to do this:
If you don't care about speed at all, or are having a hard time
linking with LAPACK, then you can just use the jacobi.c
diagonalizer (based on the Jacobi method): slow and non-optimized, but
guaranteed to compile and run. By "slow" I mean the following: matrix
diagonalization is O(n^3) where n is the size of the matrix; the Jacobi
and LAPACK routines are all cubic algorithms; it is just that
jacobi.c has a bigger perfactor in from of n^3 and it is not at all optimized.
If you need speed, then read below.
Assuming you are not going to use the slow-but-steady Jacobi
diagonalizer, you will use LAPACK to perform matrix
diagonalizations. Only hermitian or symmetric matrix diagonalizations routines
are required from thhis library. Almost all systems have this
library, so please consult your system manuals or administrator for
how it can be found. On many systems, you may not have
to worry about this too much as the system will have LAPACK
preinstalled. Your main problem will then come later when you try to
compile and link (see the compilation section
for more details).
If your system doesn't have LAPACK, here is a generic LAPACK
package generic LAPACK package lapack.tar.gz along with the generic
requisite BLAS library blas.tar.gz. The
libraries are in Fortran 77, and you'll need an f77 compiler to
compile all the files in all the directories. This should work, but
it will probably not be a very fast library.
As a passing note, it turns out that only two subroutines are actually
needed
- "zheev" and "dsyev" in LAPACK
So you may not actually need all the LAPACK and BLAS libraries.
However we stronly encourage you to use ATLAS which provides free,
portable and highly efficient implementation of BLAS and LAPACK.