Compiling CASTEP

The command make will often be sufficient for a successful build of a serial executable. You will be asked for the file location of the FFT and BLAS/LAPACK libraries if required. Selection of a serial or MPI build and customisation of library choices may be done by either editing the top level Makefile, which contains its own set of usage notes, or by specifying COMMS_ARCH=mpi when invoking make. Some compiler optimisations can be used by specifying BUILD=fast in either the top level Makefile or when running make. The build process itself can be run in parallel for example, make -j 4 if you have a four core machine. Running make install will prompt for a directory of your choice in which to install the executables.

In the source distribution there is a thorough installation guide in the README.INSTALL file and features listed in RELEASE.NOTES.

Many platforms are supported, including Linux, Mac OS X and Microsoft Windows. However, a UNIX-like environment is assumed by the build system, so in the case of Windows, an environment such as cygwin is required. Mac OS users may find that the required build tools are not installed by default. Installing Xcode tools will correct this.

A modern fortran compiler is required to build a CASTEP executable. There are a number that are freely available e.g. gfortran as part of the GNU gcc. To build an MPI parallel executable a suitable implementation of MPI must be available, refer to README.INSTALL for more details.

CASTEP makes extensive use of BLAS and LAPACK so an up-to-date installation of these libraries is essential. CASTEP also makes extensive use of fast Fourier transforms (FFTs). A fast implementation using Clive Temperton's GPFA algorithm is included and compiled in by default on all platforms. Other FFT libraries can also be used, such as FFTW and those in Intel MKL. For extensive information on the different library interfaces provided in CASTEP and their relative performance, please refer to README.INSTALL.