1 |
jmc |
1.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 |