/[MITgcm]/MITgcm/eesupp/src/exch_uv_xy_rx.template
ViewVC logotype

Annotation of /MITgcm/eesupp/src/exch_uv_xy_rx.template

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.2.3 - (hide annotations) (download)
Thu Apr 12 10:52:48 2001 UTC (24 years, 3 months ago) by cnh
Branch: pre38
CVS Tags: pre38tag1, pre38-close
Changes since 1.1.2.2: +1 -3 lines
Changes to restore/introduce true shared memory (i.e. pure SMP model) support
for lat-lon, cartesian and cube.

 o Threads support restored for global_sum, global_max.
   Needed COMMON blocks in place of stack variables
   for work space.

 o COMMON added for temps that are exchanged
   shap_filt, solve_for_pressure

 o exch...template edits to allow multithreaded calling
   of cube exchanges. Cube exchanges are done single threaded,
   sequential at the moment and are hard coded for six-tile,
   one tile per face configuration.

 o Threading support only tested on Sun SMP (6500) system.

 o Default is SYSTEM() exists (check_threads.F), and barrier and memsync
   are used for threaded exchanges (ini_communications_patterns).

 o Killed K-level plot (ini_masks_etc.F). Overlaps not set in
   multi-threads (local array), so fails in plot_field().

 o Fixed t-ave of phihyd ( DYNAMICS() ). Can only do it for
   first tile.

 o Added commented out nTx settings to hs94.cs-32x32x5 eedata.
   #nTx=2
   #nTx=3
   #nTx=6
   Need to activate for setenv PARALLEL

 o Multi-threaded pickup is 100% validated.

Testing notes

 o Code passes "testscript" tests.

 o To get "hs94.cs-32x32x5" to run OK need to patch
   dynamics.F. Patch is in hs94.cs-32x32x5/code/dynamics.patch.

 o Multithreading only tested on Sun 6500 SMP for hs94.cs and
   hs94.128. hs94.128 was OK at c37 but has a problem under multi-threading
   at pre38 at the moment.

 o Under Solaris need one of
   setenv PARALLEL 2
   setenv PARALLEL 3
   setenv PARALLEL 6
   setenv PARALLEL 8  ( hs94.128 only )
    - and -
   setenv STACKSIZE 16384


 o Under Solaris f77 need to remove -u from Makefile FOPTS for compiling
   fftpack.o. Need to declare everything in fftpack or have
   custom compile options for fftpack.F to fix this.

1 cnh 1.1.2.3 C $Header: /u/gcmpack/models/MITgcmUV/eesupp/src/Attic/exch_uv_xy_rx.template,v 1.1.2.2 2001/04/10 00:58:17 jmc Exp $
2 jmc 1.1.2.2 C $Name: $
3 adcroft 1.1.2.1
4     #include "CPP_EEOPTIONS.h"
5    
6     SUBROUTINE EXCH_UV_XY_RX(
7     U Uphi, Vphi, withSigns,
8     I myThid )
9     C /==========================================================\
10     C | SUBROUTINE EXCH_UV_XY_RX |
11     C | o Handle exchanges for _RX, two-dimensional arrays. |
12     C |==========================================================|
13     C | Do true shared-memory data transfers and "messaging" |
14     C | tranfers for blocking case of data transfers. |
15     C | Applications call this routine using |
16     C | CALL EXCH..( x, myThid ) |
17     C | where x is a two-dimensional array with overlaps. |
18     C | This routine does true-shared-memory copies for blocks |
19     C | within a thread. It will also do MPI meesaging between |
20     C | different processes. |
21     C | Note: |
22     C | ===== |
23     C | This routine is a default mode interface to the more |
24     C | general exchange routine. Under default mode the |
25     C | exchange is for an edge width of OLx, and OLy and |
26     C | updates corner points as well as edges ( slightly more |
27     C | synchronisation required). |
28     C \==========================================================/
29     IMPLICIT NONE
30    
31     C === Global data ===
32     #include "SIZE.h"
33     #include "EEPARAMS.h"
34     #include "EESUPPORT.h"
35    
36     C === Routine arguments ===
37     C phi - Array with overlap regions are to be exchanged
38     C Note - The interface to EXCH_RL assumes that
39     C the standard Fortran 77 sequence association rules
40     C apply.
41     C myThid - My thread id.
42     _RX Uphi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
43     _RX Vphi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
44     LOGICAL withSigns
45     INTEGER myThid
46     CEndOfInterface
47    
48     C == Local variables ==
49     C OL[wens] - Overlap extents in west, east, north, south.
50     C exchWidth[XY] - Extent of regions that will be exchanged.
51     INTEGER OLw, OLe, OLn, OLs, exchWidthX, exchWidthY, myNz
52    
53     OLw = OLx
54     OLe = OLx
55     OLn = OLy
56     OLs = OLy
57     exchWidthX = OLx
58     exchWidthY = OLy
59     myNz = 1
60     C ** NOTE ** The exchange routine we use here does not
61     C require the preceeding and following barriers.
62     C However, the slow, simple exchange interface
63     C that is calling it here is meant to ensure
64     C that threads are synchronised before exchanges
65     C begine.
66     IF (useCubedSphereExchange) THEN
67     CALL EXCH_UV_RX_CUBE( Uphi, Vphi, withSigns,
68     I OLw, OLe, OLs, OLn, myNz,
69     I exchWidthX, exchWidthY,
70     I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
71     ELSE
72 jmc 1.1.2.2 c CALL EXCH_RX( Uphi,
73     c I OLw, OLe, OLs, OLn, myNz,
74     c I exchWidthX, exchWidthY,
75     c I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
76     c CALL EXCH_RX( Vphi,
77     c I OLw, OLe, OLs, OLn, myNz,
78     c I exchWidthX, exchWidthY,
79     c I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
80     c_jmc: for JAM compatibility, replace the 2 CALLs above by the 2 CPP_MACROs:
81     _EXCH_XY_RX( Uphi, myThid )
82     _EXCH_XY_RX( Vphi, myThid )
83 adcroft 1.1.2.1 ENDIF
84    
85     RETURN
86     END

  ViewVC Help
Powered by ViewVC 1.1.22