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