ponweist / Wannier90-PRACE

Optimizations for Wannier90 (fork repository - see http://wannier.org for the official version).
GNU General Public License v2.0
1 stars 0 forks source link

Optimize k_path #4

Closed ponweist closed 9 years ago

ponweist commented 10 years ago

Analyze performance for k_path calculations and do basic optimizations.

ponweist commented 10 years ago

Performance of k_path (16sm case) by removing superfluous call to get_imfghk_list (CPU cycles for master process only):

Before Current Speedup factor
k_path 4e11 3e11 ~1.3
get_imfgh_k_list 3.3e11 2.2e11 ~1.3

Test parameters:

kpath = T
kpath_task = bands,curv,morb
kpath_num_points = 500
kpath_bands_colour = spin

begin kpoint_path
G  0.0  0.0  0.0  X  0.0  0.5  0.5
X  0.0  0.5  0.5  W  0.25 0.75 0.5
W  0.25 0.75 0.5  K  0.375  0.75  0.375
K  0.375  0.75  0.375 G  0.0  0.0  0.0
G  0.0  0.0  0.0  L  0.5  0.5  0.5
L  0.5  0.5  0.5  U  0.625 0.25 0.625
U  0.625 0.25 0.625  X  0.0  0.5  0.5
L  0.5  0.5  0.5  W  0.25 0.75 0.5
W  0.25 0.75 0.5  G  0.0  0.0  0.0
G  0.0  0.0  0.0  U  0.625 0.25 0.625
U  0.625 0.25 0.625  K  0.375  0.75  0.375
end kpoint_path

kslice = F
berry = F
ponweist commented 10 years ago

After rewrite of get_imfgh_k_list, saving some matrix products which have been evaluated multiple times (CPU cycles for master process only):

Before Current Speedup factor
k_path 4e11 2.7e11 ~1.5
get_imfgh_k_list 3.3e11 2e11 ~1.6

Comparing with the original code version, computation time (for above parameter settings) is down from 648 to 122 seconds (more than 5 times speedup)!