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.
8
!--------------------------------------------------
9
! Stand-alone 'die' routine for use by libraries and
12
! Each program using the module or library needs to
13
! provide a routine with the proper interface, but
14
! accomodating the needs and conventions of the program.
15
! For example, in Siesta:
17
! - The use of a Siesta-specific 'mpi_siesta' module.
18
! - The need to have the pxf functionality.
19
! - The use of 'unit 6' as output.
21
! Routines using this functionality should include
26
! character(len=*), intent(in) :: str
30
!------------------------------------------------------
34
use parallel, only : Node
39
character(len=*), intent(in) :: str
45
! Even though formally (in MPI 1.X), only the master node
46
! can do I/O, in those systems that allow it having each
47
! node state its complaint can be useful.
49
!! if (Node.eq.0) then
50
write(6,'(a)') trim(str)
51
write(0,'(a)') trim(str)
52
write(6,'(a,i4)') 'Stopping Program from Node: ', Node
53
write(0,'(a,i4)') 'Stopping Program from Node: ', Node
61
call MPI_Abort(MPI_Comm_World,1,MPIerror)