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

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

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

revision 1.1 by cnh, Wed Apr 22 19:15:30 1998 UTC revision 1.12 by jmc, Mon Dec 15 02:02:38 2003 UTC
# Line 1  Line 1 
1  C $Id$  C $Header$
2    C $Name$
3    
4  #include "CPP_EEOPTIONS.h"  #include "CPP_EEOPTIONS.h"
5    
6  CStartOfInterface  CBOP            
7    C     !ROUTINE: EEBOOT
8    
9    C     !INTERFACE:
10        SUBROUTINE EEBOOT        SUBROUTINE EEBOOT
11  C     /==========================================================\        IMPLICIT NONE
12  C     | SUBROUTINE EEBOOT                                        |  
13  C     | o Set up execution "environment", particularly perform   |  C     !DESCRIPTION:
14  C     |   steps to initialise parallel processing.               |  C     *==========================================================*
15  C     |==========================================================|  C     | SUBROUTINE EEBOOT                                        
16  C     | Note: This routine can also be compiled with CPP         |  C     | o Set up execution "environment", particularly perform    
17  C     | directives set so that no multi-processing is initialised|  C     |   steps to initialise parallel processing.                
18  C     | This is OK and should work fine.                         |  C     *==========================================================*
19  C     \==========================================================/  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 ==  C     == Global variables ==
44  #include "SIZE.h"  #include "SIZE.h"
45  #include "EEPARAMS.h"  #include "EEPARAMS.h"
46  #include "EESUPPORT.h"  #include "EESUPPORT.h"
 CEndOfInterface  
47    
48    C     !LOCAL VARIABLES:
49  C     == Local variables ==  C     == Local variables ==
50  C     msgBuf - Variable for building informational messages  C     I :: Loop counter
 C     I - Loop counter  
51        INTEGER I        INTEGER I
52        CHARACTER*(MAX_LEN_MBUF) msgBuf  CEOP
53    
54  C--   Set error reporting flags and I/O streams  C--   Set error reporting flags and I/O streams
55  C     fatalError is a flag used to indicate that the program  C     fatalError is a flag used to indicate that the program
# Line 47  C                               it does Line 72  C                               it does
72  C     threadIsRunning used during startup to enable check that all  C     threadIsRunning used during startup to enable check that all
73  C                     the threads are running.  C                     the threads are running.
74        fatalError          = .FALSE.        fatalError          = .FALSE.
       errorMessageUnit    = 0  
       standardMessageUnit = 6  
75        eeBootError         = .FALSE.        eeBootError         = .FALSE.
76        eeEndError          = .FALSE.        eeEndError          = .FALSE.
77        DO I=1, MAX_NO_THREADS        DO I=1, MAX_NO_THREADS
# Line 56  C                     the threads are ru Line 79  C                     the threads are ru
79         allMyEdgesAreSharedMemory(I) = .TRUE.         allMyEdgesAreSharedMemory(I) = .TRUE.
80         threadIsRunning(I)           = .FALSE.         threadIsRunning(I)           = .FALSE.
81         threadIsComplete(I)          = .FALSE.         threadIsComplete(I)          = .FALSE.
82           ioErrorCount(I)              = 0
83        ENDDO        ENDDO
84        scrUnit1      = 11        standardMessageUnit = 6
85        scrUnit2      = 12        scrUnit1            = 11
86        eeDataUnit    = 13        scrUnit2            = 12
87        modelDataUnit = 14        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  C     Annoyingly there is no universal way to have the usingMPI
93  C     parameter work as one might expect. This is because, on some  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  C     systems I/O does not work until MPI_Init has been called. The
# Line 81  C       MPI is started. This makes is ha Line 109  C       MPI is started. This makes is ha
109  C       where mpirun is used to start a non-MPI run or  C       where mpirun is used to start a non-MPI run or
110  C       we try to start MPI when mpirun was not used.  C       we try to start MPI when mpirun was not used.
111  C       after it is started.  C       after it is started.
112    C jmc: test:    
113    C     If necessary ( COMPONENT_MODULE defined ) add a 1rst preliminary
114    C     call to eeset_params (in EEBOOT_MINIMAL) to set useCoupler (needed
115    C     very early, and the stardard call eeset_params below comes too late)
116    C jmc: This needs to be sorted-out in a cleaner way.
117        CALL EEBOOT_MINIMAL        CALL EEBOOT_MINIMAL
118        IF ( eeBootError ) GOTO 999        IF ( eeBootError ) GOTO 999
119    
# Line 101  C     o Do other miscellaneous multi-pro Line 134  C     o Do other miscellaneous multi-pro
134  C       example under MPI we create datatypes for communication  C       example under MPI we create datatypes for communication
135  C       of array edges.  C       of array edges.
136        CALL INI_PROCS        CALL INI_PROCS
137    #ifdef LETS_MAKE_JAM
138          CALL INI_JAM
139    #endif
140        IF ( eeBootError ) GOTO 999        IF ( eeBootError ) GOTO 999
141    
142  C--   Initialise variables to support "nThreads" of computation.  C--   Initialise variables to support "nThreads" of computation.
# Line 108  C     o Note the program is still runnin Line 144  C     o Note the program is still runnin
144  C       execution at this stage.  C       execution at this stage.
145        CALL INI_THREADING_ENVIRONMENT        CALL INI_THREADING_ENVIRONMENT
146        IF ( eeBootError ) GOTO 999        IF ( eeBootError ) GOTO 999
147    
148    C--   Pass attributes to the coupler
149    #ifdef COMPONENT_MODULE
150          IF ( useCoupler ) CALL CPL_REGISTER
151    #endif
152    
153    #ifdef USE_DFILE
154    C--   Initiialise the multi-process IO package
155          CALL DFILE_INIT
156    #endif
157    
158    999 CONTINUE    999 CONTINUE
159        RETURN        RETURN
160        END        END
 C $Id$  

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22