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

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

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


Revision 1.1 - (hide annotations) (download)
Tue Mar 14 16:10:23 2000 UTC (24 years, 2 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint25
Added "JAM" routines for use with Artic network (Hyades cluster).

1 adcroft 1.1 C $Header: $
2    
3     #include "CPP_EEOPTIONS.h"
4    
5     #define USE_JAM_INIT
6    
7     SUBROUTINE INI_JAM
8    
9     C Initialise JAM based communication
10     IMPLICIT NONE
11    
12     #ifdef LETS_MAKE_JAM
13    
14     C == Global data ==
15     #include "SIZE.h"
16     #include "EEPARAMS.h"
17     #include "EESUPPORT.h"
18    
19     #include "JAM_INFO.h"
20     #include "MPI_INFO.h"
21    
22     #ifdef ALLOW_MPI
23     #include "mpif.h"
24     #endif
25    
26     C == Local variables ==
27     REAL*8 dummyVal
28     INTEGER rc
29     CHARACTER*(MAX_LEN_FNAM) fnam
30     #ifdef JAM_WITH_TWO_PROCS_PER_NODE
31     INTEGER myTwoProcRank
32     #endif
33    
34     C Names used in JAM exch testing for MPI based exchange
35     mpi_northId = mpiPidN
36     mpi_southId = mpiPidS
37    
38     #ifdef USE_JAM_INIT
39     C JAM initialisation. This should work with or without
40     C MPI. If we dont use MPI we have to start procs. by hand
41     C though!
42     #ifndef JAM_WITH_TWO_PROCS_PER_NODE
43     CALL JAM_collective_init
44     #else /* ! JAM_WITH_TWO_PROCS_PER_NODE */
45     myTwoProcRank = MOD(myProcId,2)
46     IF ( myTwoProcRank .EQ. 0 ) THEN
47     myTwoProcRank = 1
48     ELSE
49     myTwoProcRank = 0
50     ENDIF
51     CALL JAM_collective_init( myTwoProcRank )
52     #endif /* JAM_WITH_TWO_PROCS_PER_NODE */
53    
54     CALL GET_JAM_self_address( jam_pid )
55     CALL GET_JAM_partition_size( jam_np )
56     jam_exchKey = 100
57     dummyVal = 0.
58     CALL JAM_barrier_start( dummyVal )
59     CALL JAM_barrier_done( dummyVal )
60    
61     C Set up connectivity
62     jam_northId = jam_pid+1
63     IF ( jam_northId .EQ. jam_np ) jam_northId = 0
64     jam_southId = jam_pid-1
65     IF ( jam_southId .LT. 0 ) jam_southId = jam_np-1
66    
67     numberOfProcs = jam_np
68     myProcId = jam_pid
69    
70     #endif
71     #endif /* LETS_MAKE_JAM */
72    
73     RETURN
74     END

  ViewVC Help
Powered by ViewVC 1.1.22