/[MITgcm]/MITgcm/eesupp/inc/BARRIER.h
ViewVC logotype

Contents of /MITgcm/eesupp/inc/BARRIER.h

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


Revision 1.7 - (show annotations) (download)
Tue Nov 8 15:53:41 2005 UTC (18 years, 5 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint58b_post, checkpoint57y_post, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint58d_post, checkpoint62s, checkpoint58a_post, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint57z_post, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58t_post, checkpoint58m_post, checkpoint63g, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint58w_post, checkpoint57y_pre, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint58r_post, checkpoint58n_post, checkpoint65o, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint58k_post, checkpoint62b, checkpoint58v_post, checkpoint64y, checkpoint64x, checkpoint58l_post, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint61f, checkpoint58g_post, checkpoint58x_post, checkpoint61n, checkpoint59j, checkpoint58h_post, checkpoint58j_post, checkpoint61q, checkpoint61e, checkpoint58i_post, checkpoint57x_post, checkpoint58c_post, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y, HEAD
Changes since 1.6: +3 -2 lines
File MIME type: text/plain
Changes toward getting exf working multi-threaded.
  o added some opitonal consistency check in barrier for
    trapping barrier calls in singel threaded region
  o removed a single thread block in ini_depths - singleCpuIO
    still broken.
  o modified parts of exf_ that were setting local stack variables
    in single threaded section and then referencing them from all
    threads.
  o commented out strange stop in mdsio for multithreading which
    seems uneeded.
  o fixed ptracers initialization and changed ptracers monitor
    to avoid race condition in which several threads set a shared
    logical flag at arbitrary moments with respect to each other

1 C $Header: /u/gcmpack/MITgcm/eesupp/inc/BARRIER.h,v 1.6 2005/11/07 18:16:07 cnh Exp $
2 C $Name: $
3 CBOP
4 C !ROUTINE: BARRIER.h
5 C !INTERFACE:
6 C include "BARRIER.h"
7 C !DESCRIPTION:
8 C *==========================================================*
9 C | BARRIER.h
10 C | o Globals used by Fortran barrier routine.
11 C *==========================================================*
12 C | These variables support a simple Fortran shared memory
13 C | barrier routine. They do busy waiting, that is the
14 C | thread that is waiting sits in a tight loop reading
15 C | some memory location and waiting for all other threads.
16 C | On some systems this is sometimes a good method to use.
17 C | On the T3E memory is not shared so the routine should
18 C | use the T3E "eureka" barriers. On CRAY and NEC there are
19 C | hardware barriers that are accessed through a compiler
20 C | directives. Finally proper multi-threading compilers
21 C | support barrier compile directives - sometimes these
22 C | are good, sometimes they are lousy.
23 C | The barrier mechanism is used as follows
24 C | 1. In the single-threaded part of the code
25 C | CALL FBAR\_INIT
26 C | on CRAY, NEC this routine does nothing
27 C | on T3E there is no single-threaded code
28 C | but there may be barrier initialisation -
29 C | need to check.
30 C | 2. When we need to synchronize everybody just
31 C | CALL FBAR( myThid )
32 C | where myThid is myThreadId
33 C | on CRAY, NEC FBAR will just do C\$DIR BARRIER
34 C | or the like.
35 C | on T3E FBAR does CALL BARRIER(...) or something
36 C | need to check this.
37 C *==========================================================*
38 CEOP
39 COMMON / BARRIER_COMMON / key1, key2, key3,
40 & door1, door2, door3,
41 & bCount, masterSet
42 INTEGER key1(lShare4,MAX_NO_THREADS)
43 INTEGER key2(lShare4,MAX_NO_THREADS)
44 INTEGER key3(lShare4,MAX_NO_THREADS)
45 INTEGER door1
46 INTEGER door2
47 INTEGER door3
48 INTEGER VALID
49 PARAMETER ( VALID = 1 )
50 INTEGER INVALID
51 PARAMETER ( INVALID = 0 )
52 INTEGER OPEN
53 PARAMETER ( OPEN = 1 )
54 INTEGER SHUT
55 PARAMETER ( SHUT = 0 )
56 INTEGER bCount(MAX_NO_THREADS)
57 INTEGER masterSet(MAX_NO_THREADS)

  ViewVC Help
Powered by ViewVC 1.1.22