source: codes/icosagcm/branches/SATURN_DYNAMICO/LMDZ.COMMON/config/ppsrc/dyn/abort_gcm.f @ 224

Last change on this file since 224 was 224, checked in by ymipsl, 10 years ago
File size: 1.4 KB
Line 
1!
2! $Id: abort_gcm.F 1907 2013-11-26 13:10:46Z lguez $
3!
4c
5c
6      SUBROUTINE abort_gcm(modname, message, ierr)
7     
8
9
10
11! if not using IOIPSL, we still need to use (a local version of) getin_dump
12      USE ioipsl_getincom
13
14      USE parallel_lmdz
15
16
17
18
19!
20! $Header$
21!
22!
23! gestion des impressions de sorties et de débogage
24! lunout:    unité du fichier dans lequel se font les sorties
25!                           (par defaut 6, la sortie standard)
26! prt_level: niveau d'impression souhaité (0 = minimum)
27!
28      INTEGER lunout, prt_level
29      COMMON /comprint/ lunout, prt_level
30 
31C
32C Stops the simulation cleanly, closing files and printing various
33C comments
34C
35C  Input: modname = name of calling program
36C         message = stuff to print
37C         ierr    = severity of situation ( = 0 normal )
38
39      character(len=*) modname
40      integer ierr, ierror_mpi
41      character(len=*) message
42
43      write(lunout,*) 'in abort_gcm'
44
45
46
47c     call histclo(2)
48c     call histclo(3)
49c     call histclo(4)
50c     call histclo(5)
51      write(lunout,*) 'Stopping in ', modname
52      write(lunout,*) 'Reason = ',message
53      if (ierr .eq. 0) then
54        write(lunout,*) 'Everything is cool'
55      else
56        write(lunout,*) 'Houston, we have a problem ', ierr
57C$OMP CRITICAL (MPI_ABORT_GCM)
58        call MPI_ABORT(COMM_LMDZ, 1, ierror_mpi)
59C$OMP END CRITICAL (MPI_ABORT_GCM)
60
61
62
63      endif
64      END
65
Note: See TracBrowser for help on using the repository browser.