| 1 |
C $Header: /u/gcmpack/MITgcm/eesupp/inc/EEIO.h,v 1.5 2001/09/21 03:54:35 cnh Exp $ |
| 2 |
C $Name: $ |
| 3 |
|
| 4 |
CBOP |
| 5 |
C !ROUTINE: EEBUFF_SCPU.h |
| 6 |
C !INTERFACE: |
| 7 |
C include "EEBUFF_SCPU.h" |
| 8 |
C |
| 9 |
C !DESCRIPTION: |
| 10 |
C *==========================================================* |
| 11 |
C | EEBUFF_SCPU.h |
| 12 |
C | o Buffers used by S/R gather_2d and scatter_2d, |
| 13 |
C | in mapping 2-D local array from all processes to/from |
| 14 |
C | 2-D Global (X,Y) array from Master-Proc (SingleCPU) |
| 15 |
C | o Contain both 2-D Global (X,Y) buffers and |
| 16 |
C | Shared Local Buffer (for multi-threaded). |
| 17 |
C *==========================================================* |
| 18 |
C | presently used with: |
| 19 |
C | - SingleCpu IO |
| 20 |
C | - global-sum SingleCpu |
| 21 |
C *==========================================================* |
| 22 |
CEOP |
| 23 |
|
| 24 |
INTEGER xyBuffer_size |
| 25 |
#ifdef ALLOW_EXCH2 |
| 26 |
PARAMETER ( xyBuffer_size = W2_ioBufferSize ) |
| 27 |
#else /* ALLOW_EXCH2 */ |
| 28 |
PARAMETER ( xyBuffer_size = Nx*Ny ) |
| 29 |
#endif /* ALLOW_EXCH2 */ |
| 30 |
|
| 31 |
C-- COMMON /EE_BUFFERS_GLOBAL/ 2-D Global Buffers |
| 32 |
C Those buffers are in common block to save some memory |
| 33 |
C xy_buffer_r8 :: 2-D global Real*8 buffer. |
| 34 |
C xy_buffer_r4 :: 2-D global Real*4 buffer. |
| 35 |
COMMON /EE_BUFFERS_GLOBAL/ xy_buffer_r8, xy_buffer_r4 |
| 36 |
Real*8 xy_buffer_r8(xyBuffer_size) |
| 37 |
Real*4 xy_buffer_r4(xyBuffer_size) |
| 38 |
|
| 39 |
C-- COMMON /EE_BUFFERS_LOCAL/ 2-D Shared Local Buffers |
| 40 |
C Those buffers have be in common block to be shared by all threads |
| 41 |
C sharedLocBuf_rx :: Heap storage buffer to which master thread copies |
| 42 |
C data (during read) as part of a scatter/gather and |
| 43 |
C from which all threads read data (during read). |
| 44 |
COMMON /EE_BUFFERS_LOCAL/ sharedLocBuf_r8, sharedLocBuf_r4 |
| 45 |
Real*8 sharedLocBuf_r8(1:sNx,1:sNy,nSx,nSy) |
| 46 |
Real*4 sharedLocBuf_r4(1:sNx,1:sNy,nSx,nSy) |
| 47 |
|
| 48 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |