69 |
CALL PRINT_ERROR( msgBuffer , myThid) |
CALL PRINT_ERROR( msgBuffer , myThid) |
70 |
GOTO 999 |
GOTO 999 |
71 |
ENDIF |
ENDIF |
72 |
|
C-- MPI has now been initialized but now we need to either |
73 |
|
C ask for a communicator or pretend that we have: |
74 |
|
C Ask coupler interface for a communicator |
75 |
|
c call MITCOMPONENT_init( 'MITgcmUV', MPI_COMM_MODEL ) |
76 |
|
C Pretend that we have asked for a communicator |
77 |
|
MPI_COMM_MODEL = MPI_COMM_WORLD |
78 |
|
|
79 |
C-- Get my process number |
C-- Get my process number |
80 |
CALL MPI_COMM_RANK( MPI_COMM_WORLD, mpiMyId, mpiRC ) |
CALL MPI_COMM_RANK( MPI_COMM_MODEL, mpiMyId, mpiRC ) |
81 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
82 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
83 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
100 |
C-- Synchronise all processes |
C-- Synchronise all processes |
101 |
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 |
102 |
C find out about processes that did not start up. |
C find out about processes that did not start up. |
103 |
CALL MPI_BARRIER( MPI_COMM_WORLD, mpiRC ) |
CALL MPI_BARRIER( MPI_COMM_MODEL, mpiRC ) |
104 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
105 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
106 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |
111 |
ENDIF |
ENDIF |
112 |
|
|
113 |
C-- Get number of MPI processes |
C-- Get number of MPI processes |
114 |
CALL MPI_COMM_SIZE ( MPI_COMM_WORLD, mpiNProcs, mpiRC ) |
CALL MPI_COMM_SIZE ( MPI_COMM_MODEL, mpiNProcs, mpiRC ) |
115 |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
116 |
eeBootError = .TRUE. |
eeBootError = .TRUE. |
117 |
WRITE(msgBuffer,'(A,I)') |
WRITE(msgBuffer,'(A,I)') |