|
||||
File indexing completed on 2024-08-29 05:10:33 UTC
view on githubraw file Latest commit 5237154b on 2024-08-28 14:56:27 UTC4c563c2ee9 Chri*0001 CBOP 0002 C !ROUTINE: GLOBAL_SUM.h 0003 C !INTERFACE: 0004 C include "GLOBAL_SUM.h" 0005 C !DESCRIPTION: 0006 C *==========================================================* 8d7d23bda2 Jean*0007 C | GLOBAL\_SUM.h 0008 C | o Globals used by Fortran global sum routine. 4c563c2ee9 Chri*0009 C *==========================================================* aea29c8517 Alis*0010 C | The global sum shared memory scheme uses global heap data| 0011 C | structures (.i.e COMMON blocks ). Each thread writes to | 0012 C | an its own element of the shared memory array and then | 0013 C | one thread reads all the entries and sums them. The sum | 0014 C | result is then read by all threads. | 0015 C | Remember - you are working with regions of memory that | 0016 C | are being updated concurrently by different threads. | 0017 C | What happens, when it happens and who gets to see what | 0018 C | happens at what stage depends on the computer systems | 0019 C | memory model. Every computer has a different memory model| 0020 C | and they are never simple. In all current platforms it is| 0021 C | possible for one thread to see events happening in a | 0022 C | different order from the order they are written in the | 0023 C | code. | 0024 C | Unless you understand this it is not a good idea to | 0025 C | make modifications te way these header files are setup or| 0026 C | the way the global sum routines work. | 4c563c2ee9 Chri*0027 C *==========================================================* 0028 CEOP aea29c8517 Alis*0029 07ef6829ed Jean*0030 COMMON / GSUM_COMMON_R8 / phiGSR8, shareBufGSR8 0031 Real*8 phiGSR8 (lShare8, 0:MAX_NO_THREADS ) 4d45770d13 Jean*0032 Real*8 shareBufGSR8 ( nSx, nSy ) f8adb8fd4b Ed H*0033 07ef6829ed Jean*0034 COMMON / GSUM_COMMON_R4 / phiGSR4 0035 Real*4 phiGSR4 (lShare4, 0:MAX_NO_THREADS ) f8adb8fd4b Ed H*0036 8d7d23bda2 Jean*0037 COMMON / GSUM_COMMON_I / phiGSI 07ef6829ed Jean*0038 INTEGER phiGSI (lShare4, 0:MAX_NO_THREADS ) f8adb8fd4b Ed H*0039 5237154b93 Jean*0040 COMMON / GLBSUM_VECTOR_RL / shareBufGSVec, shareGSVector 0041 Real*8 shareBufGSVec( nSx, nSy, GSVec_size ) 0042 Real*8 shareGSVector( GSVec_size ) 0043 0044 COMMON / GLBSUM_VECTOR_I / shareBufGSVecI, shareGSVectInt 0045 INTEGER shareBufGSVecI( nSx, nSy, GSVec_size ) 0046 INTEGER shareGSVectInt( GSVec_size ) 0047 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated from https://github.com/MITgcm/MITgcm by the 2.2.1-MITgcm-0.1 LXR engine. The LXR team |