1 |
C $Header: /u/gcmpack/MITgcm/eesupp/inc/GLOBAL_MAX.h,v 1.4 2004/03/27 03:51:50 edhill Exp $ |
2 |
C $Name: $ |
3 |
CBOP |
4 |
C !ROUTINE: GLOBAL_MAX.h |
5 |
C !INTERFACE: |
6 |
C include "GLOBAL_MAX.h" |
7 |
C !DESCRIPTION: |
8 |
C *==========================================================* |
9 |
C | GLOBAL\_MAX.h |
10 |
C | o Globals used by Fortran global max routine. |
11 |
C *==========================================================* |
12 |
C | The global max shared memory scheme uses global heap data |
13 |
C | structures (.i.e COMMON blocks ). Each thread writes to |
14 |
C | an its own element of the shared memory array and then |
15 |
C | one thread reads all the entries and maxs them. The max |
16 |
C | result is then read by all threads. |
17 |
C | Remember - you are working with regions of memory that |
18 |
C | are being updated concurrently by different threads. |
19 |
C | What happens, when it happens and who gets to see what |
20 |
C | happens at what stage depends on the computer systems |
21 |
C | memory model. Every computer has a different memory model |
22 |
C | and they are never simple. In all current platforms it is |
23 |
C | possible for one thread to see events happening in a |
24 |
C | different order from the order they are written in the |
25 |
C | code. |
26 |
C | Unless you understand this it is not a good idea to |
27 |
C | make modifications te way these header files are setup or |
28 |
C | the way the global max routines work. |
29 |
C *==========================================================* |
30 |
CEOP |
31 |
COMMON / GMAX_COMMON_R8 / phiGMR8 |
32 |
Real*8 phiGMR8(lShare8, 0:MAX_NO_THREADS ) |
33 |
|
34 |
COMMON / GMAX_COMMON_R4 / phiGMR4 |
35 |
Real*4 phiGMR4(lShare4, 0:MAX_NO_THREADS ) |
36 |
|
37 |
COMMON / GMAX_COMMON_I / phiGMI |
38 |
INTEGER phiGMI (lShare4, 0:MAX_NO_THREADS ) |