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

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

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


Revision 1.1 - (show annotations) (download)
Tue Oct 17 18:15:49 2006 UTC (17 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: mitgcm_mapl_00, checkpoint58u_post, checkpoint58w_post, checkpoint60, checkpoint61, checkpoint58r_post, checkpoint58x_post, checkpoint58t_post, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a
simple function, true if master thread (and master cpu, if useSingleCpuIO):
 this way, TAF does not have to see EESUPPORT.h

1 C $Header: $
2 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 #include "PARAMS.h"
23 #ifdef ALLOW_USE_MPI
24 # include "EESUPPORT.h"
25 #endif
26
27 C !INPUT/OUTPUT PARAMETERS:
28 C myThid :: my Thread number Id.
29 C MASTER_CPU_IO :: true if master thread
30 C and, if using SingleCPUIOS, if master CPU
31 INTEGER myThid
32 CEOP
33
34 C !LOCAL VARIABLES:
35
36 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
37
38 MASTER_CPU_IO = .FALSE.
39
40 #ifdef ALLOW_USE_MPI
41 IF ( .NOT.useSingleCPUIO .OR. mpiMyId.EQ.0 ) THEN
42 _BEGIN_MASTER( myThid )
43 MASTER_CPU_IO = .TRUE.
44 _END_MASTER( myThid )
45 ENDIF
46 #else /* ALLOW_USE_MPI */
47 _BEGIN_MASTER( myThid )
48 MASTER_CPU_IO = .TRUE.
49 _END_MASTER( myThid )
50 #endif /* ALLOW_USE_MPI */
51
52 RETURN
53 END

  ViewVC Help
Powered by ViewVC 1.1.22