6. Compilation

The code is almost completely Fortran 77 standard, with a couple of small exceptions which will be detailed below. It should compile with few problems, although you MUST change the options for the compilation for your particular computer. This will be the values of "FFLAGS" used at the top of Compile.sh, Genetic.sh and Bind.sh which do the compilation.

There are really six steps:

  1. Compile the fftw library, a general purpose FFT library; see fftw documentation. This is C code, and you will need to look at the information within the subdirectory for specific information about how to compile for your computer. With this you will create a library for subsequent compilation of the rest of the code. Note: it must be compiled in single-precision mode.
  2. Precompile, if possible, the FFTW routines that you will use. Since optimized compilation takes a lot of time, this will in general be much faster. A shell for doing this can be found in Precomp.sh. If you cannot do this on your computer you can use instead Bind_slow.sh. At least on an HP machine the computer runs out of space to do this!
  3. Compile the subroutines using Compile.sh, edited as appropriate for your computer.
  4. Compile and link the final programs using Bind.sh or Bind_slow.sh.
  5. Compile the genetic code using Genetic.sh -- again after editing the commands for your particular computer.
  6. Copy the example for Si (111) 7x7 to a different directory and run it yourself. You may not get exactly (to all significant places) the same answer, but it should be very close.

IMPORTANT: All the shell scripts are for a POSIX shell, i.e. /bin/sh, as is the genetic algorithm. You will have to use this shell not a "C" shell (/bin/csh) which has a different format for many of the commands.

A file containing known Ansi errors can be found in Ansi.txt. Some of these will be patched in the future, others will probably not matter on current computers. Perhaps more a problem is calling "C" programs from Fortran, where a "_" might be appended to the names with some computers. There does not appear to be any standard for this.
Some additional "notes" for particular machines are included in the file notes.html.

 Back