source: lmdz_wrf/trunk/WRFV3/external/RSL_LITE/rsl_lite.h @ 1939

Last change on this file since 1939 was 1, checked in by lfita, 10 years ago
  • -- --- Opening of the WRF+LMDZ coupling repository --- -- -

WRF: version v3.3
LMDZ: version v1818

More details in:

File size: 7.2 KB
Line 
1#ifndef CRAY
2# ifdef NOUNDERSCORE
3#      define RSL_LITE_ERROR_DUP1 rsl_error_dup1
4#      define BYTE_BCAST byte_bcast
5#      define RSL_LITE_INIT_EXCH rsl_lite_init_exch
6#      define RSL_LITE_EXCH_Y rsl_lite_exch_y
7#      define RSL_LITE_EXCH_X rsl_lite_exch_x
8#      define RSL_LITE_PACK  rsl_lite_pack
9#      define RSL_LITE_BCAST_MSGS rsl_lite_bcast_msgs
10#      define RSL_LITE_TO_CHILD_MSG rsl_lite_to_child_msg
11#      define RSL_LITE_TO_CHILD_INFO rsl_lite_to_child_info
12#      define RSL_LITE_FROM_PARENT_MSG rsl_lite_from_parent_msg
13#      define RSL_LITE_FROM_PARENT_INFO rsl_lite_from_parent_info
14#      define RSL_LITE_MERGE_MSGS rsl_lite_merge_msgs
15#      define RSL_LITE_TO_PARENT_MSG rsl_lite_to_parent_msg
16#      define RSL_LITE_TO_PARENT_INFO rsl_lite_to_parent_info
17#      define RSL_LITE_FROM_CHILD_MSG rsl_lite_from_child_msg
18#      define RSL_LITE_FROM_CHILD_INFO rsl_lite_from_child_info
19#      define RSL_INTERNAL_MILLICLOCK rsl_internal_milliclock
20#      define RSL_INTERNAL_MICROCLOCK rsl_internal_microclock
21#      define TASK_FOR_POINT task_for_point
22#      define TASK_FOR_POINT_MESSAGE task_for_point_message
23#      define RSL_LITE_INIT_PERIOD rsl_lite_init_period
24#      define RSL_LITE_EXCH_PERIOD_Y rsl_lite_exch_period_y
25#      define RSL_LITE_EXCH_PERIOD_X rsl_lite_exch_period_x
26#      define RSL_LITE_PACK_PERIOD  rsl_lite_pack_period
27#      define RSL_LITE_INIT_SWAP rsl_lite_init_swap
28#      define RSL_LITE_SWAP rsl_lite_swap
29#      define RSL_LITE_PACK_SWAP  rsl_lite_pack_swap
30#      define RSL_LITE_INIT_CYCLE rsl_lite_init_cycle
31#      define RSL_LITE_CYCLE rsl_lite_cycle
32#      define RSL_LITE_PACK_CYCLE rsl_lite_pack_cycle
33#      define F_PACK_LINT f_pack_lint
34#      define F_PACK_INT f_pack_int
35#      define F_UNPACK_LINT f_unpack_lint
36#      define F_UNPACK_INT f_unpack_int
37#      define RSL_LITE_GET_HOSTNAME rsl_lite_get_hostname
38# else
39#   ifdef F2CSTYLE
40#      define RSL_LITE_ERROR_DUP1 rsl_error_dup1__
41#      define BYTE_BCAST byte_bcast__
42#      define RSL_LITE_INIT_EXCH rsl_lite_init_exch__
43#      define RSL_LITE_EXCH_Y rsl_lite_exch_y__
44#      define RSL_LITE_EXCH_X rsl_lite_exch_x__
45#      define RSL_LITE_PACK  rsl_lite_pack__
46#      define RSL_LITE_BCAST_MSGS rsl_lite_bcast_msgs__
47#      define RSL_LITE_TO_CHILD_MSG rsl_lite_to_child_msg__
48#      define RSL_LITE_TO_CHILD_INFO rsl_lite_to_child_info__
49#      define RSL_LITE_FROM_PARENT_MSG rsl_lite_from_parent_msg__
50#      define RSL_LITE_FROM_PARENT_INFO rsl_lite_from_parent_info__
51#      define RSL_LITE_MERGE_MSGS rsl_lite_merge_msgs__
52#      define RSL_LITE_TO_PARENT_MSG rsl_lite_to_parent_msg__
53#      define RSL_LITE_TO_PARENT_INFO rsl_lite_to_parent_info__
54#      define RSL_LITE_FROM_CHILD_MSG rsl_lite_from_child_msg__
55#      define RSL_LITE_FROM_CHILD_INFO rsl_lite_from_child_info__
56#      define RSL_INTERNAL_MILLICLOCK rsl_internal_milliclock__
57#      define RSL_INTERNAL_MICROCLOCK rsl_internal_microclock__
58#      define TASK_FOR_POINT task_for_point__
59#      define TASK_FOR_POINT_MESSAGE task_for_point_message__
60#      define RSL_LITE_INIT_PERIOD rsl_lite_init_period__
61#      define RSL_LITE_EXCH_PERIOD_Y rsl_lite_exch_period_y__
62#      define RSL_LITE_EXCH_PERIOD_X rsl_lite_exch_period_x__
63#      define RSL_LITE_PACK_PERIOD  rsl_lite_pack_period__
64#      define RSL_LITE_INIT_SWAP rsl_lite_init_swap__
65#      define RSL_LITE_SWAP rsl_lite_swap__
66#      define RSL_LITE_PACK_SWAP  rsl_lite_pack_swap__
67#      define RSL_LITE_INIT_CYCLE rsl_lite_init_cycle__
68#      define RSL_LITE_CYCLE rsl_lite_cycle__
69#      define RSL_LITE_PACK_CYCLE rsl_lite_pack_cycle__
70#      define F_PACK_LINT f_pack_lint__
71#      define F_PACK_INT f_pack_int__
72#      define F_UNPACK_LINT f_unpack_lint__
73#      define F_UNPACK_INT f_unpack_int__
74#      define RSL_LITE_GET_HOSTNAME rsl_lite_get_hostname__
75#   else
76#      define RSL_LITE_ERROR_DUP1 rsl_error_dup1_
77#      define BYTE_BCAST byte_bcast_
78#      define RSL_LITE_INIT_EXCH rsl_lite_init_exch_
79#      define RSL_LITE_EXCH_Y rsl_lite_exch_y_
80#      define RSL_LITE_EXCH_X rsl_lite_exch_x_
81#      define RSL_LITE_PACK  rsl_lite_pack_
82#      define RSL_LITE_BCAST_MSGS rsl_lite_bcast_msgs_
83#      define RSL_LITE_TO_CHILD_MSG rsl_lite_to_child_msg_
84#      define RSL_LITE_TO_CHILD_INFO rsl_lite_to_child_info_
85#      define RSL_LITE_FROM_PARENT_MSG rsl_lite_from_parent_msg_
86#      define RSL_LITE_FROM_PARENT_INFO rsl_lite_from_parent_info_
87#      define RSL_LITE_MERGE_MSGS rsl_lite_merge_msgs_
88#      define RSL_LITE_TO_PARENT_MSG rsl_lite_to_parent_msg_
89#      define RSL_LITE_TO_PARENT_INFO rsl_lite_to_parent_info_
90#      define RSL_LITE_FROM_CHILD_MSG rsl_lite_from_child_msg_
91#      define RSL_LITE_FROM_CHILD_INFO rsl_lite_from_child_info_
92#      define RSL_INTERNAL_MILLICLOCK rsl_internal_milliclock_
93#      define RSL_INTERNAL_MICROCLOCK rsl_internal_microclock_
94#      define TASK_FOR_POINT task_for_point_
95#      define TASK_FOR_POINT_MESSAGE task_for_point_message_
96#      define RSL_LITE_INIT_PERIOD rsl_lite_init_period_
97#      define RSL_LITE_EXCH_PERIOD_Y rsl_lite_exch_period_y_
98#      define RSL_LITE_EXCH_PERIOD_X rsl_lite_exch_period_x_
99#      define RSL_LITE_PACK_PERIOD  rsl_lite_pack_period_
100#      define RSL_LITE_INIT_SWAP rsl_lite_init_swap_
101#      define RSL_LITE_SWAP rsl_lite_swap_
102#      define RSL_LITE_PACK_SWAP rsl_lite_pack_swap_
103#      define RSL_LITE_INIT_CYCLE rsl_lite_init_cycle_
104#      define RSL_LITE_CYCLE rsl_lite_cycle_
105#      define RSL_LITE_PACK_CYCLE rsl_lite_pack_cycle_
106#      define F_PACK_LINT f_pack_lint_
107#      define F_PACK_INT f_pack_int_
108#      define F_UNPACK_LINT f_unpack_lint_
109#      define F_UNPACK_INT f_unpack_int_
110#      define RSL_LITE_GET_HOSTNAME rsl_lite_get_hostname_
111#   endif
112# endif
113#endif
114
115#define RSL_SENDBUF 0
116#define RSL_RECVBUF 1
117#define RSL_FREEBUF 3
118#define RSL_MAXPROC 10000
119#define RSL_INVALID -1
120
121/* this must be the same as defined in frame/module_driver_constants.F */
122#define   DATA_ORDER_XYZ   1
123#define   DATA_ORDER_YXZ   2
124#define   DATA_ORDER_ZXY   3
125#define   DATA_ORDER_ZYX   4
126#define   DATA_ORDER_XZY   5
127#define   DATA_ORDER_YZX   6
128
129
130#define RSL_MALLOC(T,N)  (T *)rsl_malloc(__FILE__,__LINE__,(sizeof(T))*(N))
131#define RSL_FREE(P)      rsl_free(P)
132
133char * buffer_for_proc ( int P, int size, int code ) ;
134void * rsl_malloc( char * f, int l, int s ) ;
135typedef int * int_p ;
136
137#define INDEX_2(A,B,NB)       ( (B) + (A)*(NB) )
138#define INDEX_3(A,B,NB,C,NC)  INDEX_2( (A), INDEX_2( (B), (C), (NC) ), (NB)*(NC) )
139
140#ifndef STUBMPI
141# define RSL_FATAL(N)     MPI_Abort(MPI_COMM_WORLD, 9)
142#else
143# define RSL_FATAL(N)     exit(9) ;
144#endif
145#ifndef MS_SUA
146# define RSL_TEST_ERR(T,M) {if(T){fprintf(stderr,"rsl_lite error (\"%s\":%d) %s\n",__FILE__,__LINE__,M);RSL_FATAL(5);}}
147#else
148# define RSL_TEST_ERR(T,M) {if(T){RSL_FATAL(5);}}
149#endif
150
151#ifndef MPI2_SUPPORT
152typedef int MPI_Fint;
153#  define MPI_Comm_c2f(comm) (MPI_Fint)(comm)
154#  define MPI_Comm_f2c(comm) (MPI_Comm)(comm)
155#endif
156
157typedef struct rsl_list {
158  struct rsl_list * next ;
159  void * data ;                 /* pointer to some node */
160#ifdef crayx1
161  int info1 ;                   /* blank info field */
162  int info2 ;                   /* blank info field */
163#else
164  short info1 ;                 /* blank info field */
165  short info2 ;                 /* blank info field */
166#endif
167} rsl_list_t ;
168
Note: See TracBrowser for help on using the repository browser.