allocatable
change the self-consistent loop to p domain;
improve the effeciency