/[MITgcm]/MITgcm/eesupp/src/main.F
ViewVC logotype

Diff of /MITgcm/eesupp/src/main.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7 by cnh, Sun Feb 4 14:38:43 2001 UTC revision 1.8 by cnh, Fri Sep 21 03:54:35 2001 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    CBOI
5    C
6    C !TITLE: WRAPPER CODE SYNOPSIS
7    C !AUTHORS: mitgcm developers ( support@mitgcm.org )
8    C !AFFILIATION: Massachussetts Institute of Technology
9    C !DATE:
10    C !INTRODUCTION: eesupp/ subdirectory
11    C Routines in the subdirectories under eesupp/ ( src/ and inc/ ) provide the core
12    C framework within which numerical and ancilliary software of MITgcm operates.
13    C The eesupp/ directories provide a collection of software we call {\bf WRAPPER} (
14    C ({\bf W}rappable {\bf A}pplication {\bf P}aralell {\bf P}rogramming {\bf E}nvironment {\bf R}esource).
15    C The {bf WRAPPER} provides a generic bootstrapping capability to start applications
16    C in a manner that allows them to exploit single and multi-processing environments on all present
17    C day hardware platforms (spanning vector SMP systems to distributed memory and processing cluster
18    C systems). Numerical applications must be coded to fit within the {\bf WRAPPER}. This entails
19    C applications adopting a particular style for declaring data structures representing
20    C grids and values on grids. The {\bf WRAPPER} currently provides support for grid point
21    C models using a single global indexing system. This is sufficient for latitude-logitude,
22    C cylindrical, and cartesian coordinate configurations. There is also limited support for
23    C composing grids in which no single, sructured global index can be defined. At present, this
24    C support is limited to specific configurations of projections of a cube onto the sphere.
25    C
26    C The main functions supported by the current {\bf WRAPPER} code are
27    C \begin{itemize}
28    C  \item program startup and termination including creation/management of multiple
29    C        threads and/or processes
30    C  \item communication and synchronisatioin operations between multiple processes and/or threads
31    C  \item multi-process input and output operations to disk and to other
32    C  applications
33    C \end{itemize}
34    C
35    C Multi-process execution assumes the existence of MPI for process startup and termination. However,
36    C MPI does not have to be used for performance critical operations. Instead,
37    C {\bf WRAPPER} performance critical parallel primitives are implemented to allow them to bind to
38    C different low-level system software layers. Bindings exist for using {\bf WRAPPER} with portable
39    C systems such as MPI and UNIX System V IPC memory mapping, as well bindings for high-performance
40    C propreitary systems such as Myrinet GM software and Compaq IMC memory channel technology.
41    C
42    CEOI
43    
44    
45  C--   Get C preprocessor options  C--   Get C preprocessor options
46  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
47  #include "CPP_EEOPTIONS.h"  #include "CPP_EEOPTIONS.h"
48    
49    CBOP
50    C !ROUTINE: MAIN
51    
52    C !INTERFACE:
53        PROGRAM MAIN        PROGRAM MAIN
 C     /==========================================================\  
 C     | PROGRAM MAIN                                             |  
 C     | o MAIN wrapper for MITgcm UV implementation.             |  
 C     |==========================================================|  
 C     | MAIN controls the "execution environment".               |  
 C     | Its main functions are                                   |  
 C     | 1. call procedure EEBOOT to perform execution environment|  
 C     |    initialisation.                                       |  
 C     | 2. call procedure THE_MODEL_MAIN once for each concurrent|  
 C     |    thread. THE_MODEL_MAIN is the user supplied top-level |  
 C     |    routine.                                              |  
 C     | 3. call procedure EEDIE to perform execution environment |  
 C     |    shutdown.                                             |  
 C     \==========================================================/  
54        IMPLICIT NONE        IMPLICIT NONE
55    
56    C !DESCRIPTION:
57    C     *==========================================================*
58    C     | PROGRAM MAIN                                            
59    C     | o MAIN wrapper for MITgcm UV implementation.            
60    C     *==========================================================*
61    C     | MAIN controls the "execution environment".              
62    C     | Its main functions are                                  
63    C     | 1. call procedure EEBOOT to perform execution environment
64    C     |    initialisation.                                      
65    C     | 2. call procedure THE_MODEL_MAIN once for each concurrent
66    C     |    thread. THE_MODEL_MAIN is the user supplied top-level
67    C     |    routine.                                              
68    C     | 3. call procedure EEDIE to perform execution environment
69    C     |    shutdown.                                            
70    C     *==========================================================*
71    
72    C      !CALLING SEQUENCE:
73    C
74    C      main()      
75    C      |
76    C      |--eeboot()         :: WRAPPER initilization
77    C      |
78    C      |--check_threads()  :: Validate multiple thread start up.
79    C      |
80    C      |--the_model_main() :: Numerical code top-level driver routine
81    C      |
82    C      |--eedie()          :: WRAPPER termination
83    
84    C     !USES:
85  C     == Global variables ==  C     == Global variables ==
86  C     Include all the "shared" data here. That means all common  C     Include all the "shared" data here. That means all common
87  C     blocks used in the model. On many implementations this is not  C     blocks used in the model. On many implementations this is not
# Line 31  C     necessary but doing this is the sa Line 91  C     necessary but doing this is the sa
91  #include "EESUPPORT.h"  #include "EESUPPORT.h"
92  #include "THE_MODEL_COMMON_BLOCKS.h"  #include "THE_MODEL_COMMON_BLOCKS.h"
93    
94    C     !LOCAL VARIABLES:
95  C--   Local variables  C--   Local variables
96        INTEGER myThid        INTEGER myThid
97        INTEGER I        INTEGER I
98    CEOP
99    
100  C--   Set up the execution environment  C--   Set up the execution environment
101  C     EEBOOT loads a execution environment parameter file  C     EEBOOT loads a execution environment parameter file

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22