Compiling DensEl

Research
Teaching
Publications
DensEl
ParaDens
Conquest
Links
Home
 

If you've got the DensEl tar ball, first you need to unpack it:

gunzip DensElv2.14a.tgz; tar xvf DensElv2.14a.tar
Then you need to go into the source directory (src). The first thing to do is select a Makefile (there are files for linux/x86 machines with g77, ifc (the Intel Fortran Compiler) and pgf77 (the Portland Group compiler). Then copy it to be your makefile, for instance for g77:
cp makefile_g77 makefile

Now we need to specify the appropriate libraries. DensEl relies on the BLAS libraries (Basic Linear Algebra Subroutines) for efficient operation - they are specified by the BLASLIB variable in the makefile. Linux distributions sometimes come with a default BLAS, but this is likely to be very bad ! You can get excellent performance from the ATLAS libraries or the BLAS that comes from the ASCI Red programme (which are both freely available) as well as the Intel Math Kernel Libraries (mkl). As an illustration of how to set BLASLIB, if you were to use the default RedHat libraries, you should edit the makefile so that the line for BLASLIB looks like this:

BLASLIB = -L/usr/lib -lblas

Now you should be ready to go ! Make the code:

make
There shouldn't be any problems - but please send bug reports to me. Once you've successfully compiled the code, look at the examples (in the subdirectory Examples) and try to run them. There's more information on running here.

Parameters required

The adjustable parameters are found in the file param.inc. DensEl does not yet feature dynamic allocation of memory, so these parameters need to be set at appropriate values, and adjusted given a failure. The most important parameters are:

  • MAX_N_ATOMS: The maximum number of atoms
  • MAX_H_INTER: The maximum number of hamiltonian range interactions
  • MAX_RHO_INTER: The maximum number of density matrix range interactions
  • MAX_N_INTERACTIONS: The maximum number of interactions of any range (goes out to twice density matrix range)
  • MAX_N_STORE: Storage for matrices
  • MAX_N_SPECIES: Maximum number of species
  • MAX_N_HOP: Maximum number of hopping integrals (species*species)

These are all reasonably easily set: the maximum number of atoms is chosen by the user when setting up the unit cell; the maximum number of hamiltonian range interactions is determined by the number of nearest neighbours, and should rarely exceed six for tetrahedral semiconductors (N.B. add one to the number of neighbours for the atom itself); the maximum number of density matrix range interactions is set by the range of the density matrix (for 3 hops or R~6 angstroms in Si, it should be around 60, while for 5 hops or R~10 angstroms in Si, it should be around 160); the maximum number of interactions of any range should be about four times MAX_RHO_INTER (as it's about twice the range); the storage required is roughly MAX_N_ATOMS*MAX_N_INTERACTIONS; the maximum number of species and hopping integrals are both set by the user's choice of system.

All these parameters are output by the code during the run.

Valid XHTML 1.0! Valid CSS!

David Bowler