Commit 133c650b authored by Gregor Michalicek's avatar Gregor Michalicek

Introduce reset_eig subroutine

This seems to be required for mpi based eigenvector IO.
parent 79fe8adb
...@@ -11,8 +11,8 @@ MODULE m_eig66_io ...@@ -11,8 +11,8 @@ MODULE m_eig66_io
IMPLICIT NONE IMPLICIT NONE
PRIVATE PRIVATE
PUBLIC open_eig,close_eig PUBLIC open_eig,close_eig,reset_eig
PUBLIC read_eig, write_eig PUBLIC read_eig,write_eig
CONTAINS CONTAINS
FUNCTION open_eig(mpi_comm,nmat,neig,nkpts,jspins,& FUNCTION open_eig(mpi_comm,nmat,neig,nkpts,jspins,&
...@@ -163,4 +163,16 @@ CONTAINS ...@@ -163,4 +163,16 @@ CONTAINS
CALL timestop("IO (write)") CALL timestop("IO (write)")
END SUBROUTINE write_eig END SUBROUTINE write_eig
SUBROUTINE reset_eig(id,l_soc)
USE m_eig66_MPI,ONLY:reset_eig_MPI=>reset_eig
INTEGER, INTENT(IN) :: id
LOGICAL, INTENT(IN) :: l_soc
SELECT CASE (eig66_data_mode(id))
CASE (MPI_mode)
CALL reset_eig_MPI(id,l_soc)
END SELECT
END SUBROUTINE reset_eig
END MODULE m_eig66_io END MODULE m_eig66_io
...@@ -7,7 +7,7 @@ MODULE m_eig66_mpi ...@@ -7,7 +7,7 @@ MODULE m_eig66_mpi
#endif #endif
IMPLICIT NONE IMPLICIT NONE
PRIVATE PRIVATE
PUBLIC open_eig,read_eig,write_eig,close_eig PUBLIC open_eig,read_eig,write_eig,close_eig,reset_eig
CONTAINS CONTAINS
SUBROUTINE priv_find_data(id,d) SUBROUTINE priv_find_data(id,d)
...@@ -390,6 +390,24 @@ CONTAINS ...@@ -390,6 +390,24 @@ CONTAINS
#endif #endif
END SUBROUTINE write_eig END SUBROUTINE write_eig
SUBROUTINE reset_eig(id,l_soc)
INTEGER, INTENT(IN) :: id
LOGICAL, INTENT(IN) :: l_soc
#ifdef CPP_MPI
TYPE(t_data_MPI),POINTER :: d
CALL priv_find_data(id,d)
d%neig_data=0
d%eig_data=1E99
d%w_iks_data=1E99
if (d%l_real.and..not.l_soc) THEN
d%zr_data=0.0
else
d%zc_data=0.0
endif
#endif
END SUBROUTINE reset_eig
#ifdef CPP_MPI #ifdef CPP_MPI
SUBROUTINE priv_put_data(pe,slot,DATA,handle) SUBROUTINE priv_put_data(pe,slot,DATA,handle)
IMPLICIT NONE IMPLICIT NONE
...@@ -505,7 +523,6 @@ CONTAINS ...@@ -505,7 +523,6 @@ CONTAINS
ENDDO ENDDO
END SUBROUTINE create_maps END SUBROUTINE create_maps
#endif #endif
END MODULE m_eig66_mpi END MODULE m_eig66_mpi
...@@ -68,7 +68,7 @@ CONTAINS ...@@ -68,7 +68,7 @@ CONTAINS
#ifdef CPP_MPI #ifdef CPP_MPI
USE m_mpi_bc_potden USE m_mpi_bc_potden
#endif #endif
USE m_eig66_io, ONLY : open_eig, close_eig USE m_eig66_io
USE m_chase_diag USE m_chase_diag
IMPLICIT NONE IMPLICIT NONE
...@@ -176,6 +176,8 @@ CONTAINS ...@@ -176,6 +176,8 @@ CONTAINS
scfloop:DO WHILE (l_cont) scfloop:DO WHILE (l_cont)
CALL reset_eig(eig_id,noco%l_soc)
it = it + 1 it = it + 1
IF (mpi%irank.EQ.0) CALL openXMLElementFormPoly('iteration',(/'numberForCurrentRun','overallNumber '/)& IF (mpi%irank.EQ.0) CALL openXMLElementFormPoly('iteration',(/'numberForCurrentRun','overallNumber '/)&
,(/it,inden%iter/), RESHAPE((/19,13,5,5/),(/2,2/))) ,(/it,inden%iter/), RESHAPE((/19,13,5,5/),(/2,2/)))
......
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