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

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

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

revision 1.6 by adcroft, Tue May 18 17:39:21 1999 UTC revision 1.10 by heimbach, Mon May 12 19:45:17 2003 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    C $Name$
3    
4  #include "CPP_EEOPTIONS.h"  #include "CPP_EEOPTIONS.h"
5    
6  CStartOfInterface  CBOP
7    C     !ROUTINE: EEBOOT_MINIMAL
8    
9    C     !INTERFACE:
10        SUBROUTINE EEBOOT_MINIMAL        SUBROUTINE EEBOOT_MINIMAL
 C     /==========================================================\  
 C     | SUBROUTINE EEBOOT_MINIMAL                                |  
 C     | o Set an initial environment that is predictable i.e.    |  
 C     | behaves in a similar way on all machines and stable.     |  
 C     |==========================================================|  
 C     | Under MPI this routine calls MPI_INIT to setup the       |  
 C     | mpi environment ( on some systems the code is running as |  
 C     | a single process prior to MPI_INIT, on others the mpirun |  
 C     | script has already created multiple processes). Until    |  
 C     | MPI_Init is called it is unclear what state the          |  
 C     | application is in. Once this routine has been run it is  |  
 C     | "safe" to do things like I/O to report erros and to get  |  
 C     | run parameters.                                          |  
 C     | Note: This routine can also be compiled with CPP         |  
 C     | directives set so that no multi-processing is initialise.|  
 C     | This is OK and should work fine.                         |  
 C     \==========================================================/  
11        IMPLICIT NONE        IMPLICIT NONE
12    
13  C     === Global data ===  C     !DESCRIPTION:
14    C     *==========================================================*
15    C     | SUBROUTINE EEBOOT_MINIMAL                                
16    C     | o Set an initial environment that is predictable i.e.    
17    C     | behaves in a similar way on all machines and stable.      
18    C     *==========================================================*
19    C     | Under MPI this routine calls MPI_INIT to setup the        
20    C     | mpi environment ( on some systems the code is running as  
21    C     | a single process prior to MPI_INIT, on others the mpirun  
22    C     | script has already created multiple processes). Until    
23    C     | MPI_Init is called it is unclear what state the          
24    C     | application is in. Once this routine has been run it is  
25    C     | "safe" to do things like I/O to report erros and to get  
26    C     | run parameters.                                          
27    C     | Note: This routine can also be compiled with CPP          
28    C     | directives set so that no multi-processing is initialise.
29    C     | This is OK and will work fine.                          
30    C     *==========================================================*
31    
32    C     !USES:
33    C     == Global data ==
34  #include "SIZE.h"  #include "SIZE.h"
35  #include "EEPARAMS.h"  #include "EEPARAMS.h"
36  #include "EESUPPORT.h"  #include "EESUPPORT.h"
37    
38  CEndOfInterface  C     !LOCAL VARIABLES:
39    C     == Local variables ==
40  C     === Local variables ===  C     myThid           :: Temp. dummy thread number.
41        INTEGER myThid            INTEGER myThid    
42  #ifdef ALLOW_USE_MPI  #ifdef ALLOW_USE_MPI
43  C     mpiRC            - Error code reporting variable used  C     mpiRC            :: Error code reporting variable used
44  C                        with MPI.  C                         with MPI.
45  C     fNam             - Used to build name of file for standard  C     fNam             :: Used to build name of file for standard
46  C                        output and error output.  C                         output and error output.
47  C     msgBuffer        - Used to build messages for printing.  C     msgBuffer        :: Used to build messages for printing.
48        CHARACTER*(MAX_LEN_MBUF) msgBuffer        CHARACTER*(MAX_LEN_MBUF) msgBuffer
49        INTEGER mpiRC        INTEGER mpiRC
50        CHARACTER*13 fNam        CHARACTER*13 fNam
51          INTEGER nptmp
52  #endif /* ALLOW_USE_MPI */  #endif /* ALLOW_USE_MPI */
53    CEOP
54    
55  C--   Default values set to single processor case  C--   Default values set to single processor case
56        numberOfProcs = 1        numberOfProcs = 1
# Line 137  C      Strictly we are allowed more proc Line 146  C      Strictly we are allowed more proc
146  C      is an exact match makes things easier.  C      is an exact match makes things easier.
147         IF ( numberOfProcs .NE. nPx*nPy ) THEN         IF ( numberOfProcs .NE. nPx*nPy ) THEN
148          eeBootError = .TRUE.          eeBootError = .TRUE.
149          WRITE(msgBuffer,'(A)')          nptmp = nPx*nPy
150       &  'S/R INI_PROCS: No. of processes not equal to nPx*nPy'          WRITE(msgBuffer,'(A,2I5)')
151         &  'S/R INI_PROCS: No. of processes not equal to nPx*nPy',
152         &  numberOfProcs, nptmp
153          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
154          GOTO 999          GOTO 999
155         ENDIF         ENDIF

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.22