source: LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/abort_gcm.F @ 1219

Last change on this file since 1219 was 1219, checked in by jghattas, 15 years ago

Uniquement un process devrait faire l'appel a getin_dump sinon on
risque d'avoir des conflit de fermeture du meme fichier.

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