/[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.11 - (show annotations) (download)
Sun Mar 24 02:07:14 2002 UTC (22 years, 1 month ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint51k_post, checkpoint47e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, checkpoint50c_post, checkpoint46f_post, checkpoint52d_pre, checkpoint48e_post, checkpoint50c_pre, checkpoint46b_post, checkpoint51o_pre, checkpoint51l_post, checkpoint48i_post, checkpoint46l_pre, checkpoint51, checkpoint50, checkpoint52, checkpoint50d_post, checkpoint50b_pre, checkpoint51f_post, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint51t_post, checkpoint51n_post, checkpoint51s_post, checkpoint47a_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, checkpoint51n_pre, checkpoint47d_post, checkpoint46d_pre, checkpoint48d_post, checkpoint48f_post, checkpoint45d_post, checkpoint52b_pre, checkpoint46j_pre, checkpoint51l_pre, checkpoint48h_post, checkpoint51q_post, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint52b_post, checkpoint52c_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46k_post, checkpoint48a_post, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint47j_post, branch-exfmods-tag, branchpoint-genmake2, checkpoint46e_pre, checkpoint51r_post, checkpoint48c_post, checkpoint45b_post, checkpoint46b_pre, checkpoint51i_post, checkpoint51b_post, checkpoint51c_post, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50g_post, checkpoint45c_post, checkpoint44h_post, checkpoint46g_post, checkpoint52a_pre, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint46c_post, branch-netcdf, checkpoint50d_pre, checkpoint46e_post, checkpoint51e_post, checkpoint47, checkpoint45, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint51o_post, checkpoint51f_pre, checkpoint48g_post, checkpoint47h_post, checkpoint52a_post, checkpoint51g_post, ecco_c52_e35, checkpoint46d_post, checkpoint50b_post, checkpoint51m_post, checkpoint51a_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-exfmods-curt, branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.10: +9 -7 lines
Changed errorMessageUnit from 0 to 15
(o not allowed on some platforms, e.g. IBM SP3)

1 C $Header: /u/gcmpack/MITgcm/eesupp/src/eeboot.F,v 1.10 2001/09/21 03:54:34 cnh Exp $
2 C $Name: $
3
4 #include "CPP_EEOPTIONS.h"
5
6 CBOP
7 C !ROUTINE: EEBOOT
8
9 C !INTERFACE:
10 SUBROUTINE EEBOOT
11 IMPLICIT NONE
12
13 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 C == Global variables ==
44 #include "SIZE.h"
45 #include "EEPARAMS.h"
46 #include "EESUPPORT.h"
47
48 C !LOCAL VARIABLES:
49 C == Local variables ==
50 C I :: Loop counter
51 INTEGER I
52 CEOP
53
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 eeBootError = .FALSE.
76 eeEndError = .FALSE.
77 DO I=1, MAX_NO_THREADS
78 thError(I) = .FALSE.
79 allMyEdgesAreSharedMemory(I) = .TRUE.
80 threadIsRunning(I) = .FALSE.
81 threadIsComplete(I) = .FALSE.
82 ioErrorCount(I) = 0
83 ENDDO
84 standardMessageUnit = 6
85 scrUnit1 = 11
86 scrUnit2 = 12
87 eeDataUnit = 13
88 modelDataUnit = 14
89 errorMessageUnit = 15
90 cph errorMessageUnit = 0 is not allowed on some platforms, e.g. SP3
91 C
92 C Annoyingly there is no universal way to have the usingMPI
93 C parameter work as one might expect. This is because, on some
94 C systems I/O does not work until MPI_Init has been called. The
95 C solution for now is that the parameter below may need to be changed
96 C manually!
97 #ifdef ALLOW_USE_MPI
98 usingMPI = .TRUE.
99 #endif
100
101 C-- Start minimal environment so that we can do I/O
102 C-- to report errors.
103 C Notes
104 C =====
105 C o Here we start MPI and setup the I/O environment
106 C thatis needed for error reporting.
107 C o Under MPI I/O support is very variable until
108 C MPI is started. This makes is hard to trap the case
109 C where mpirun is used to start a non-MPI run or
110 C we try to start MPI when mpirun was not used.
111 C after it is started.
112 CALL EEBOOT_MINIMAL
113 IF ( eeBootError ) GOTO 999
114
115 C-- Now we can write a startup message
116 CALL EEINTRO_MSG
117
118 C-- Initialise parameters associated with execution environment.
119 CALL EESET_PARMS
120 IF ( eeBootError ) GOTO 999
121
122 C-- Write summary of execution environment configuration for this run
123 CALL EEWRITE_EEENV
124
125 C-- Now do the rest of the multi-process startup.
126 C o Here we map processes to the model grid.
127 C o Print tables of process-grid mappings.
128 C o Do other miscellaneous multi-processing set up steps. For
129 C example under MPI we create datatypes for communication
130 C of array edges.
131 CALL INI_PROCS
132 #ifdef LETS_MAKE_JAM
133 CALL INI_JAM
134 #endif
135 IF ( eeBootError ) GOTO 999
136
137 C-- Initialise variables to support "nThreads" of computation.
138 C o Note the program is still running with a single thread of
139 C execution at this stage.
140 CALL INI_THREADING_ENVIRONMENT
141 IF ( eeBootError ) GOTO 999
142
143 #ifdef USE_DFILE
144 C-- Initiialise the multi-process IO package
145 CALL DFILE_INIT
146 #endif
147
148 999 CONTINUE
149 RETURN
150 END

  ViewVC Help
Powered by ViewVC 1.1.22