! If the number of bands was estimated, there might be a side effect
! when the definitive number of bands is known. k points
! might be attributed to different processors than the present
! proc_distrb describes. At most, the number of k points could
! increase by 1 ...
if(tnband==0)nkpt_me=nkpt_me+1
This is horrendous!!!! If I try to parallelize fully over k (mkmem=1) and do not specify nband in the input file the code sets mkmem=2, and doubles my memory usage. This in unacceptable. The final number of bands should be determined with certainty before distribution, not fudging things with safety margins that potentially double memory footprint! We need some serious cleaning of the distribution routine, perhaps with separate, clearer, subroutines for each case (GS, RF ...). I do not dare modify this line, which probably came from a bug with implicit estimation of the nband - could someone have a look at it?
ciao!
Matthieu