Commit 37a445c8 authored by Daniel Wortmann's avatar Daniel Wortmann

Some more explicit freeing of blacs-descriptors

parent 557ee803
......@@ -200,6 +200,7 @@ CONTAINS
CALL eigen_diag(mpi,hmat,smat,nk,jsp,iter,ne_all,eig,zMat)
CALL smat%free()
CALL hmat%free()
DEALLOCATE(hmat,smat, stat=dealloc_stat, errmsg=errmsg)
if(dealloc_stat /= 0) call juDFT_error("deallocate failed for hmat or smat",&
hint=errmsg, calledby="eigen.F90")
......@@ -232,7 +233,7 @@ CONTAINS
if(dealloc_stat /= 0) call juDFT_error("deallocate failed for smat_unfold",&
hint=errmsg, calledby="eigen.F90")
CALL zmat%free()
END DO k_loop
END DO ! spin loop ends
......@@ -38,22 +38,22 @@ CONTAINS
!up-up component (or only component in collinear case)
IF (SIZE(mat)==1) THEN
CALL mat_final%move(mat(1,1))
!CALL mat(1,1)%free()
CALL mat(1,1)%free()
CALL mat_final%copy(mat(1,1),1,1)
!CALL mat(1,1)%free()
CALL mat(1,1)%free()
!down-down component
CALL mat_final%copy(mat(2,2),lapw%nv(1)+atoms%nlotot+1,lapw%nv(1)+atoms%nlotot+1)
!CALL mat(2,2)%free()
CALL mat(2,2)%free()
!Now collect off-diagonal parts
CALL mat(1,2)%add_transpose(mat(2,1))
CALL mat_final%copy(mat(1,2),1,lapw%nv(1)+atoms%nlotot+1)
!CALL mat(1,2)%free()
!CALL mat(2,1)%free()
CALL mat(1,2)%free()
CALL mat(2,1)%free()
END SUBROUTINE eigen_redist_matrix
END MODULE m_eigen_redist_matrix
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