mirror of https://gitlab.com/QEF/q-e.git
39 lines
779 B
Fortran
39 lines
779 B
Fortran
!
|
|
! Copyright (C) 2001-2004 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 .
|
|
!
|
|
!----------------------------------------------------------------------------
|
|
SUBROUTINE stop_code( flag )
|
|
!----------------------------------------------------------------------------
|
|
!
|
|
! ... Synchronize processes before stopping.
|
|
!
|
|
USE kinds, ONLY : DP
|
|
USE mp, ONLY : mp_end, mp_barrier
|
|
!
|
|
USE parallel_include
|
|
!
|
|
IMPLICIT NONE
|
|
!
|
|
LOGICAL :: flag
|
|
!
|
|
!
|
|
CALL mp_barrier()
|
|
!
|
|
CALL mp_end()
|
|
!
|
|
IF ( flag ) THEN
|
|
!
|
|
STOP
|
|
!
|
|
ELSE
|
|
!
|
|
STOP 1
|
|
!
|
|
ENDIF
|
|
!
|
|
END SUBROUTINE stop_code
|