Changes between Version 2 and Version 3 of Ticket #552
- Timestamp:
- 05/13/12 02:11:09 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #552 – Description
v2 v3 1 This update includes a full revision of ROMS shared-memory pragma directives using '''OpenMP''' standard. This is a very important and delicate update that requires expertise. Luckly, I doubth that will affect you customized code.1 This update includes a full revision of ROMS shared-memory pragma directives using '''OpenMP''' standard. This is a very important and delicate update that requires expertise. Luckly, I doubth that will affect your customized code. 2 2 3 3 All the parallel loops of ROMS are modified to simpler directives. For example, the old strategy: … … 19 19 !$OMP BARRIER 20 20 }}} 21 In shared-memory, the parallel threads are spawn at higher calling routines. For example, we now have:21 In shared-memory, the parallel threads are spawn in the higher calling routines (drivers). For example, we now have: 22 22 {{{ 23 23 !$OMP PARALLEL 24 24 CALL main3d (RunInterval) 25 #endif26 25 !$OMP END PARALLEL 27 26 }}} 28 This directive is less restrictive and allows '''MASTER''', '''BARRIER''', and other useful '''OpenMP''' pragmas inside the parallel region . If you are interested, please see the following discussion in the [https://www.myroms.org/forum/viewtopic.php?f=19&t=2584 Forum].27 This directive is less restrictive and allows '''MASTER''', '''BARRIER''', and other useful '''OpenMP''' pragmas inside the parallel regions. If you are interested, please see the following discussion in the [https://www.myroms.org/forum/viewtopic.php?f=19&t=2584 Forum]. 29 28 30 29 This change cleans the code and facilitates parallelization of tricky algorithms for nesting, '''MPDATA''', random number generation, point-sources, etc using the shared-memory paradigm. … … 32 31 '''WARNINGS:''' 33 32 34 * The values of '''NtileX(ng)''' and '''NtileE(ng)''' are no longer equal to '''one''' in distributed-memory ('''MPI'''). They have the same values as the one specified in standard input '''NtileI(ng)''' and '''NtileJ(ng)'''. Notice that in the critical regions for global reduction operatios we now use instead the following code:33 * The values of '''NtileX(ng)''' and '''NtileE(ng)''' are no longer equal to '''one''' in distributed-memory ('''MPI'''). They have the same values as the ones specified in standard input: '''NtileI(ng)''' and '''NtileJ(ng)'''. Notice that in the critical regions for global reduction operations, we now use the following code instead: 35 34 {{{ 36 35 #ifdef DISTRIBUTE … … 45 44 #endif 46 45 }}} 47 That is, we do a special exception for distribute-memory . This change is necessary in your customized versions of '''ana_grid.h''' and '''ana_psource.h'''.46 That is, we do a special exception for distribute-memory cases. This change is necessary in your customized versions of '''ana_grid.h''' and '''ana_psource.h'''. 48 47 49 * Notice that we no longer use '''TILE''' (uppercase) as argument to the kernel routines. We use '''tile''' (lowercase) instead. This was important in previous versions for distributed-memory since '''TILE''' was replaced to'''!MyRank''' during C-preprocessing. Be careful with this one...48 * Notice that we no longer use the '''TILE''' (uppercase) as argument to the kernel routines. We use '''tile''' (lowercase) instead. This was important in previous versions of distributed-memory code where '''TILE''' was replaced with '''!MyRank''' during C-preprocessing. Be careful with this one... 50 49 51 50 * Notice that few important variables of ROMS in '''mod_scalars.F''' and '''mod_stepping.F''' use the '''THREADPRIVATE''' directive in shared-memory so all the parallel threads have a private copy of such variables to avoid parallel collisions.