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

Annotation of /MITgcm/eesupp/src/eeboot.F

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


Revision 1.10 - (hide annotations) (download)
Fri Sep 21 03:54:34 2001 UTC (22 years, 8 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint44e_post, checkpoint44f_post, checkpoint43a-release1mods, chkpt44d_post, checkpoint44e_pre, release1_b1, checkpoint43, release1_chkpt44d_post, release1-branch_tutorials, chkpt44a_post, checkpoint44h_pre, chkpt44c_pre, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, checkpoint44g_post, release1-branch-end, checkpoint44b_post, chkpt44a_pre, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint44, chkpt44c_post, checkpoint44f_pre, release1-branch_branchpoint
Branch point for: release1_final, release1-branch, release1, ecco-branch, release1_coupled
Changes since 1.9: +39 -14 lines
Starting to bring comments up to date and format comments
for document extraction of "prototypes".

1 cnh 1.10 C $Header: /u/gcmpack/models/MITgcmUV/eesupp/src/eeboot.F,v 1.9 2001/02/04 14:38:42 cnh Exp $
2     C $Name: $
3 cnh 1.1
4     #include "CPP_EEOPTIONS.h"
5    
6 cnh 1.10 CBOP
7     C !ROUTINE: EEBOOT
8    
9     C !INTERFACE:
10 cnh 1.1 SUBROUTINE EEBOOT
11 adcroft 1.5 IMPLICIT NONE
12 cnh 1.1
13 cnh 1.10 C !DESCRIPTION:
14     C *==========================================================*
15     C | SUBROUTINE EEBOOT
16     C | o Set up execution "environment", particularly perform
17     C | steps to initialise parallel processing.
18     C *==========================================================*
19     C | Note: This routine can also be compiled with CPP
20     C | directives set so that no multi-processing is initialised
21     C | This is OK and works fine.
22     C *==========================================================*
23    
24     C !CALLING SEQUENCE:
25     C eeboot()
26     C |
27     C |-- eeboot_minimal() :: Minimal startup. Just enough to
28     C | allow basic I/O.
29     C |
30     C |-- eeintro_msg() :: Write startup greeting.
31     C |
32     C |-- eeset_parms() :: Set WRAPPER parameters
33     C |
34     C |-- eewrite_eeenv() :: Print WRAPPER parameter settings
35     C |
36     C |-- ini_procs() :: Associate processes with grid regions.
37     C |
38     C |-- ini_threading_environment() :: Associate threads with grid regions.
39     C |
40     C |-- dfile_init() :: Initialise simple multi-process I/O pacakge.
41    
42     C !USES:
43 cnh 1.1 C == Global variables ==
44     #include "SIZE.h"
45     #include "EEPARAMS.h"
46     #include "EESUPPORT.h"
47    
48 cnh 1.10 C !LOCAL VARIABLES:
49 cnh 1.1 C == Local variables ==
50 cnh 1.10 C I :: Loop counter
51 cnh 1.1 INTEGER I
52 cnh 1.10 CEOP
53 cnh 1.1
54     C-- Set error reporting flags and I/O streams
55     C fatalError is a flag used to indicate that the program
56     C ended abnormally.
57     C errorMessageUnit is the Fortran unit number used for
58     C writing error messages.
59     C standardMessageUnit is the Fortran unit number used for
60     C writing textual, informational output.
61     C eeBootError is a flag used to indicate an error in the
62     C "execution environment" startup pahse as opposed
63     C to the simulation pahse of the execution.
64     C eeEndError is used to indicate an "execution environment" shutdown
65     C error.
66     C thError flag used to allow a thread to report an error.
67     C This is only really used during the startup process,
68     C although it could be used elsewhere.
69     C allMyEdgesAreSharedMemory flag which says for a particular
70     C set of blocks the only form of communication
71     C it does is using shared memory.
72     C threadIsRunning used during startup to enable check that all
73     C the threads are running.
74     fatalError = .FALSE.
75     errorMessageUnit = 0
76     standardMessageUnit = 6
77     eeBootError = .FALSE.
78     eeEndError = .FALSE.
79     DO I=1, MAX_NO_THREADS
80     thError(I) = .FALSE.
81     allMyEdgesAreSharedMemory(I) = .TRUE.
82     threadIsRunning(I) = .FALSE.
83     threadIsComplete(I) = .FALSE.
84 cnh 1.4 ioErrorCount(I) = 0
85 cnh 1.1 ENDDO
86     scrUnit1 = 11
87     scrUnit2 = 12
88     eeDataUnit = 13
89     modelDataUnit = 14
90     C Annoyingly there is no universal way to have the usingMPI
91     C parameter work as one might expect. This is because, on some
92     C systems I/O does not work until MPI_Init has been called. The
93     C solution for now is that the parameter below may need to be changed
94     C manually!
95     #ifdef ALLOW_USE_MPI
96     usingMPI = .TRUE.
97     #endif
98    
99     C-- Start minimal environment so that we can do I/O
100     C-- to report errors.
101     C Notes
102     C =====
103     C o Here we start MPI and setup the I/O environment
104     C thatis needed for error reporting.
105     C o Under MPI I/O support is very variable until
106     C MPI is started. This makes is hard to trap the case
107     C where mpirun is used to start a non-MPI run or
108     C we try to start MPI when mpirun was not used.
109     C after it is started.
110     CALL EEBOOT_MINIMAL
111     IF ( eeBootError ) GOTO 999
112    
113     C-- Now we can write a startup message
114     CALL EEINTRO_MSG
115    
116     C-- Initialise parameters associated with execution environment.
117     CALL EESET_PARMS
118     IF ( eeBootError ) GOTO 999
119    
120     C-- Write summary of execution environment configuration for this run
121     CALL EEWRITE_EEENV
122    
123     C-- Now do the rest of the multi-process startup.
124     C o Here we map processes to the model grid.
125     C o Print tables of process-grid mappings.
126     C o Do other miscellaneous multi-processing set up steps. For
127     C example under MPI we create datatypes for communication
128     C of array edges.
129     CALL INI_PROCS
130 adcroft 1.6 #ifdef LETS_MAKE_JAM
131     CALL INI_JAM
132     #endif
133 cnh 1.1 IF ( eeBootError ) GOTO 999
134    
135     C-- Initialise variables to support "nThreads" of computation.
136     C o Note the program is still running with a single thread of
137     C execution at this stage.
138     CALL INI_THREADING_ENVIRONMENT
139     IF ( eeBootError ) GOTO 999
140 cnh 1.4
141 adcroft 1.7 #ifdef USE_DFILE
142 cnh 1.4 C-- Initiialise the multi-process IO package
143     CALL DFILE_INIT
144 adcroft 1.7 #endif
145 cnh 1.1
146     999 CONTINUE
147     RETURN
148     END

  ViewVC Help
Powered by ViewVC 1.1.22