Last change
on this file since 5298 was
5282,
checked in by abarral, 3 months ago
|
Turn iniprint.h clesphys.h into modules
Remove unused description.h
|
-
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.1 KB
|
Rev | Line | |
---|
[1632] | 1 | ! |
---|
[1748] | 2 | ! $Id: abort_gcm.F 1747 2013-04-23 14:06:30Z lguez $ |
---|
[1632] | 3 | ! |
---|
[5246] | 4 | ! |
---|
| 5 | ! |
---|
| 6 | SUBROUTINE abort_gcm(modname, message, ierr) |
---|
| 7 | |
---|
[5282] | 8 | USE iniprint_mod_h |
---|
[5246] | 9 | USE IOIPSL |
---|
[5267] | 10 | |
---|
[5246] | 11 | USE parallel_lmdz |
---|
[1632] | 12 | |
---|
[5246] | 13 | ! |
---|
| 14 | ! Stops the simulation cleanly, closing files and printing various |
---|
| 15 | ! comments |
---|
| 16 | ! |
---|
| 17 | ! Input: modname = name of calling program |
---|
| 18 | ! message = stuff to print |
---|
| 19 | ! ierr = severity of situation ( = 0 normal ) |
---|
[1632] | 20 | |
---|
[5246] | 21 | character(len=*), intent(in):: modname |
---|
| 22 | integer :: ierr, ierror_mpi |
---|
| 23 | character(len=*), intent(in):: message |
---|
| 24 | |
---|
| 25 | write(lunout,*) 'in abort_gcm' |
---|
| 26 | !$OMP MASTER |
---|
| 27 | call histclo |
---|
| 28 | call restclo |
---|
| 29 | if (MPI_rank .eq. 0) then |
---|
| 30 | call getin_dump |
---|
| 31 | endif |
---|
| 32 | !$OMP END MASTER |
---|
| 33 | ! call histclo(2) |
---|
| 34 | ! call histclo(3) |
---|
| 35 | ! call histclo(4) |
---|
| 36 | ! call histclo(5) |
---|
| 37 | write(lunout,*) 'Stopping in ', modname |
---|
| 38 | write(lunout,*) 'Reason = ',message |
---|
| 39 | if (ierr .eq. 0) then |
---|
| 40 | write(lunout,*) 'Everything is cool' |
---|
| 41 | else |
---|
| 42 | write(lunout,*) 'Houston, we have a problem, ierr = ', ierr |
---|
[4600] | 43 | |
---|
[5246] | 44 | if (using_mpi) THEN |
---|
| 45 | !$OMP CRITICAL (MPI_ABORT_GCM) |
---|
| 46 | call MPI_ABORT(COMM_LMDZ, 1, ierror_mpi) |
---|
| 47 | !$OMP END CRITICAL (MPI_ABORT_GCM) |
---|
| 48 | else |
---|
| 49 | stop 1 |
---|
| 50 | endif |
---|
| 51 | |
---|
| 52 | endif |
---|
| 53 | END SUBROUTINE abort_gcm |
---|
Note: See
TracBrowser
for help on using the repository browser.