/[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.4 by cnh, Wed Oct 28 03:11:34 1998 UTC revision 1.7 by cnh, Sun Feb 4 14:38:42 2001 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    C $Name$
3    
4  #include "CPP_EEOPTIONS.h"  #include "CPP_EEOPTIONS.h"
5    
# Line 21  C     | Note: This routine can also be c Line 22  C     | Note: This routine can also be c
22  C     | directives set so that no multi-processing is initialise.|  C     | directives set so that no multi-processing is initialise.|
23  C     | This is OK and should work fine.                         |  C     | This is OK and should work fine.                         |
24  C     \==========================================================/  C     \==========================================================/
25          IMPLICIT NONE
26    
27  C     === Global data ===  C     === Global data ===
28  #include "SIZE.h"  #include "SIZE.h"
# Line 46  C--   Default values set to single proce Line 48  C--   Default values set to single proce
48        numberOfProcs = 1        numberOfProcs = 1
49        myProcId      = 0        myProcId      = 0
50        pidIO         = myProcId        pidIO         = myProcId
51        myProcessStr  = '??????'        myProcessStr  = '------'
52  C     Set a dummy value for myThid because we are not multi-threading  C     Set a dummy value for myThid because we are not multi-threading
53  C     yet.  C     yet.
54        myThid        = 1        myThid        = 1
# Line 63  C      forked within mpirun - now thats Line 65  C      forked within mpirun - now thats
65         CALL MPI_INIT( mpiRC )         CALL MPI_INIT( mpiRC )
66         IF ( mpiRC .NE. MPI_SUCCESS ) THEN         IF ( mpiRC .NE. MPI_SUCCESS ) THEN
67          eeBootError = .TRUE.          eeBootError = .TRUE.
68          WRITE(msgBuffer,'(A,I)')          WRITE(msgBuffer,'(A,I5)')
69       &        'S/R INI_PROCS: MPI_INIT return code',       &        'S/R INI_PROCS: MPI_INIT return code',
70       &        mpiRC       &        mpiRC
71          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
72          GOTO 999          GOTO 999
73         ENDIF         ENDIF
74    C--    MPI has now been initialized but now we need to either
75    C      ask for a communicator or pretend that we have:
76    C      Pretend that we have asked for a communicator
77           MPI_COMM_MODEL = MPI_COMM_WORLD
78    C      Ask coupler interface for a communicator
79    c hook call MITCOMPONENT_init( 'MITgcmUV', MPI_COMM_MODEL )
80    
81  C--    Get my process number  C--    Get my process number
82         CALL MPI_COMM_RANK( MPI_COMM_WORLD, mpiMyId, mpiRC )         CALL MPI_COMM_RANK( MPI_COMM_MODEL, mpiMyId, mpiRC )
83         IF ( mpiRC .NE. MPI_SUCCESS ) THEN         IF ( mpiRC .NE. MPI_SUCCESS ) THEN
84          eeBootError = .TRUE.          eeBootError = .TRUE.
85          WRITE(msgBuffer,'(A,I)')          WRITE(msgBuffer,'(A,I5)')
86       &        'S/R INI_PROCS: MPI_COMM_RANK return code',       &        'S/R INI_PROCS: MPI_COMM_RANK return code',
87       &        mpiRC       &        mpiRC
88          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
# Line 93  C--    Get my process number Line 102  C--    Get my process number
102  C--    Synchronise all processes  C--    Synchronise all processes
103  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
104  C      find out about processes that did not start up.  C      find out about processes that did not start up.
105         CALL MPI_BARRIER( MPI_COMM_WORLD, mpiRC )         CALL MPI_BARRIER( MPI_COMM_MODEL, mpiRC )
106         IF ( mpiRC .NE. MPI_SUCCESS ) THEN         IF ( mpiRC .NE. MPI_SUCCESS ) THEN
107          eeBootError = .TRUE.          eeBootError = .TRUE.
108          WRITE(msgBuffer,'(A,I)')          WRITE(msgBuffer,'(A,I5)')
109       &        'S/R INI_PROCS: MPI_BARRIER return code',       &        'S/R INI_PROCS: MPI_BARRIER return code',
110       &        mpiRC       &        mpiRC
111          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)
# Line 104  C      find out about processes that did Line 113  C      find out about processes that did
113         ENDIF         ENDIF
114    
115  C--    Get number of MPI processes  C--    Get number of MPI processes
116         CALL MPI_COMM_SIZE ( MPI_COMM_WORLD, mpiNProcs, mpiRC )         CALL MPI_COMM_SIZE ( MPI_COMM_MODEL, mpiNProcs, mpiRC )
117         IF ( mpiRC .NE. MPI_SUCCESS ) THEN         IF ( mpiRC .NE. MPI_SUCCESS ) THEN
118          eeBootError = .TRUE.          eeBootError = .TRUE.
119          WRITE(msgBuffer,'(A,I)')          WRITE(msgBuffer,'(A,I5)')
120       &        'S/R INI_PROCS: MPI_COMM_SIZE return code',       &        'S/R INI_PROCS: MPI_COMM_SIZE return code',
121       &        mpiRC       &        mpiRC
122          CALL PRINT_ERROR( msgBuffer , myThid)          CALL PRINT_ERROR( msgBuffer , myThid)

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22