/[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.9 - (show annotations) (download)
Sun Feb 4 14:38:42 2001 UTC (23 years, 2 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint38, checkpoint40pre2, checkpoint40pre4, pre38tag1, c37_adj, pre38-close, checkpoint39, checkpoint37, checkpoint36, checkpoint35, checkpoint40pre5, checkpoint40
Branch point for: pre38
Changes since 1.8: +2 -1 lines
Made sure each .F and .h file had
the CVS keywords Header and Name at its start.
Most had header but very few currently have Name, so
lots of changes!

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

  ViewVC Help
Powered by ViewVC 1.1.22