next up previous contents
Next: Compiler Comparison Up: OpenMP Implementation Previous: distribute_matrix   Contents

Functional Evaluation

One subroutine that was not initially planned to be parallelised, but began to show up in the CP2K timing report as other areas of the code were parallelised was the evaluation of the correlation functional. In this case, only the PBE functional [9] was parallelised, but the method should generalise to the other implemented functionals easily if required.

The bulk of the functional evaluation is done as a single loop over the points on the real-space density grids. At each point, the (complicated) calculation of the the functional is performed, and the result written onto a corresponding point on the derivative grids. This loop is trivially parallel since each iteration is entirely independent, so we see very good OpenMP efficiency (93% efficiency with 6 threads, and 74% using all 24 cores on the node), as shown in table 3.


Table 3: Times (in seconds) and speedup for PBE evaluation on HECToR Phase 2b
Threads 1 2 3 4 6 12 24
pbe_lda_eval 7.98 4.05 2.73 2.08 1.42 0.75 0.45
Speedup 1 1.97 2.92 3.84 5.62 10.64 17.73


next up previous contents
Next: Compiler Comparison Up: OpenMP Implementation Previous: distribute_matrix   Contents
Iain Bethune
2010-09-14