source: LMDZ4/trunk/libf/dyn3d/abort_gcm.F @ 5456

Last change on this file since 5456 was 1425, checked in by lguez, 14 years ago

Replaced Numerical Recipes procedures for spline interpolation (not in
the public domain) by procedures from the Pchip package in the Slatec
library. This only affects the program "ce0l", not the program
"gcm". Tested on Brodie SX8 with "-debug" and "-prod", "-parallel
none" and "-parallel mpi". "start.nc" and "limit.nc" are
changed. "startphy.nc" is not changed. The relative change is of order
1e-7 or less. The revision makes the program faster (tested on Brodie
with "-prod -d 144x142x39", CPU time is 38 s, instead of 54
s). Procedures from Slatec are untouched, except for
"i1mach.F". Created procedures "pchfe_95" and "pchsp_95" which are
wrappers for "pchfe" and "pchsp" from Slatec. "pchfe_95" and
"pchsp_95" have a safer and simpler interface.

Replaced "make" by "sxgmake" in "arch-SX8_BRODIE.fcm". Added files for
compilation by FCM with "g95".

In "arch-linux-32bit.fcm", replaced "pgf90" by "pgf95". There was no
difference between "dev" and "debug" so added "-O1" to "dev". Added
debugging options. Removed "-Wl,-Bstatic
-L/usr/lib/gcc-lib/i386-linux/2.95.2", which usually produces an error
at link-time.

Bash is now ubiquitous while KornShell? is not so use Bash instead of
KornShell? in FCM.

Replaced some statements "write(6,*)" by "write(lunout,*)". Replaced
"stop" by "stop 1" in the case where "abort_gcm" is called with "ierr
/= 0". Removed "stop" statements at the end of procedures
"limit_netcdf" and main program "ce0l" (why not let the program end
normally?).

Made some arrays automatic instead of allocatable in "start_inter_3d".

Zeroed "wake_pe", "fm_therm", "entr_therm" and "detr_therm" in
"dyn3dpar/etat0_netcdf.F90". The parallel and sequential results of
"ce0l" are thus identical.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.0 KB
RevLine 
[524]1!
[1279]2! $Id: abort_gcm.F 1425 2010-09-02 13:45:23Z aborella $
[524]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
[524]13#endif
14#include "iniprint.h"
15 
16C
17C Stops the simulation cleanly, closing files and printing various
18C comments
19C
20C  Input: modname = name of calling program
21C         message = stuff to print
22C         ierr    = severity of situation ( = 0 normal )
23
[1107]24      character(len=*) modname
[524]25      integer ierr
[1107]26      character(len=*) message
[524]27
[1425]28      write(lunout,*) 'in abort_gcm'
[524]29#ifdef CPP_IOIPSL
30      call histclo
31      call restclo
32#endif
[1147]33      call getin_dump
[524]34c     call histclo(2)
35c     call histclo(3)
36c     call histclo(4)
37c     call histclo(5)
[1425]38      write(lunout,*) 'Stopping in ', modname
39      write(lunout,*) 'Reason = ',message
[524]40      if (ierr .eq. 0) then
[1425]41        write(lunout,*) 'Everything is cool'
42        stop
[524]43      else
[1425]44        write(lunout,*) 'Houston, we have a problem ', ierr
45        stop 1
[524]46      endif
47      END
Note: See TracBrowser for help on using the repository browser.