/[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.5 - (hide annotations) (download)
Tue May 18 17:39:21 1999 UTC (24 years, 11 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint22, checkpoint23, checkpoint24
Changes since 1.4: +2 -1 lines
Added IMPLICIT NONE where missing and changed formatting from 'I' to 'I5'.

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

  ViewVC Help
Powered by ViewVC 1.1.22