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

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

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


Revision 1.17 - (show annotations) (download)
Thu Oct 14 13:44:54 2004 UTC (19 years, 7 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57g_pre, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint59, checkpoint58, checkpoint57, checkpoint56, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint62a, checkpoint58y_post, checkpoint58t_post, checkpoint55i_post, checkpoint58m_post, checkpoint57l_post, checkpoint57t_post, checkpoint57v_post, checkpoint57f_post, checkpoint60, checkpoint61, checkpoint62, checkpoint57a_post, checkpoint57h_pre, checkpoint58w_post, checkpoint57h_post, checkpoint57y_pre, checkpoint58o_post, checkpoint57c_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint55h_post, checkpoint58n_post, checkpoint57e_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint58k_post, checkpoint58v_post, checkpoint56a_post, checkpoint58l_post, checkpoint57h_done, checkpoint57j_post, checkpoint57f_pre, checkpoint61f, checkpoint58g_post, checkpoint58x_post, checkpoint61n, checkpoint59j, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint57a_pre, checkpoint57o_post, checkpoint61q, checkpoint57k_post, checkpoint57w_post, checkpoint61e, checkpoint58i_post, checkpoint57x_post, checkpoint58c_post, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.16: +1 -6 lines
 o do package initialization earlier in the boot-up sequence
   - make MNC follow the package guidelines

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

  ViewVC Help
Powered by ViewVC 1.1.22