/[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.3 by cnh, Thu Apr 23 20:56:54 1998 UTC revision 1.6 by adcroft, Tue May 18 17:39:21 1999 UTC
# Line 21  C     | Note: This routine can also be c Line 21  C     | Note: This routine can also be c
21  C     | directives set so that no multi-processing is initialise.|  C     | directives set so that no multi-processing is initialise.|
22  C     | This is OK and should work fine.                         |  C     | This is OK and should work fine.                         |
23  C     \==========================================================/  C     \==========================================================/
24          IMPLICIT NONE
25    
26  C     === Global data ===  C     === Global data ===
27  #include "SIZE.h"  #include "SIZE.h"
# Line 46  C--   Default values set to single proce Line 47  C--   Default values set to single proce
47        numberOfProcs = 1        numberOfProcs = 1
48        myProcId      = 0        myProcId      = 0
49        pidIO         = myProcId        pidIO         = myProcId
50        myProcessStr  = '??????'        myProcessStr  = '------'
51  C     Set a dummy value for myThid because we aren't multi-threading  C     Set a dummy value for myThid because we are not multi-threading
52  C     yet.  C     yet.
53        myThid        = 1        myThid        = 1
54  #ifdef ALLOW_USE_MPI  #ifdef ALLOW_USE_MPI
# Line 63  C      forked within mpirun - now thats Line 64  C      forked within mpirun - now thats
64         CALL MPI_INIT( mpiRC )         CALL MPI_INIT( mpiRC )
65         IF ( mpiRC .NE. MPI_SUCCESS ) THEN         IF ( mpiRC .NE. MPI_SUCCESS ) THEN
66          eeBootError = .TRUE.          eeBootError = .TRUE.
67          WRITE(msgBuffer,'(A,I)')          WRITE(msgBuffer,'(A,I5)')
68       &        'S/R INI_PROCS: MPI_INIT return code',       &        'S/R INI_PROCS: MPI_INIT return code',
69       &        mpiRC       &        mpiRC
70          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
71          GOTO 999          GOTO 999
72         ENDIF         ENDIF
73    C--    MPI has now been initialized but now we need to either
74    C      ask for a communicator or pretend that we have:
75    C      Pretend that we have asked for a communicator
76           MPI_COMM_MODEL = MPI_COMM_WORLD
77    C      Ask coupler interface for a communicator
78    c hook call MITCOMPONENT_init( 'MITgcmUV', MPI_COMM_MODEL )
79    
80  C--    Get my process number  C--    Get my process number
81         CALL MPI_COMM_RANK( MPI_COMM_WORLD, mpiMyId, mpiRC )         CALL MPI_COMM_RANK( MPI_COMM_MODEL, mpiMyId, mpiRC )
82         IF ( mpiRC .NE. MPI_SUCCESS ) THEN         IF ( mpiRC .NE. MPI_SUCCESS ) THEN
83          eeBootError = .TRUE.          eeBootError = .TRUE.
84          WRITE(msgBuffer,'(A,I)')          WRITE(msgBuffer,'(A,I5)')
85       &        'S/R INI_PROCS: MPI_COMM_RANK return code',       &        'S/R INI_PROCS: MPI_COMM_RANK return code',
86       &        mpiRC       &        mpiRC
87          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
# Line 92  C--    Get my process number Line 100  C--    Get my process number
100    
101  C--    Synchronise all processes  C--    Synchronise all processes
102  C      Strictly this is superfluous, but by using it we can guarantee to  C      Strictly this is superfluous, but by using it we can guarantee to
103  C      find out about processes that didn't start up.  C      find out about processes that did not start up.
104         CALL MPI_BARRIER( MPI_COMM_WORLD, mpiRC )         CALL MPI_BARRIER( MPI_COMM_MODEL, mpiRC )
105         IF ( mpiRC .NE. MPI_SUCCESS ) THEN         IF ( mpiRC .NE. MPI_SUCCESS ) THEN
106          eeBootError = .TRUE.          eeBootError = .TRUE.
107          WRITE(msgBuffer,'(A,I)')          WRITE(msgBuffer,'(A,I5)')
108       &        'S/R INI_PROCS: MPI_BARRIER return code',       &        'S/R INI_PROCS: MPI_BARRIER return code',
109       &        mpiRC       &        mpiRC
110          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
# Line 104  C      find out about processes that did Line 112  C      find out about processes that did
112         ENDIF         ENDIF
113    
114  C--    Get number of MPI processes  C--    Get number of MPI processes
115         CALL MPI_COMM_SIZE ( MPI_COMM_WORLD, mpiNProcs, mpiRC )         CALL MPI_COMM_SIZE ( MPI_COMM_MODEL, mpiNProcs, mpiRC )
116         IF ( mpiRC .NE. MPI_SUCCESS ) THEN         IF ( mpiRC .NE. MPI_SUCCESS ) THEN
117          eeBootError = .TRUE.          eeBootError = .TRUE.
118          WRITE(msgBuffer,'(A,I)')          WRITE(msgBuffer,'(A,I5)')
119       &        'S/R INI_PROCS: MPI_COMM_SIZE return code',       &        'S/R INI_PROCS: MPI_COMM_SIZE return code',
120       &        mpiRC       &        mpiRC
121          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
# Line 115  C--    Get number of MPI processes Line 123  C--    Get number of MPI processes
123         ENDIF         ENDIF
124         numberOfProcs = mpiNProcs         numberOfProcs = mpiNProcs
125    
126  C--    Can't have more processes than compile time MAX_NO_PROCS  C--    Can not have more processes than compile time MAX_NO_PROCS
127         IF ( numberOfProcs .GT. MAX_NO_PROCS ) THEN         IF ( numberOfProcs .GT. MAX_NO_PROCS ) THEN
128          eeBootError = .TRUE.          eeBootError = .TRUE.
129          WRITE(msgBuffer,'(A)')          WRITE(msgBuffer,'(A)')

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

  ViewVC Help
Powered by ViewVC 1.1.22