/[MITgcm]/MITgcm/eesupp/src/ini_jam.F
ViewVC logotype

Contents of /MITgcm/eesupp/src/ini_jam.F

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


Revision 1.4 - (show annotations) (download)
Sun Feb 4 14:38:43 2001 UTC (23 years, 3 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint38, checkpoint40pre2, checkpoint40pre4, pre38tag1, c37_adj, pre38-close, checkpoint39, checkpoint37, checkpoint36, checkpoint35, checkpoint40pre5, checkpoint40
Branch point for: pre38
Changes since 1.3: +2 -1 lines
Made sure each .F and .h file had
the CVS keywords Header and Name at its start.
Most had header but very few currently have Name, so
lots of changes!

1 C $Header: /u/gcmpack/models/MITgcmUV/eesupp/src/ini_jam.F,v 1.3 2000/04/05 14:52:27 adcroft Exp $
2 C $Name: $
3
4 #include "CPP_EEOPTIONS.h"
5
6 #define USE_JAM_INIT
7
8 SUBROUTINE INI_JAM
9
10 C Initialise JAM based communication
11 IMPLICIT NONE
12
13 #ifdef LETS_MAKE_JAM
14
15 C == Global data ==
16 #include "SIZE.h"
17 #include "EEPARAMS.h"
18 #include "EESUPPORT.h"
19
20 #include "JAM_INFO.h"
21 #include "MPI_INFO.h"
22
23 #ifdef ALLOW_MPI
24 #include "mpif.h"
25 #endif
26
27 C == Local variables ==
28 Real*8 dummyVal
29 INTEGER rc
30 CHARACTER*(MAX_LEN_FNAM) fnam
31 #ifdef JAM_WITH_TWO_PROCS_PER_NODE
32 INTEGER myTwoProcRank
33 #endif
34
35 C Names used in JAM exch testing for MPI based exchange
36 mpi_northId = mpiPidN
37 mpi_southId = mpiPidS
38
39 #ifdef USE_JAM_INIT
40 C JAM initialisation. This should work with or without
41 C MPI. If we dont use MPI we have to start procs. by hand
42 C though!
43 #ifndef JAM_WITH_TWO_PROCS_PER_NODE
44 CALL JAM_collective_init
45 #else /* ! JAM_WITH_TWO_PROCS_PER_NODE */
46 myTwoProcRank = MOD(myProcId,2)
47 IF ( myTwoProcRank .EQ. 0 ) THEN
48 myTwoProcRank = 1
49 ELSE
50 myTwoProcRank = 0
51 ENDIF
52 CALL JAM_collective_init( myTwoProcRank )
53 #endif /* JAM_WITH_TWO_PROCS_PER_NODE */
54
55 CALL GET_JAM_self_address( jam_pid )
56 CALL GET_JAM_partition_size( jam_np )
57 jam_exchKey = 100
58 dummyVal = 0.
59 CALL JAM_barrier_start( dummyVal )
60 CALL JAM_barrier_done( dummyVal )
61
62 C Set up connectivity
63 jam_northId = jam_pid+1
64 IF ( jam_northId .EQ. jam_np ) jam_northId = 0
65 jam_southId = jam_pid-1
66 IF ( jam_southId .LT. 0 ) jam_southId = jam_np-1
67
68 numberOfProcs = jam_np
69 myProcId = jam_pid
70
71 #ifdef JAM_WITH_TWO_PROCS_PER_NODE
72 C The following fixes the instance where MPI and
73 C James JAM arrive at a different id for this process
74 C *note* this assumes nPx=1 (no parallization in X)
75 myPid = jam_pid
76 pidN = mod(jam_pid+1,jam_np)
77 pidS = mod(jam_pid-1+jam_np,jam_np)
78 pidW = jam_pid
79 pidE = jam_pid
80 myYGlobalLo = sNy*nSy*jam_pid+1
81 myXGlobalLo = 1
82 #endif
83
84 #endif
85 #endif /* LETS_MAKE_JAM */
86
87 RETURN
88 END

  ViewVC Help
Powered by ViewVC 1.1.22