~nickpapior/siesta/tddft-work

« back to all changes in this revision

Viewing changes to Src/siesta_end.F

  • Committer: Rafi Ullah
  • Date: 2017-08-30 14:09:10 UTC
  • mfrom: (611.1.19 trunk)
  • Revision ID: rraffiu@gmail.com-20170830140910-bhu0osuh4d59wn8e
Merged with trunk-630

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
      use m_rhog,          only : resetRhog
37
37
      ! NP, new mixing
38
38
      use m_mixing_scf,    only : mixers_scf_reset
 
39
      USE siesta_options,  only : isolve, SOLVE_CHESS
 
40
#ifdef SIESTA__CHESS
 
41
      use m_chess, only: CheSS_finalize
 
42
#endif
39
43
 
40
44
#ifdef SIESTA__FLOOK
41
45
      use flook_siesta,    only : slua_close
42
46
      use siesta_options,  only : LUA
43
47
#endif
44
48
 
 
49
      use m_diag, only: diag_exit
45
50
 
46
51
#ifdef TRACING
47
52
      use extrae_eventllist, only : writeList, deleteList, eventlist
74
79
      call resetDscfPointers( )
75
80
      call resetRhog()
76
81
      call mixers_scf_reset()
 
82
 
 
83
      ! Clean diagonalization
 
84
      call diag_exit()
 
85
 
 
86
#ifdef SIESTA__CHESS
 
87
      if (isolve == SOLVE_CHESS) then
 
88
          call CheSS_finalize()
 
89
      end if
 
90
#endif
77
91
      
78
92
!     Output memory use up to the end of the program
79
93
!!      call printmemory( 6, 1 )
112
126
      endif  ! SIESTA_worker
113
127
 
114
128
! Finalize MPI, unless siesta is running as a subroutine
 
129
      !
 
130
      ! Add stamp to MESSAGES file
 
131
      call message('INFO','Job completed')
 
132
      
115
133
#ifdef MPI
116
134
      MPIerror = MPI_SUCCESS
117
135
      if (.not.siesta_subroutine) call MPI_Finalize( MPIerror )