Compiling CASTEP 5.5.2 on HECToR phase 3
Instructions on how to compile CASTEP 6.0 for HECToR Phase 3 (Cray XE6, Interlagos)
Compiler
CASTEP 5.5.2 should be compiled using the GNU compilers on HECToR (PGI and Cray compiler produce incorrect results).
Set up your environment
Swap to the GNU programming environment:
module swap PrgEnv-cray PrgEnv-gnu
and add the FFTW3 library:
module add fftw
Complete list of modules loaded for central installation compile:
Currently Loaded Modulefiles: 1) modules/3.2.6.6 2) nodestat/2.2-1.0400.29866.4.3.gem 3) sdb/1.0-1.0400.30000.6.18.gem 4) MySQL/5.0.64-1.0000.4667.20.1 5) lustre-cray_gem_s/1.8.4_2.6.32.45_0.3.2_1.0400.6221.1.1-1.0400.30252.1.29 6) udreg/2.3.1-1.0400.3911.5.6.gem 7) ugni/2.3-1.0400.3912.4.29.gem 8) gni-headers/2.1-1.0400.3906.5.1.gem 9) dmapp/3.2.1-1.0400.3965.10.12.gem 10) xpmem/0.1-2.0400.29883.4.6.gem 11) hss-llm/6.0.0 12) Base-opts/1.0.2-1.0400.29823.8.1.gem 13) xtpe-network-gemini 14) PrgEnv-gnu/4.0.30 15) xt-mpich2/5.4.0 16) atp/1.4.0 17) xt-asyncpe/5.04 18) pmi/3.0.0-1.0000.8661.28.2807.gem 19) xt-libsci/11.0.03 20) gcc/4.6.2 21) pbs/11.2.0.113417 22) packages-phase2b 23) budgets/1.0 24) xtpe-interlagos 25) fftw/3.3.0.0
Edit the Makefile
Edit Makefile in the main CASTEP directory so that it has the following options:
COMMS_ARCH := mpi FFT := fftw3 BUILD := fast MATHLIBS := scilib
Modify sections in the obj/platforms/linux_x86_64_gfortran-XT.mk file to:
# # Optimiser, performance and debugging flags # ifeq ($(BUILD),warnings) OPT = -Ddebug -Wall -O0 -g -fbacktrace else ifeq ($(BUILD),debug) OPT = -Ddebug -O0 -g -fbounds-check -fbacktrace else ifeq ($(BUILD),intermediate) OPT = -O1 -g -fbacktrace else # Modified to remove '-march=native' OPT = -O3 -funroll-loops -ftree-loop-distribution endif
and
# # Cray scilib (Really only needed for serial compile - ftn includes it # ifeq ($(MATHLIBS),scilib) # Modified to remove explicit linking MATH_LIBS = endif
The modified file used on HECToR is available for download:
(Note: you will need to change the name of the above file to linux_x86_64_gfortran-XT.mk and place it in the obj/platforms directory.)
Build the program
Build the program with:
unset CPU make CASTEP_ARCH=linux_x86_64_gfortran-XT clean make CASTEP_ARCH=linux_x86_64_gfortran-XT
Back to the CASTEP page