1!
2! Copyright (C) 2001-2013 Quantum ESPRESSO group
3! This file is distributed under the terms of the
4! GNU General Public License. See the file `License'
5! in the root directory of the present distribution,
6! or http://www.gnu.org/copyleft/gpl.txt .
7!
8!
9!
10!
11! Author: L. Martin-Samos
12!
13!--------------------------------------------------------------------
14subroutine stop_pp
15  !--------------------------------------------------------------------
16  !
17  ! Synchronize processes before stopping.
18  !
19  use io_files, only: iunwfc
20  use mp_global, only: mp_global_end
21  USE parallel_include
22#if defined(__MPI)
23
24  integer :: info
25  logical :: op
26
27  inquire ( iunwfc, opened = op )
28
29  if ( op ) close (unit = iunwfc, status = 'delete')
30
31  call mp_global_end ( )
32
33#endif
34
35  stop
36end subroutine stop_pp
37