Commit d0da8ed5 authored by Gregor Michalicek's avatar Gregor Michalicek

Write out overall iteration number to out.xml

parent 8ccc8c30
...@@ -43,6 +43,7 @@ CONTAINS ...@@ -43,6 +43,7 @@ CONTAINS
#ifdef CPP_MPI #ifdef CPP_MPI
USE m_mpimakegroups USE m_mpimakegroups
#endif #endif
USE m_xmlOutput
IMPLICIT NONE IMPLICIT NONE
TYPE(t_results),INTENT(INOUT):: results TYPE(t_results),INTENT(INOUT):: results
...@@ -242,6 +243,8 @@ CONTAINS ...@@ -242,6 +243,8 @@ CONTAINS
999 CONTINUE 999 CONTINUE
CALL loddop(stars,vacuum,atoms,sphhar, input,sym, nu, iter,vr,vpw,vz,vzxy) CALL loddop(stars,vacuum,atoms,sphhar, input,sym, nu, iter,vr,vpw,vz,vzxy)
CLOSE(nu) CLOSE(nu)
IF (mpi%irank.EQ.0) CALL openXMLElementFormPoly('iteration',(/'numberForCurrentRun','overallNumber '/),(/it,iter/),&
reshape((/19,13,5,5/),(/2,2/)))
! !
! some modifications for gw-calculations ! some modifications for gw-calculations
......
...@@ -24,7 +24,7 @@ MODULE m_xmlOutput ...@@ -24,7 +24,7 @@ MODULE m_xmlOutput
PUBLIC openXMLElementFormPoly, openXMLElementPoly PUBLIC openXMLElementFormPoly, openXMLElementPoly
PUBLIC openXMLElementForm, openXMLElement PUBLIC openXMLElementForm, openXMLElement
PUBLIC openXMLElementNoAttributes, closeXMLElement PUBLIC openXMLElementNoAttributes, closeXMLElement
PUBLIC getXMLOutputUnitNumber PUBLIC getXMLOutputUnitNumber, isCurrentXMLElement
CONTAINS CONTAINS
...@@ -486,4 +486,14 @@ MODULE m_xmlOutput ...@@ -486,4 +486,14 @@ MODULE m_xmlOutput
END SUBROUTINE closeXMLElement END SUBROUTINE closeXMLElement
LOGICAL FUNCTION isCurrentXMLElement(elementName)
IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: elementName
isCurrentXMLElement = (TRIM(ADJUSTL(elementList(currentElementIndex))).EQ.TRIM(ADJUSTL(elementName)))
END FUNCTION isCurrentXMLElement
END MODULE m_xmlOutput END MODULE m_xmlOutput
...@@ -245,7 +245,6 @@ ...@@ -245,7 +245,6 @@
IF (mpi%irank.EQ.0) CALL openXMLElementNoAttributes('scfLoop') IF (mpi%irank.EQ.0) CALL openXMLElementNoAttributes('scfLoop')
DO 80 WHILE ( l_cont ) DO 80 WHILE ( l_cont )
it = it + 1 it = it + 1
IF (mpi%irank.EQ.0) CALL openXMLElementPoly('iteration',(/'number'/),(/it/))
!+t3e !+t3e
IF (input%alpha.LT.10.0) THEN IF (input%alpha.LT.10.0) THEN
! !
...@@ -667,7 +666,9 @@ ...@@ -667,7 +666,9 @@
ENDIF ENDIF
ENDDO !qcount ENDDO !qcount
IF (stop80) THEN IF (stop80) THEN
IF (mpi%irank.EQ.0) CALL closeXMLElement('iteration') IF ((mpi%irank.EQ.0).AND.(isCurrentXMLElement("iteration"))) THEN
CALL closeXMLElement('iteration')
END IF
EXIT ! it EXIT ! it
ENDIF ENDIF
...@@ -861,7 +862,9 @@ ...@@ -861,7 +862,9 @@
END IF END IF
CALL writeTimesXML() CALL writeTimesXML()
CALL resetIterationDependentTimers() CALL resetIterationDependentTimers()
IF (mpi%irank.EQ.0) CALL closeXMLElement('iteration') IF ((mpi%irank.EQ.0).AND.(isCurrentXMLElement("iteration"))) THEN
CALL closeXMLElement('iteration')
END IF
80 CONTINUE 80 CONTINUE
IF (mpi%irank.EQ.0) CALL closeXMLElement('scfLoop') IF (mpi%irank.EQ.0) CALL closeXMLElement('scfLoop')
CALL juDFT_end("all done",mpi%irank) CALL juDFT_end("all done",mpi%irank)
......
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