1 |
C $Header: /u/gcmpack/MITgcm_contrib/llc_hires/llc_90/code-async-noseaice/asyncio_driver_config.F,v 1.1 2017/10/09 02:02:49 dimitri Exp $ |
2 |
|
3 |
#include "PACKAGES_CONFIG.h" |
4 |
|
5 |
|
6 |
#include "CPP_EEOPTIONS.h" |
7 |
#include "W2_OPTIONS.h" |
8 |
|
9 |
SUBROUTINE ASYNCIO_DRIVER_CONFIG( myThid ) |
10 |
|
11 |
IMPLICIT NONE |
12 |
#include "SIZE.h" |
13 |
#include "EEPARAMS.h" |
14 |
#include "EESUPPORT.h" |
15 |
#include "W2_EXCH2_SIZE.h" |
16 |
#include "W2_EXCH2_PARAMS.h" |
17 |
#include "W2_EXCH2_TOPOLOGY.h" |
18 |
INTEGER myThid |
19 |
|
20 |
INTEGER bi, bj |
21 |
|
22 |
INTEGER ASYNCIO_NXG, ASYNCIO_NYG |
23 |
INTEGER ASYNCIO_TXGLO, ASYNCIO_TYGLO |
24 |
INTEGER tN, IEND, tF, i |
25 |
|
26 |
C Call ASYNCIO setup |
27 |
ASYNCIO_NXG = NX |
28 |
ASYNCIO_NYG = NY |
29 |
#ifdef ALLOW_EXCH2 |
30 |
ASYNCIO_NXG = exch2_global_Nx |
31 |
ASYNCIO_NYG = exch2_global_Ny |
32 |
#endif /* ALLOW_EXCH2 */ |
33 |
|
34 |
chenze assuming exch2 |
35 |
|
36 |
c CALL MYASYNCIO_SET_GLOBAL_SIZES( ASYNCIO_NXG, ASYNCIO_NYG, NR ) |
37 |
|
38 |
chenze have all compute ranks call & sort out bcast in recvTask |
39 |
|
40 |
! Now that the C code can include SIZE.h directly, we don't |
41 |
! have to do this any more |
42 |
! CALL MYASYNCIO_SET_GLOBAL_SIZES( exch2_global_Nx, exch2_global_Ny, |
43 |
! $ Nr, exch2_nTiles, nPx, sNx, sNy, OLx, OLy ) |
44 |
|
45 |
|
46 |
CALL ASYNCIO_TILE_ARRAYS(exch2_txGlobalo, exch2_tyGlobalo, |
47 |
$ exch2_mydNx) |
48 |
|
49 |
|
50 |
c write(*,*) 'BRON ',exch2_nTiles |
51 |
c do i=1,exch2_nTiles |
52 |
c write(*,*) 'BRON ',exch2_myFace(i),exch2_mydNx(i), |
53 |
c $ exch2_mydNy(i),exch2_tNx(i),exch2_tNy(i) |
54 |
c enddo |
55 |
|
56 |
DO bj=myByLo(myThid),myByHi(myThid) |
57 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
58 |
ASYNCIO_TXGLO = myXGlobalLo - 1 + (bi-1)*sNx |
59 |
ASYNCIO_TYGLO = myYGlobalLo - 1 + (bj-1)*sNy |
60 |
tN = tileNo(bi,bj) ! which one of these do we want to use? |
61 |
tF = W2_myTileList(bi,bj) ! no requirement of ordinality anymore |
62 |
! needs to agree with # used in f3() |
63 |
|
64 |
c do iend=1,351 |
65 |
c write(*,*) 'HENZE ',iend,exch2_myFace(iend), |
66 |
c $ exch2_tBasex(iend),exch2_tBasey(iend), |
67 |
c $ exch2_txGlobalo(iend),exch2_tyGlobalo(iend) |
68 |
c enddo |
69 |
|
70 |
|
71 |
#ifdef ALLOW_EXCH2 |
72 |
tN = W2_myTileList(bi,bj) |
73 |
ASYNCIO_TXGLO = exch2_txGlobalo( tN ) |
74 |
ASYNCIO_TYGLO = exch2_tyGlobalo( tN ) |
75 |
|
76 |
c write(*,*) 'rank ',mpimyid,' sending tile ',tN |
77 |
c |
78 |
c if (mpimyid.eq.0) then |
79 |
c write(*,*) exch2_global_Nx,exch2_global_Ny, Nr |
80 |
c write(*,*) exch2_nTiles, nPx, sNx, sNy |
81 |
c do i=1,exch2_nTiles |
82 |
c write(*,*) i,exch2_txGlobalo(i),exch2_tyGlobalo(i), |
83 |
c $ exch2_mydNx(i), |
84 |
c $ exch2_global_Nx*(exch2_tyGlobalo(i)-1)+exch2_txGlobalo(i) - 1 |
85 |
c enddo |
86 |
c endif |
87 |
|
88 |
|
89 |
|
90 |
#endif /* ALLOW_EXCH2 */ |
91 |
|
92 |
|
93 |
CALL ASYNCIO_REGISTER_TILE( ASYNCIO_TXGLO, ASYNCIO_TYGLO, TN ) ! evidently a no-op now |
94 |
ch PRINT *, ' REGISTERING TILE ', TF |
95 |
CALL ASYNCIO_BRON_F_F2(TF) |
96 |
ENDDO |
97 |
ENDDO |
98 |
IEND=-1 |
99 |
CALL ASYNCIO_BRON_F_F2(IEND) |
100 |
|
101 |
CALL ASYNCIO_REGISTER_FIELD_CODE( 'U' ) ! no-op now |
102 |
CALL ASYNCIO_REGISTER_FIELD_CODE( 'V' ) ! ... |
103 |
CALL ASYNCIO_REGISTER_FIELD_CODE( 'W' ) |
104 |
CALL ASYNCIO_REGISTER_FIELD_CODE( 'T' ) |
105 |
CALL ASYNCIO_REGISTER_FIELD_CODE( 'S' ) |
106 |
CALL ASYNCIO_REGISTER_FIELD_CODE( 'ETA' ) |
107 |
|
108 |
RETURN |
109 |
END |
110 |
|