CASTEP on darwin.hpc

Compiling CASTEP

These notes describe how to compile CASTEP on Darwin. They refer to the lastest UKCP release of CASTEP, 4.01. The good news is that CASTEP should compile almost 'out of the box'. In the top level Makefile set

COMMS_ARCH := mpi

MATHLIBS := mkl

The first builds a parallel executable (using MPI) and the second links to the Intel Math Kernal libraries (for LAPACK and BLAS) .
Then you should type 'make'. Ignore the prompt about fft libraries, but enter the path to MKL when prompted. At the moment this is /usr/local/Cluster-Apps/intel/mkl/9.0.018/lib/em64t

The following is a sample session:

[jry20@bindloe01 CASTEP-UKCP4.1]$ make

make[1]: Entering directory `/home/jry20/CASTEP-UKCP4.1/Source'
if [ -d ../obj/linux_x86_64_ifort ]; then mv  ../obj/linux_x86_64_ifort  ../obj/linux_x86_64_ifort.bak; fi
cp -rp ../obj/proto ../obj/linux_x86_64_ifort
cp ../obj/platforms/linux_x86_64_ifort.mk  ../obj/linux_x86_64_ifort/include_flags.mk
cp ../obj/proto/include_rules.mk  ../obj/linux_x86_64_ifort/
touch ../obj/linux_x86_64_ifort/exists

*******************************************************
Please enter directory where default libraries are kept:
   (The value you enter will be stored and used in future compiles.
    Delete file obj/linux_x86_64_ifort/fftlibdir to remove saved value )


*******************************************************
Please enter directory where mkl  LAPACK and BLAS libraries are kept:
   (The value you enter will be stored and used in future compiles.
    Delete file obj/linux_x86_64_ifort/mathlibdir to remove saved value )

/usr/local/Cluster-Apps/intel/mkl/9.0.018/lib/em64

make -C "../obj/linux_x86_64_ifort/Utility"
make[2]: Entering directory `/home/jry20/CASTEP-UKCP4.1/obj/linux_x86_64_ifort/Utility'
mpif90 -c -convert big_endian -O3 -axW   ../../../Source/Utility/constants.f90

CASTEP will take about 10minutes to compile. Your executable will be located at ./obj/linux_x86_64_ifort/castep

Running CASTEP

Castep can be run in parallel using the mpirun command (as is the case for any executable using MPI

You can download an example. Copy the files to a work directory. In the file mpi_submit edit the application variable to point to your castep executable. Submit the job with qsub mpi_submit. You can compare the output file with the sample output file.

Further Notes

Further Information