/[MITgcm]/MITgcm/pkg/exch2/w2_eeboot.F
ViewVC logotype

Contents of /MITgcm/pkg/exch2/w2_eeboot.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.15 - (show annotations) (download)
Tue Sep 4 00:44:30 2012 UTC (11 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63s, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.14: +8 -125 lines
- make new S/R W2_MAP_PROCS out of w2_eeboot.F to setup exch2 CommonFlag
  and tiles to process mapping.
- move seting of e2FillValue_RX from w2_eeboot.F to w2_readparms.F

1 C $Header: /u/gcmpack/MITgcm/pkg/exch2/w2_eeboot.F,v 1.14 2011/07/09 21:52:34 jmc Exp $
2 C $Name: $
3
4 #include "CPP_EEOPTIONS.h"
5
6 CBOP
7 C !ROUTINE: W2_EEBOOT
8
9 C !INTERFACE:
10 SUBROUTINE W2_EEBOOT
11
12 C !DESCRIPTION:
13 C *==========================================================*
14 C | SUBROUTINE W2_EEBOOT
15 C | o Setup execution "environment" for WRAPPER2
16 C *==========================================================*
17 C | WRAPPER2 provides complex topology support. In this routine
18 C | we setup the base topology for the default halo operations.
19 C *==========================================================*
20
21 C !USES:
22 IMPLICIT NONE
23
24 #include "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "W2_EXCH2_SIZE.h"
27 #include "W2_EXCH2_TOPOLOGY.h"
28 #include "W2_EXCH2_PARAMS.h"
29 CEOP
30
31 C !FUNCTIONS:
32 INTEGER ILNBLNK
33 EXTERNAL ILNBLNK
34
35 C !LOCAL VARIABLES:
36 CHARACTER*(MAX_LEN_MBUF) msgBuf
37 CHARACTER*(MAX_LEN_FNAM) fName
38 INTEGER stdUnit, iLen
39 INTEGER myThid
40 INTEGER ii, I, J
41
42 C Set dummy myThid value (we are not multi-threaded here)
43 myThid = 1
44
45 C Initialise to zero EXCH2_TOPOLOGY common blocks
46 exch2_nTiles = 0
47 DO I = 1,W2_maxNbTiles
48 exch2_tNx(I) = 0
49 exch2_tNy(I) = 0
50 exch2_tBasex(I) = 0
51 exch2_tBasey(I) = 0
52 exch2_txGlobalo(I) = 0
53 exch2_tyGlobalo(I) = 0
54 exch2_isWedge(I) = 0
55 exch2_isNedge(I) = 0
56 exch2_isEedge(I) = 0
57 exch2_isSedge(I) = 0
58 exch2_myFace(I) = 0
59 exch2_mydNx(I) = 0
60 exch2_mydNy(I) = 0
61 exch2_nNeighbours(I) = 0
62 DO J = 1,W2_maxNeighbours
63 exch2_neighbourId(J,I) = 0
64 exch2_opposingSend(J,I) = 0
65 DO ii = 1,4
66 exch2_pij(ii,J,I) = 0
67 ENDDO
68 exch2_oi(J,I) = 0
69 exch2_oj(J,I) = 0
70 exch2_iLo(J,I) = 0
71 exch2_iHi(J,I) = 0
72 exch2_jLo(J,I) = 0
73 exch2_jHi(J,I) = 0
74 ENDDO
75 ENDDO
76 W2_oUnit = standardMessageUnit
77
78 C Set W2-EXCH2 parameters
79 CALL W2_READPARMS( myThid )
80
81 stdUnit = standardMessageUnit
82 WRITE(msgBuf,'(A)') '===== Start setting W2 TOPOLOGY:'
83 CALL PRINT_MESSAGE( msgBuf, stdUnit, SQUEEZE_RIGHT, myThid )
84
85 C Open message output-file (if needed)
86 IF ( W2_printMsg .LT. 0 ) THEN
87 WRITE(fName,'(A,I4.4,A)')
88 & 'w2_tile_topology.',myProcId,'.log'
89 iLen = ILNBLNK(fName)
90 CALL MDSFINDUNIT( W2_oUnit, myThid )
91 OPEN( W2_oUnit, file=fName(1:iLen),
92 & status='unknown', form='formatted')
93 WRITE(msgBuf,'(2A)') ' write to log-file: ', fName(1:iLen)
94 CALL PRINT_MESSAGE( msgBuf, stdUnit, SQUEEZE_RIGHT, myThid )
95 ENDIF
96
97 C Define topology for every tile
98 CALL W2_E2SETUP( myThid )
99
100 C-- Decide which tiles this process handles;
101 C fill also W2_procTileList for Single-CPU-IO and check also tile-size;
102 C print tiles connection for this process and set myCommonFlag :
103 CALL W2_MAP_PROCS( myThid )
104
105 C Print out the topology communication schedule
106 IF ( W2_printMsg .NE. 0 ) THEN
107 CALL W2_PRINT_COMM_SEQUENCE( myThid )
108 ENDIF
109
110 C Close message output-file (if needed)
111 IF ( W2_oUnit.NE.standardMessageUnit ) THEN
112 WRITE(msgBuf,'(A)') '=== End TOPOLOGY report ==='
113 CALL PRINT_MESSAGE( msgBuf, W2_oUnit, SQUEEZE_BOTH, myThid )
114 CLOSE( W2_oUnit )
115 ENDIF
116 WRITE(msgBuf,'(A)') '===== setting W2 TOPOLOGY: Done'
117 CALL PRINT_MESSAGE( msgBuf, stdUnit, SQUEEZE_RIGHT, myThid )
118 WRITE(msgBuf,'(A)') ' '
119 CALL PRINT_MESSAGE( msgBuf, stdUnit, SQUEEZE_RIGHT, myThid )
120
121 RETURN
122 END

  ViewVC Help
Powered by ViewVC 1.1.22