2003-01-20 05:58:50 +08:00
|
|
|
!
|
|
|
|
! Copyright (C) 2001 PWSCF group
|
|
|
|
! This file is distributed under the terms of the
|
|
|
|
! GNU General Public License. See the file `License'
|
|
|
|
! in the root directory of the present distribution,
|
|
|
|
! or http://www.gnu.org/copyleft/gpl.txt .
|
|
|
|
!
|
|
|
|
!--------------------------------------------------------------------
|
2010-06-14 21:45:31 +08:00
|
|
|
SUBROUTINE stop_pp
|
2003-01-20 05:58:50 +08:00
|
|
|
!--------------------------------------------------------------------
|
|
|
|
!
|
|
|
|
! Synchronize processes before stopping.
|
|
|
|
!
|
2010-06-14 21:45:31 +08:00
|
|
|
USE control_flags, ONLY: twfcollect
|
|
|
|
USE io_files, ONLY: iunwfc
|
|
|
|
USE mp_global, ONLY: mp_global_end
|
2004-03-17 02:14:34 +08:00
|
|
|
USE parallel_include
|
2003-02-21 22:57:00 +08:00
|
|
|
#ifdef __PARA
|
2004-03-17 02:14:34 +08:00
|
|
|
|
2010-06-14 21:45:31 +08:00
|
|
|
INTEGER :: info
|
|
|
|
LOGICAL :: op
|
2004-05-08 01:21:24 +08:00
|
|
|
|
2010-06-14 21:45:31 +08:00
|
|
|
INQUIRE ( iunwfc, opened = op )
|
2004-05-08 01:21:24 +08:00
|
|
|
|
2010-06-14 21:45:31 +08:00
|
|
|
IF ( op ) THEN
|
|
|
|
IF (twfcollect) THEN
|
|
|
|
CLOSE (unit = iunwfc, status = 'delete')
|
|
|
|
ELSE
|
|
|
|
CLOSE (unit = iunwfc, status = 'keep')
|
|
|
|
ENDIF
|
|
|
|
ENDIF
|
2004-05-08 01:21:24 +08:00
|
|
|
|
2010-06-14 21:45:31 +08:00
|
|
|
CALL mp_global_end()
|
2003-01-20 05:58:50 +08:00
|
|
|
|
|
|
|
#endif
|
2003-04-25 06:10:04 +08:00
|
|
|
|
2010-06-14 21:45:31 +08:00
|
|
|
STOP
|
|
|
|
END SUBROUTINE stop_pp
|