faq:speedup
How can I speedup my calculations?
There are a couple of areas to consider when you are interested in performance, firstly the physics, and secondly, computational.
Physical parameters
- choosing the cheapest representation of your system that gives correct results e.g. choosing an appropriate basis set (Gaussian), and also an appropriately sized plane-wave expansion (see converging_cutoff )
- SCF settings - choosing an appropriate convergence threshold, and diagonalization algorithm (or use OT for non-metallic systems for much greater performance, with a good preconditioner) see static_calculation for some of the basics
Computational aspects
- If you are running in parallel with MPI do some tests (on a shortened version of your problem) to determine how many CPU cores you can effectively use. As a rule-of-thumb, you might expect reasonable scaling up to $n_\text{procs} \approx n_\text{atoms}$ for typical settings. see performance and http://www2.epcc.ed.ac.uk/~ibethune/files/cp2k_cug2014.pdf for benchmark data.
- Build the code with high compiler optimisation (e.g.
-O3
) and an optimised BLAS/LAPACK library (e.g. MKL, GotoBLAS, ATLAS)
- Build the code with the optional performance-critical libraries libsmm (in cp2k/tools/build_libsmm) and libgrid (cp2k/tools/autotune_grid).
Before going to far down any of these areas, take a look at the timing report which is printed at the end of your CP2K job output. This will give you some information about which parts of the code are taking the most time, and therefore where to invest your time tweaking to get the best performance.
faq/speedup.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1