The routine utility_rotate_diag (utility.F90) accounts for 33% of the total runtime of the 16sm testcase, running with the following parameters:
kpath = F
kslice = T
kslice_task=fermi_lines
kslice_fermi_lines_colour=spin
kslice_2dkmesh = 100 100
!below is 0.0 0.0 1/8 half of L point
kslice_corner = 0.25 0.0 0.25
kslice_b1 = 1.0 1.0 0.0
kslice_b2 = 0.0 1.0 1.0
berry = F
The code of utility_rotate_diag is
function utility_rotate_diag(mat,rot,dim)
!===========================================================!
! !
! Rotates the dim x dim matrix 'mat' according to !
! (rot)^dagger.mat.rot, where 'rot' is a unitary matrix. !
! Computes only the diagonal elements of rotated matrix. !
! !
!===========================================================!
use w90_constants, only : dp
integer :: dim
complex(kind=dp) :: utility_rotate_diag(dim)
complex(kind=dp) :: mat(dim,dim)
complex(kind=dp) :: rot(dim,dim)
utility_rotate_diag=utility_matmul_diag(matmul(transpose(conjg(rot)),mat),rot,dim)
end function utility_rotate_diag
The routine
utility_rotate_diag
(utility.F90) accounts for 33% of the total runtime of the 16sm testcase, running with the following parameters:The code of
utility_rotate_diag
isBLAS should be used for the matrix product.