source: LMDZ5/trunk/libf/dyn3dpar/abort_gcm.F @ 1578

Last change on this file since 1578 was 1492, checked in by Laurent Fairhead, 14 years ago

Merge of development branch LMDZ5V2.0-dev r1455:r1491 into the trunk.
Validation made locally: restart files are strictly equal between the HEAD of the trunk
and r1491 of LMDZ5V2.0-dev


Synchro de la branche de développement LMDZ5V2.0-dev r1455:r1491 et de la trunk
Validation faite en local: les fichiers restart sont équivalents entre la HEAD de la trunk
et la révision r1491 de LMDZ5V2.0-dev

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
RevLine 
[630]1!
[1279]2! $Id: abort_gcm.F 1492 2011-03-08 08:10:25Z jghattas $
[630]3!
4c
5c
6      SUBROUTINE abort_gcm(modname, message, ierr)
7     
8#ifdef CPP_IOIPSL
9      USE IOIPSL
[1279]10#else
11! if not using IOIPSL, we still need to use (a local version of) getin_dump
12      USE ioipsl_getincom
[630]13#endif
[1279]14      USE parallel
[630]15#include "iniprint.h"
16 
17C
18C Stops the simulation cleanly, closing files and printing various
19C comments
20C
21C  Input: modname = name of calling program
22C         message = stuff to print
23C         ierr    = severity of situation ( = 0 normal )
24
[1425]25      character(len=*) modname
[630]26      integer ierr
[1425]27      character(len=*) message
[630]28
29      write(lunout,*) 'in abort_gcm'
30#ifdef CPP_IOIPSL
[985]31c$OMP MASTER
[630]32      call histclo
33      call restclo
[1279]34      if (MPI_rank .eq. 0) then
35         call getin_dump
36      endif
[985]37c$OMP END MASTER
[630]38#endif
39c     call histclo(2)
40c     call histclo(3)
41c     call histclo(4)
42c     call histclo(5)
43      write(lunout,*) 'Stopping in ', modname
44      write(lunout,*) 'Reason = ',message
45      if (ierr .eq. 0) then
46        write(lunout,*) 'Everything is cool'
47      else
48        write(lunout,*) 'Houston, we have a problem ', ierr
[1425]49        stop 1
[630]50      endif
51      END
Note: See TracBrowser for help on using the repository browser.