next up previous contents
Next: Castep Performance Up: Programming Previous: ScaLAPACK Performance   Contents

Castep Implementation

In order to encapsulate the changes to the diagonalisation and inversion routines, we moved the operations from Castep's wave module to its general algorithm module algor. The existing subroutine algor_invert was overloaded to work with complex matrices as well as double-precision real ones, and also gained optional arguments to specify the symmetry of the matrix (e.g. Hermitian).

A new subroutine algor_diagonalise was created to handle matrix diagonalisation. This subroutine takes a complex matrix and returns its eigenvectors and eigenvalues. Optional arguments specify the symmetry of the matrix (e.g. Hermitian).

The initialisation of the Basic Linear Algebra Communication Subroutines (BLACS) that are used by ScaLAPACK for its communication is done in the comms module, inside comms_parallel_strategy. Because BLACS libraries are not commonplace, all of the BLACS and ScaLAPACK calls are wrapped inside conditional compilation sections - only if Castep is compiled with -DBLACS will the parallel matrix diagonalisers and inverters be used.

As has already been mentioned (e.g. sections 3.2.2 and 4.2.2), in testing it was found that in fact the largest matrix Castep diagonalises in the al3x3 benchmark is not a band-overlap matrix at all, but a projector-projector overlap matrix. Rewriting this to take advantage of the distributed inverter gave the single greatest performance benefit in this phase of the project.


next up previous contents
Next: Castep Performance Up: Programming Previous: ScaLAPACK Performance   Contents
Sarfraz A Nadeem 2008-09-01