Last change
on this file since 5101 was
5101,
checked in by abarral, 4 months ago
|
Handle DEBUG_IO in lmdz_cppkeys_wrapper.F90
Transform some files .F -> .[fF]90
[ne compile pas à cause de writefield_u non défini - en attente de réponse Laurent]
|
-
Property copyright set to
Name of program: LMDZ Creation date: 1984 Version: LMDZ5 License: CeCILL version 2 Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539 See the license file in the root directory
|
File size:
1.4 KB
|
Line | |
---|
1 | |
---|
2 | ! $Id: abort_gcm.F 1747 2013-04-23 14:06:30Z lguez $ |
---|
3 | |
---|
4 | c |
---|
5 | c |
---|
6 | SUBROUTINE abort_gcm(modname, message, ierr) |
---|
7 | |
---|
8 | #ifdef CPP_IOIPSL |
---|
9 | USE IOIPSL |
---|
10 | #else |
---|
11 | ! if not using IOIPSL, we still need to use (a local version of) getin_dump |
---|
12 | USE ioipsl_getincom |
---|
13 | #endif |
---|
14 | USE parallel_lmdz |
---|
15 | INCLUDE "iniprint.h" |
---|
16 | |
---|
17 | C |
---|
18 | C Stops the simulation cleanly, closing files and printing various |
---|
19 | C comments |
---|
20 | C |
---|
21 | C Input: modname = name of calling program |
---|
22 | C message = stuff to print |
---|
23 | C ierr = severity of situation ( = 0 normal ) |
---|
24 | |
---|
25 | character(len=*), intent(in):: modname |
---|
26 | integer ierr, ierror_mpi |
---|
27 | character(len=*), intent(in):: message |
---|
28 | |
---|
29 | write(lunout,*) 'in abort_gcm' |
---|
30 | #ifdef CPP_IOIPSL |
---|
31 | c$OMP MASTER |
---|
32 | CALL histclo |
---|
33 | CALL restclo |
---|
34 | if (MPI_rank == 0) then |
---|
35 | CALL getin_dump |
---|
36 | endif |
---|
37 | c$OMP END MASTER |
---|
38 | #endif |
---|
39 | c CALL histclo(2) |
---|
40 | c CALL histclo(3) |
---|
41 | c CALL histclo(4) |
---|
42 | c CALL histclo(5) |
---|
43 | write(lunout,*) 'Stopping in ', modname |
---|
44 | write(lunout,*) 'Reason = ',message |
---|
45 | if (ierr == 0) then |
---|
46 | write(lunout,*) 'Everything is cool' |
---|
47 | else |
---|
48 | write(lunout,*) 'Houston, we have a problem, ierr = ', ierr |
---|
49 | |
---|
50 | if (using_mpi) THEN |
---|
51 | C$OMP CRITICAL (MPI_ABORT_GCM) |
---|
52 | CALL MPI_ABORT(COMM_LMDZ, 1, ierror_mpi) |
---|
53 | C$OMP END CRITICAL (MPI_ABORT_GCM) |
---|
54 | else |
---|
55 | stop 1 |
---|
56 | endif |
---|
57 | |
---|
58 | endif |
---|
59 | END |
---|
Note: See
TracBrowser
for help on using the repository browser.