Commit a3c23c5d authored by Matthias Redies's avatar Matthias Redies

make sure eig_irr is not allocated twice

parent 1dec518d
......@@ -67,12 +67,14 @@ CONTAINS
allocate(zmat(kpts%nkptf), stat=ok)
IF (ok /= 0) call judft_error('eigen_hf: failure allocation z_c')
allocate(eig_irr(input%neig, kpts%nkpt), stat=ok)
if(.not. allocated(eig_irr)) allocate(eig_irr(input%neig, kpts%nkpt), stat=ok)
IF (ok /= 0) call judft_error('eigen_hf: failure allocation eig_irr')
eig_irr = 0
if(allocated(hybdat%kveclo_eig)) deallocate(hybdat%kveclo_eig)
allocate(hybdat%kveclo_eig(atoms%nlotot, kpts%nkpt), stat=ok)
IF (ok /= 0) call judft_error('eigen_hf: failure allocation hybdat%kveclo_eig')
eig_irr = 0
hybdat%kveclo_eig = 0
INQUIRE(file ="z",exist= l_exist)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment