/[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.9 by heimbach, Fri Mar 7 05:13:49 2003 UTC revision 1.12 by jmc, Tue Jan 27 15:59:23 2004 UTC
# Line 38  C     == Global data == Line 38  C     == Global data ==
38  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
39  C     == Local variables ==  C     == Local variables ==
40  C     myThid           :: Temp. dummy thread number.  C     myThid           :: Temp. dummy thread number.
41    C     fNam             :: Used to build name of file for standard
42    C                         output and error output.
43        INTEGER myThid            INTEGER myThid    
44          CHARACTER*13 fNam
45  #ifdef ALLOW_USE_MPI  #ifdef ALLOW_USE_MPI
46  C     mpiRC            :: Error code reporting variable used  C     mpiRC            :: Error code reporting variable used
47  C                         with MPI.  C                         with MPI.
 C     fNam             :: Used to build name of file for standard  
 C                         output and error output.  
48  C     msgBuffer        :: Used to build messages for printing.  C     msgBuffer        :: Used to build messages for printing.
49        CHARACTER*(MAX_LEN_MBUF) msgBuffer        CHARACTER*(MAX_LEN_MBUF) msgBuffer
50        INTEGER mpiRC        INTEGER mpiRC
51        CHARACTER*13 fNam        INTEGER nptmp
52  #endif /* ALLOW_USE_MPI */  #endif /* ALLOW_USE_MPI */
53  CEOP  CEOP
54    
# Line 78  C      forked within mpirun - now thats Line 79  C      forked within mpirun - now thats
79          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
80          GOTO 999          GOTO 999
81         ENDIF         ENDIF
82    
83  C--    MPI has now been initialized but now we need to either  C--    MPI has now been initialized but now we need to either
84  C      ask for a communicator or pretend that we have:  C      ask for a communicator or pretend that we have:
85  C      Pretend that we have asked for a communicator  C      Pretend that we have asked for a communicator
86         MPI_COMM_MODEL = MPI_COMM_WORLD         MPI_COMM_MODEL = MPI_COMM_WORLD
87  C      Ask coupler interface for a communicator  #ifdef COMPONENT_MODULE
88  c hook call MITCOMPONENT_init( 'MITgcmUV', MPI_COMM_MODEL )  C- jmc: test:
89    C      add a 1rst preliminary call EESET_PARAMS to set useCoupler
90    C      (needed to decide either to call CPL_INIT or not)
91           CALL EESET_PARMS
92           IF ( eeBootError ) GOTO 999
93    C- jmc: test end ; otherwise, uncomment next line:
94    c      useCoupler = .TRUE.
95    C--    Ask coupler interface for a communicator
96           IF ( useCoupler) CALL CPL_INIT
97    #endif
98    
99  C--    Get my process number  C--    Get my process number
100         CALL MPI_COMM_RANK( MPI_COMM_MODEL, mpiMyId, mpiRC )         CALL MPI_COMM_RANK( MPI_COMM_MODEL, mpiMyId, mpiRC )
# Line 145  C      Strictly we are allowed more proc Line 156  C      Strictly we are allowed more proc
156  C      is an exact match makes things easier.  C      is an exact match makes things easier.
157         IF ( numberOfProcs .NE. nPx*nPy ) THEN         IF ( numberOfProcs .NE. nPx*nPy ) THEN
158          eeBootError = .TRUE.          eeBootError = .TRUE.
159          WRITE(msgBuffer,'(A,2(X,I))')          nptmp = nPx*nPy
160            WRITE(msgBuffer,'(A,2I5)')
161       &  'S/R INI_PROCS: No. of processes not equal to nPx*nPy',       &  'S/R INI_PROCS: No. of processes not equal to nPx*nPy',
162       &  numberOfProcs, nPx*nPy       &  numberOfProcs, nptmp
163          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
164          GOTO 999          GOTO 999
165         ENDIF         ENDIF
# Line 155  C      is an exact match makes things ea Line 167  C      is an exact match makes things ea
167  #ifndef ALWAYS_USE_MPI  #ifndef ALWAYS_USE_MPI
168        ENDIF        ENDIF
169  #endif  #endif
170    
171    #else /* ALLOW_USE_MPI */
172    
173            WRITE(myProcessStr,'(I4.4)') myProcId
174            WRITE(fNam,'(A,A)') 'STDERR.', myProcessStr(1:4)
175            OPEN(errorMessageUnit,FILE=fNam,STATUS='unknown')
176    c       WRITE(fNam,'(A,A)') 'STDOUT.', myProcessStr(1:4)
177    c       OPEN(standardMessageUnit,FILE=fNam,STATUS='unknown')
178    
179  #endif /* ALLOW_USE_MPI */  #endif /* ALLOW_USE_MPI */
180    
181   999  CONTINUE   999  CONTINUE

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

  ViewVC Help
Powered by ViewVC 1.1.22