1 |
C $Header: /u/gcmpack/MITgcm/pkg/atm2d/initialise.F,v 1.2 2007/10/08 23:48:28 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "ATM2D_OPTIONS.h" |
5 |
#ifdef ATM2D_MPI_ON |
6 |
|
7 |
CStartOfInterface |
8 |
SUBROUTINE INITIALISE |
9 |
C /==========================================================\ |
10 |
C | SUBROUTINE INITIALISE | |
11 |
C | o Routine to initialise coupling component. | |
12 |
C |==========================================================| |
13 |
C | Initialisation involves starting up MPI and then joining | |
14 |
C | the coupled configuration as a component with the special| |
15 |
C | name "Coupler". With the present MIT Coupler library | |
16 |
C | only one process can register with the name "Coupler". | |
17 |
C | This component is the process responsible for | |
18 |
C | coordinating the transfer of data between other | |
19 |
C | components and for mapping data from one components | |
20 |
C | representation to anothers representation as appropriate.| |
21 |
C \==========================================================/ |
22 |
IMPLICIT NONE |
23 |
C === GLobal variables == |
24 |
#include "CPLIDS.h" |
25 |
|
26 |
CEndOfInterface |
27 |
|
28 |
C === Local variables === |
29 |
C iErr - Error code |
30 |
C MPI_COMM_Coupler - Communicatior used by this component. |
31 |
C Stored internally by the coupling library. |
32 |
C msgUnit :: log-file I/O unit |
33 |
INTEGER iErr |
34 |
INTEGER MPI_COMM_Coupler |
35 |
INTEGER msgUnit |
36 |
|
37 |
CALL MPI_Init(iErr) |
38 |
|
39 |
C-- Set the running directory (= rank_0 ) |
40 |
CALL SETDIR( 0 ) |
41 |
|
42 |
C Register this process as the "coupler" participant. Currently there can |
43 |
C only be one coupler participant all others are "component" participants. |
44 |
CALL MITCOUPLER_INIT( |
45 |
I cplCompName, |
46 |
O MPI_COMM_Coupler, msgUnit ) |
47 |
|
48 |
CALL MITCOUPLER_INIT( cplCompName, MPI_COMM_Coupler ) |
49 |
|
50 |
RETURN |
51 |
END |
52 |
#endif |