~nickpapior/siesta/tddft-work

« back to all changes in this revision

Viewing changes to Util/STM/ol-stm/Src/local_sys.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:
 
1
! ---
 
2
! Copyright (C) 1996-2016       The SIESTA group
 
3
!  This file is distributed under the terms of the
 
4
!  GNU General Public License: see COPYING in the top directory
 
5
!  or http://www.gnu.org/copyleft/gpl.txt .
 
6
! See Docs/Contributors.txt for a list of contributors.
 
7
! ---
 
8
 
 
9
      module sys
 
10
!
 
11
!     Termination and messaging routines, MPI aware
 
12
!
 
13
      implicit none
 
14
 
 
15
      public :: die      ! Prints an error message and calls MPI_Abort
 
16
      private
 
17
 
 
18
      CONTAINS
 
19
 
 
20
!--------------------------------------------------
 
21
      subroutine die(str)
 
22
 
 
23
      character(len=*), intent(in), optional   :: str
 
24
 
 
25
      if (present(str)) then
 
26
         write(6,'(a)') trim(str)
 
27
         write(0,'(a)') trim(str)
 
28
      endif
 
29
 
 
30
      stop
 
31
      end subroutine die
 
32
 
 
33
      end module sys
 
34
 
 
35
! Stand-alone copy      
 
36
      subroutine die(str)
 
37
 
 
38
      character(len=*), intent(in)  :: str
 
39
 
 
40
         write(6,'(a)') trim(str)
 
41
         write(0,'(a)') trim(str)
 
42
 
 
43
      stop
 
44
      end subroutine die
 
45