PLUTO  4.0
 All Data Structures Files Functions Variables Enumerations Macros Pages
al_codes.h
1 #ifndef __AL_CODES
2 #define __AL_CODES
3 
4 /*
5  al_codes.h -- Codes for the AL library.
6 */
7 
8 /* Maximum dimension of supported arrays */
9 #define AL_MAX_DIM ((int)5)
10 
11 /* Maximum number of supported arrays */
12 #define AL_MAX_ARRAYS ((int)100)
13 
14 /* Stack indicator values for stack_ptr (in al_szptr_.c) */
15 #define AL_STACK_FREE ((int)0)
16 #define AL_STACK_USED ((int)1)
17 
18 /* Success/Fail codes */
19 #define AL_TRUE ((int)1)
20 #define AL_FALSE ((int)0)
21 
22 /* Success/Fail codes */
23 #define AL_SUCCESS ((AL_Const)0)
24 #define AL_FAILURE ((AL_Const)1)
25 
26 /* Codes for array indexing styles: C or Fortran indexes */
27 #define AL_C_INDEXES ((int) 7)
28 #define AL_FORTRAN_INDEXES ((int) 8)
29 
30 /* Codes for the decomposition mode */
31 #define AL_AUTO_DECOMP ((AL_Const) 9) /* Internal decomposition */
32 #define AL_MPI_DECOMP ((AL_Const) 10) /* MPI decomposition */
33 #define AL_USER_DECOMP ((AL_Const) 11) /* User defined decomposition */
34 
35 /* Codes for al_subarray routine (derived from the romio function) */
36 #define AL_ORDER_C ((int) 56)
37 #define AL_ORDER_FORTRAN ((int) 57)
38 #define AL_DISTRIBUTE_BLOCK ((int) 121)
39 #define AL_DISTRIBUTE_CYCLIC ((int) 122)
40 #define AL_DISTRIBUTE_NONE ((int) 123)
41 
42 
43 /*
44  We duplicate here some common MPI parameters, just in
45  case we'll decide to write a non-MPI version in the
46  future.
47 */
48 
49 #define AL_CHAR MPI_CHAR
50 #define AL_UNSIGNED_CHAR MPI_UNSIGNED_CHAR
51 #define AL_BYTE MPI_BYTE
52 #define AL_SHORT MPI_SHORT
53 
54 #define AL_UNSIGNED MPI_UNSIGNED
55 #define AL_LONG MPI_LONG
56 #define AL_UNSIGNED_LONG MPI_UNSIGNED_LONG
57 #define AL_FLOAT MPI_FLOAT
58 #define AL_DOUBLE MPI_DOUBLE
59 #define AL_LONG_DOUBLE MPI_LONG_DOUBLE
60 #define AL_LONG_LONG_INT MPI_LONG_LONG_INT
61 
62 #define AL_PACKED MPI_PACKED
63 #define AL_LB MPI_LB
64 #define AL_UB MPI_UB
65 
66 /*
67  The layouts for the types MPI_DOUBLE_INT etc are simply
68  struct {
69  double var;
70  int loc;
71  }
72  This is documented in the man pages on the various datatypes.
73  */
74 #define AL_FLOAT_INT MPI_FLOAT_INT
75 #define AL_DOUBLE_INT MPI_DOUBLE_INT
76 #define AL_LONG_INT MPI_LONG_INT
77 #define AL_SHORT_INT MPI_SHORT_INT
78 #define AL__2INT MPI_2INT
79 #define AL_LONG_DOUBLE_INT MPI_LONG_DOUBLE_INT
80 
81 /* Communicators */
82 #define AL_COMM_WORLD MPI_COMM_WORLD
83 #define AL_COMM_SELF MPI_COMM_SELF
84 
85 /* Groups */
86 #define AL_GROUP_EMPTY MPI_GROUP_EMPTY
87 
88 /* Collective operations */
89 
90 #define AL_MAX MPI_MAX
91 #define AL_MIN MPI_MIN
92 #define AL_SUM MPI_SUM
93 #define AL_PROD MPI_PROD
94 #define AL_LAND MPI_LAND
95 #define AL_BAND MPI_BAND
96 #define AL_LOR MPI_LOR
97 #define AL_BOR MPI_BOR
98 #define AL_LXOR MPI_LXOR
99 #define AL_BXOR MPI_BXOR
100 #define AL_MINLOC MPI_MINLOC
101 #define AL_MAXLOC MPI_MAXLOC
102 
103 
104 /* Define some null objects */
105 #define AL_COMM_NULL MPI_COMM_NULL
106 #define AL_OP_NULL MPI_OP_NULL
107 #define AL_GROUP_NULL MPI_GROUP_NULL
108 #define AL_DATATYPE_NULL MPI_DATATYPE_NULL
109 #define AL_REQUEST_NULL MPI_REQUEST_NULL
110 #define AL_ERRHANDLER_NULL MPI_ERRHANDLER_NULL
111 
112 /* These are only guesses; make sure you change them in mpif.h as well */
113 #define AL_MAX_PROCESSOR_NAME MPI_MAX_PROCESSOR_NAME
114 #define AL_MAX_PlutoError_STRING MPI_MAX_PlutoError_STRING
115 #define AL_MAX_NAME_STRING MPI_MAX_NAME_STRING /* How long a name do you need ? */
116 
117 /* Pre-defined constants */
118 #define AL_UNDEFINED MPI_UNDEFINED
119 #define AL_UNDEFINED_RANK MPI_UNDEFINED_RANK
120 #define AL_KEYVAL_INVALID MPI_KEYVAL_INVALID
121 
122 #define AL_PROC_NULL MPI_PROC_NULL
123 #define AL_ANYSOURCE MPI_ANY_SOURCE
124 #define AL_ANY_TAG MPI_ANY_TAG
125 
126 #endif /* End ifdef __AL_CODES */