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" |
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 are not 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 |
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) |
72 |
ENDIF |
ENDIF |
73 |
C-- MPI has now been initialized but now we need to either |
C-- MPI has now been initialized but now we need to either |
74 |
C ask for a communicator or pretend that we have: |
C ask for a communicator or pretend that we have: |
|
C Ask coupler interface for a communicator |
|
|
c call MITCOMPONENT_init( 'MITgcmUV', MPI_COMM_MODEL ) |
|
75 |
C Pretend that we have asked for a communicator |
C Pretend that we have asked for a communicator |
76 |
MPI_COMM_MODEL = MPI_COMM_WORLD |
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_MODEL, 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) |
104 |
CALL MPI_BARRIER( MPI_COMM_MODEL, 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) |
115 |
CALL MPI_COMM_SIZE ( MPI_COMM_MODEL, 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) |