4 |
#include "CPP_EEOPTIONS.h" |
#include "CPP_EEOPTIONS.h" |
5 |
#include "PACKAGES_CONFIG.h" |
#include "PACKAGES_CONFIG.h" |
6 |
|
|
7 |
CBOP |
CBOP |
8 |
C !ROUTINE: EEBOOT |
C !ROUTINE: EEBOOT |
9 |
|
|
10 |
C !INTERFACE: |
C !INTERFACE: |
13 |
|
|
14 |
C !DESCRIPTION: |
C !DESCRIPTION: |
15 |
C *==========================================================* |
C *==========================================================* |
16 |
C | SUBROUTINE EEBOOT |
C | SUBROUTINE EEBOOT |
17 |
C | o Set up execution "environment", particularly perform |
C | o Set up execution "environment", particularly perform |
18 |
C | steps to initialise parallel processing. |
C | steps to initialise parallel processing. |
19 |
C *==========================================================* |
C *==========================================================* |
20 |
C | Note: This routine can also be compiled with CPP |
C | Note: This routine can also be compiled with CPP |
21 |
C | directives set so that no multi-processing is initialised |
C | directives set so that no multi-processing is initialised |
22 |
C | This is OK and works fine. |
C | This is OK and works fine. |
23 |
C *==========================================================* |
C *==========================================================* |
24 |
|
|
25 |
C !CALLING SEQUENCE: |
C !CALLING SEQUENCE: |
26 |
C eeboot() |
C eeboot() |
27 |
C | |
C | |
28 |
C |-- eeboot_minimal() :: Minimal startup. Just enough to |
C |-- eeboot_minimal() :: Minimal startup. Just enough to |
29 |
C | allow basic I/O. |
C | allow basic I/O. |
30 |
C | |
C | |
31 |
C |-- eeintro_msg() :: Write startup greeting. |
C |-- eeintro_msg() :: Write startup greeting. |
38 |
C | |
C | |
39 |
C |-- ini_threading_environment() :: Associate threads with grid regions. |
C |-- ini_threading_environment() :: Associate threads with grid regions. |
40 |
C | |
C | |
41 |
C |-- dfile_init() :: Initialise simple multi-process I/O pacakge. |
C |-- cpl_register() :: Pass attributes to the coupler |
42 |
|
C | |
43 |
|
C |-- w2_eeboot() :: Initialise WRAPPER2 execution environment |
44 |
|
|
45 |
C !USES: |
C !USES: |
46 |
C == Global variables == |
C == Global variables == |
64 |
C eeBootError is a flag used to indicate an error in the |
C eeBootError is a flag used to indicate an error in the |
65 |
C "execution environment" startup pahse as opposed |
C "execution environment" startup pahse as opposed |
66 |
C to the simulation pahse of the execution. |
C to the simulation pahse of the execution. |
67 |
C eeEndError is used to indicate an "execution environment" shutdown |
C eeEndError is used to indicate an "execution environment" shutdown |
68 |
C error. |
C error. |
69 |
C thError flag used to allow a thread to report an error. |
C thError flag used to allow a thread to report an error. |
70 |
C This is only really used during the startup process, |
C This is only really used during the startup process, |
71 |
C although it could be used elsewhere. |
C although it could be used elsewhere. |
72 |
C allMyEdgesAreSharedMemory flag which says for a particular |
C allMyEdgesAreSharedMemory flag which says for a particular |
73 |
C set of blocks the only form of communication |
C set of blocks the only form of communication |
74 |
C it does is using shared memory. |
C it does is using shared memory. |
75 |
C threadIsRunning used during startup to enable check that all |
C threadIsRunning used during startup to enable check that all |
76 |
C the threads are running. |
C the threads are running. |
77 |
fatalError = .FALSE. |
fatalError = .FALSE. |
78 |
eeBootError = .FALSE. |
eeBootError = .FALSE. |
109 |
C thatis needed for error reporting. |
C thatis needed for error reporting. |
110 |
C o Under MPI I/O support is very variable until |
C o Under MPI I/O support is very variable until |
111 |
C MPI is started. This makes is hard to trap the case |
C MPI is started. This makes is hard to trap the case |
112 |
C where mpirun is used to start a non-MPI run or |
C where mpirun is used to start a non-MPI run or |
113 |
C we try to start MPI when mpirun was not used. |
C we try to start MPI when mpirun was not used. |
114 |
C after it is started. |
C after it is started. |
115 |
C jmc: test: |
C jmc: test: |
116 |
C If necessary ( COMPONENT_MODULE defined ) add a 1rst preliminary |
C If necessary ( COMPONENT_MODULE defined ) add a 1rst preliminary |
117 |
C call to eeset_params (in EEBOOT_MINIMAL) to set useCoupler (needed |
C call to eeset_params (in EEBOOT_MINIMAL) to set useCoupler (needed |
118 |
C very early, and the stardard call eeset_params below comes too late) |
C very early, and the stardard call eeset_params below comes too late) |
119 |
C jmc: This needs to be sorted-out in a cleaner way. |
C jmc: This needs to be sorted-out in a cleaner way. |
133 |
C-- Now do the rest of the multi-process startup. |
C-- Now do the rest of the multi-process startup. |
134 |
C o Here we map processes to the model grid. |
C o Here we map processes to the model grid. |
135 |
C o Print tables of process-grid mappings. |
C o Print tables of process-grid mappings. |
136 |
C o Do other miscellaneous multi-processing set up steps. For |
C o Do other miscellaneous multi-processing set up steps. For |
137 |
C example under MPI we create datatypes for communication |
C example under MPI we create datatypes for communication |
138 |
C of array edges. |
C of array edges. |
139 |
CALL INI_PROCS |
CALL INI_PROCS |
153 |
IF ( useCoupler ) CALL CPL_REGISTER |
IF ( useCoupler ) CALL CPL_REGISTER |
154 |
#endif |
#endif |
155 |
|
|
|
#ifdef USE_DFILE |
|
|
C-- Initiialise the multi-process IO package |
|
|
CALL DFILE_INIT |
|
|
#endif |
|
|
|
|
156 |
#ifdef ALLOW_EXCH2 |
#ifdef ALLOW_EXCH2 |
157 |
C-- Initialise WRAPPER2 execution environment |
C-- Initialise WRAPPER2 execution environment |
158 |
CALL W2_EEBOOT |
CALL W2_EEBOOT |
159 |
#endif /* ALLOW_EXCH2 */ |
#endif /* ALLOW_EXCH2 */ |
160 |
|
|
161 |
|
|
162 |
999 CONTINUE |
999 CONTINUE |
163 |
RETURN |
RETURN |
164 |
END |
END |