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

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

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


Revision 1.3 - (hide annotations) (download)
Thu May 7 19:34:43 2009 UTC (15 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint61n, checkpoint61o, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.2: +3 -4 lines
the only S/R from eesupp which needs PARAMS.h (because of useSingleCpuIO):
Hide it if not MPI

1 jmc 1.3 C $Header: /u/gcmpack/MITgcm/eesupp/src/master_cpu_io.F,v 1.2 2009/01/09 22:51:12 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "CPP_EEOPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: MASTER_CPU_IO
8    
9     C !INTERFACE:
10     LOGICAL FUNCTION MASTER_CPU_IO( myThid )
11    
12     C !DESCRIPTION:
13     C return TRUE if master thread, and if using SingleCPUIO,
14     C if master CPU & master thread
15    
16     C !USES:
17     IMPLICIT NONE
18    
19     C Global variables
20     #include "SIZE.h"
21     #include "EEPARAMS.h"
22     #ifdef ALLOW_USE_MPI
23 jmc 1.3 # include "PARAMS.h"
24 jmc 1.1 #endif
25    
26     C !INPUT/OUTPUT PARAMETERS:
27 jmc 1.2 C myThid :: my Thread Id number
28 jmc 1.1 C MASTER_CPU_IO :: true if master thread
29     C and, if using SingleCPUIOS, if master CPU
30     INTEGER myThid
31     CEOP
32    
33     C !LOCAL VARIABLES:
34    
35     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
36    
37     MASTER_CPU_IO = .FALSE.
38    
39     #ifdef ALLOW_USE_MPI
40 jmc 1.3 IF ( .NOT.useSingleCPUIO .OR. myProcId.EQ.0 ) THEN
41 jmc 1.1 _BEGIN_MASTER( myThid )
42     MASTER_CPU_IO = .TRUE.
43     _END_MASTER( myThid )
44     ENDIF
45     #else /* ALLOW_USE_MPI */
46     _BEGIN_MASTER( myThid )
47     MASTER_CPU_IO = .TRUE.
48     _END_MASTER( myThid )
49     #endif /* ALLOW_USE_MPI */
50    
51     RETURN
52     END

  ViewVC Help
Powered by ViewVC 1.1.22