source: trunk/WRF.COMMON/WRFV2/external/RSL_LITE/rsl_lite.h @ 2756

Last change on this file since 2756 was 11, checked in by aslmd, 14 years ago

spiga@svn-planeto:ajoute le modele meso-echelle martien

File size: 6.4 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 RSL_LITE_INIT_PERIOD rsl_lite_init_period
23#      define RSL_LITE_EXCH_PERIOD_Y rsl_lite_exch_period_y
24#      define RSL_LITE_EXCH_PERIOD_X rsl_lite_exch_period_x
25#      define RSL_LITE_PACK_PERIOD_X  rsl_lite_pack_period_x
26#      define RSL_LITE_INIT_SWAP rsl_lite_init_swap
27#      define RSL_LITE_SWAP rsl_lite_swap
28#      define RSL_LITE_PACK_SWAP  rsl_lite_pack_swap
29#      define RSL_LITE_INIT_CYCLE rsl_lite_init_cycle
30#      define RSL_LITE_CYCLE rsl_lite_cycle
31#      define RSL_LITE_PACK_CYCLE rsl_lite_pack_cycle
32#      define F_PACK_LINT f_pack_lint
33#      define F_PACK_INT f_pack_int
34#      define F_UNPACK_LINT f_unpack_lint
35#      define F_UNPACK_INT f_unpack_int
36# else
37#   ifdef F2CSTYLE
38#      define RSL_LITE_ERROR_DUP1 rsl_error_dup1__
39#      define BYTE_BCAST byte_bcast__
40#      define RSL_LITE_INIT_EXCH rsl_lite_init_exch__
41#      define RSL_LITE_EXCH_Y rsl_lite_exch_y__
42#      define RSL_LITE_EXCH_X rsl_lite_exch_x__
43#      define RSL_LITE_PACK  rsl_lite_pack__
44#      define RSL_LITE_BCAST_MSGS rsl_lite_bcast_msgs__
45#      define RSL_LITE_TO_CHILD_MSG rsl_lite_to_child_msg__
46#      define RSL_LITE_TO_CHILD_INFO rsl_lite_to_child_info__
47#      define RSL_LITE_FROM_PARENT_MSG rsl_lite_from_parent_msg__
48#      define RSL_LITE_FROM_PARENT_INFO rsl_lite_from_parent_info__
49#      define RSL_LITE_MERGE_MSGS rsl_lite_merge_msgs__
50#      define RSL_LITE_TO_PARENT_MSG rsl_lite_to_parent_msg__
51#      define RSL_LITE_TO_PARENT_INFO rsl_lite_to_parent_info__
52#      define RSL_LITE_FROM_CHILD_MSG rsl_lite_from_child_msg__
53#      define RSL_LITE_FROM_CHILD_INFO rsl_lite_from_child_info__
54#      define RSL_INTERNAL_MILLICLOCK rsl_internal_milliclock__
55#      define RSL_INTERNAL_MICROCLOCK rsl_internal_microclock__
56#      define TASK_FOR_POINT task_for_point__
57#      define RSL_LITE_INIT_PERIOD rsl_lite_init_period__
58#      define RSL_LITE_EXCH_PERIOD_Y rsl_lite_exch_period_y__
59#      define RSL_LITE_EXCH_PERIOD_X rsl_lite_exch_period_x__
60#      define RSL_LITE_PACK_PERIOD_X  rsl_lite_pack_period_x__
61#      define RSL_LITE_INIT_SWAP rsl_lite_init_swap__
62#      define RSL_LITE_SWAP rsl_lite_swap__
63#      define RSL_LITE_PACK_SWAP  rsl_lite_pack_swap__
64#      define RSL_LITE_INIT_CYCLE rsl_lite_init_cycle__
65#      define RSL_LITE_CYCLE rsl_lite_cycle__
66#      define RSL_LITE_PACK_CYCLE rsl_lite_pack_cycle__
67#      define F_PACK_LINT f_pack_lint__
68#      define F_PACK_INT f_pack_int__
69#      define F_UNPACK_LINT f_unpack_lint__
70#      define F_UNPACK_INT f_unpack_int__
71#   else
72#      define RSL_LITE_ERROR_DUP1 rsl_error_dup1_
73#      define BYTE_BCAST byte_bcast_
74#      define RSL_LITE_INIT_EXCH rsl_lite_init_exch_
75#      define RSL_LITE_EXCH_Y rsl_lite_exch_y_
76#      define RSL_LITE_EXCH_X rsl_lite_exch_x_
77#      define RSL_LITE_PACK  rsl_lite_pack_
78#      define RSL_LITE_BCAST_MSGS rsl_lite_bcast_msgs_
79#      define RSL_LITE_TO_CHILD_MSG rsl_lite_to_child_msg_
80#      define RSL_LITE_TO_CHILD_INFO rsl_lite_to_child_info_
81#      define RSL_LITE_FROM_PARENT_MSG rsl_lite_from_parent_msg_
82#      define RSL_LITE_FROM_PARENT_INFO rsl_lite_from_parent_info_
83#      define RSL_LITE_MERGE_MSGS rsl_lite_merge_msgs_
84#      define RSL_LITE_TO_PARENT_MSG rsl_lite_to_parent_msg_
85#      define RSL_LITE_TO_PARENT_INFO rsl_lite_to_parent_info_
86#      define RSL_LITE_FROM_CHILD_MSG rsl_lite_from_child_msg_
87#      define RSL_LITE_FROM_CHILD_INFO rsl_lite_from_child_info_
88#      define RSL_INTERNAL_MILLICLOCK rsl_internal_milliclock_
89#      define RSL_INTERNAL_MICROCLOCK rsl_internal_microclock_
90#      define TASK_FOR_POINT task_for_point_
91#      define RSL_LITE_INIT_PERIOD rsl_lite_init_period_
92#      define RSL_LITE_EXCH_PERIOD_Y rsl_lite_exch_period_y_
93#      define RSL_LITE_EXCH_PERIOD_X rsl_lite_exch_period_x_
94#      define RSL_LITE_PACK_PERIOD_X  rsl_lite_pack_period_x_
95#      define RSL_LITE_INIT_SWAP rsl_lite_init_swap_
96#      define RSL_LITE_SWAP rsl_lite_swap_
97#      define RSL_LITE_PACK_SWAP rsl_lite_pack_swap_
98#      define RSL_LITE_INIT_CYCLE rsl_lite_init_cycle_
99#      define RSL_LITE_CYCLE rsl_lite_cycle_
100#      define RSL_LITE_PACK_CYCLE rsl_lite_pack_cycle_
101#      define F_PACK_LINT f_pack_lint_
102#      define F_PACK_INT f_pack_int_
103#      define F_UNPACK_LINT f_unpack_lint_
104#      define F_UNPACK_INT f_unpack_int_
105#   endif
106# endif
107#endif
108
109#define RSL_SENDBUF 0
110#define RSL_RECVBUF 1
111#define RSL_FREEBUF 3
112#define RSL_MAXPROC 10000
113#define RSL_INVALID -1
114
115#define RSL_MALLOC(T,N)  (T *)rsl_malloc(__FILE__,__LINE__,(sizeof(T))*(N))
116#define RSL_FREE(P)      rsl_free(P)
117
118char * buffer_for_proc ( int P, int size, int code ) ;
119void * rsl_malloc( char * f, int l, int s ) ;
120typedef int * int_p ;
121
122#define INDEX_2(A,B,NB)       ( (B) + (A)*(NB) )
123#define INDEX_3(A,B,NB,C,NC)  INDEX_2( (A), INDEX_2( (B), (C), (NC) ), (NB)*(NC) )
124
125#define RSL_FATAL(N)     MPI_Abort(MPI_COMM_WORLD, 9)
126#define RSL_TEST_ERR(T,M) {if(T){fprintf(stderr,"rsl_lite error (\"%s\":%d) %s\n",__FILE__,__LINE__,M);RSL_FATAL(5);}}
127
128#ifndef MPI2_SUPPORT
129typedef int MPI_Fint;
130#  define MPI_Comm_c2f(comm) (MPI_Fint)(comm)
131#  define MPI_Comm_f2c(comm) (MPI_Comm)(comm)
132#endif
133
134typedef struct rsl_list {
135  struct rsl_list * next ;
136  void * data ;                 /* pointer to some node */
137#ifdef crayx1
138  int info1 ;                   /* blank info field */
139  int info2 ;                   /* blank info field */
140#else
141  short info1 ;                 /* blank info field */
142  short info2 ;                 /* blank info field */
143#endif
144} rsl_list_t ;
145
Note: See TracBrowser for help on using the repository browser.