Skip to content

Fix vexx_gamma_gpu when not using band groups (bug in !1812)

Victor Yu requested to merge vwzyu/q-e:exx_gpu_bgrp into develop

In !1812 (merged) I changed

COMPLEX(DP) :: psi(lda*npol,m)
COMPLEX(DP) :: hpsi(lda*npol,m)

to

COMPLEX(DP) :: psi(lda*npol,max_ibands)
COMPLEX(DP) :: hpsi(lda*npol,max_ibands)

in vexx_gamma_gpu, which fixes EXX + GPU + band groups. However it breaks the case where band group parallelization is not used, as I incorrectly assumed that max_ibands == m when there's only one band group. As a matter of fact max_ibands == m+2, which isn't a good design IMHO.

Now the above two lines are changed to

COMPLEX(DP) :: psi(:,:)
COMPLEX(DP) :: hpsi(:,:)

This is consistent with vexx_k_gpu and is passing the tests in the test-suite folder.

Merge request reports