[2759] | 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_INIT_PERIOD rsl_lite_init_period_ |
---|
| 98 | # define RSL_LITE_EXCH_PERIOD_Y rsl_lite_exch_period_y_ |
---|
| 99 | # define RSL_LITE_EXCH_PERIOD_X rsl_lite_exch_period_x_ |
---|
| 100 | # define RSL_LITE_PACK_PERIOD rsl_lite_pack_period_ |
---|
| 101 | # define RSL_LITE_INIT_SWAP rsl_lite_init_swap_ |
---|
| 102 | # define RSL_LITE_SWAP rsl_lite_swap_ |
---|
| 103 | # define RSL_LITE_PACK_SWAP rsl_lite_pack_swap_ |
---|
| 104 | # define RSL_LITE_INIT_CYCLE rsl_lite_init_cycle_ |
---|
| 105 | # define RSL_LITE_CYCLE rsl_lite_cycle_ |
---|
| 106 | # define RSL_LITE_PACK_CYCLE rsl_lite_pack_cycle_ |
---|
| 107 | # define F_PACK_LINT f_pack_lint_ |
---|
| 108 | # define F_PACK_INT f_pack_int_ |
---|
| 109 | # define F_UNPACK_LINT f_unpack_lint_ |
---|
| 110 | # define F_UNPACK_INT f_unpack_int_ |
---|
| 111 | # define RSL_LITE_GET_HOSTNAME rsl_lite_get_hostname_ |
---|
| 112 | # endif |
---|
| 113 | # endif |
---|
| 114 | #endif |
---|
| 115 | |
---|
| 116 | #define RSL_SENDBUF 0 |
---|
| 117 | #define RSL_RECVBUF 1 |
---|
| 118 | #define RSL_FREEBUF 3 |
---|
| 119 | #define RSL_MAXPROC 10000 |
---|
| 120 | #define RSL_INVALID -1 |
---|
| 121 | |
---|
| 122 | /* this must be the same as defined in frame/module_driver_constants.F */ |
---|
| 123 | #define DATA_ORDER_XYZ 1 |
---|
| 124 | #define DATA_ORDER_YXZ 2 |
---|
| 125 | #define DATA_ORDER_ZXY 3 |
---|
| 126 | #define DATA_ORDER_ZYX 4 |
---|
| 127 | #define DATA_ORDER_XZY 5 |
---|
| 128 | #define DATA_ORDER_YZX 6 |
---|
| 129 | |
---|
| 130 | |
---|
| 131 | #define RSL_MALLOC(T,N) (T *)rsl_malloc(__FILE__,__LINE__,(sizeof(T))*(N)) |
---|
| 132 | #define RSL_FREE(P) rsl_free(P) |
---|
| 133 | |
---|
| 134 | char * buffer_for_proc ( int P, int size, int code ) ; |
---|
| 135 | void * rsl_malloc( char * f, int l, int s ) ; |
---|
| 136 | typedef int * int_p ; |
---|
| 137 | |
---|
| 138 | #define INDEX_2(A,B,NB) ( (B) + (A)*(NB) ) |
---|
| 139 | #define INDEX_3(A,B,NB,C,NC) INDEX_2( (A), INDEX_2( (B), (C), (NC) ), (NB)*(NC) ) |
---|
| 140 | |
---|
| 141 | #ifndef STUBMPI |
---|
| 142 | # define RSL_FATAL(N) MPI_Abort(MPI_COMM_WORLD, 9) |
---|
| 143 | #else |
---|
| 144 | # define RSL_FATAL(N) exit(9) ; |
---|
| 145 | #endif |
---|
| 146 | #ifndef MS_SUA |
---|
| 147 | # define RSL_TEST_ERR(T,M) {if(T){fprintf(stderr,"rsl_lite error (\"%s\":%d) %s\n",__FILE__,__LINE__,M);RSL_FATAL(5);}} |
---|
| 148 | #else |
---|
| 149 | # define RSL_TEST_ERR(T,M) {if(T){RSL_FATAL(5);}} |
---|
| 150 | #endif |
---|
| 151 | |
---|
| 152 | #ifndef MPI2_SUPPORT |
---|
| 153 | typedef int MPI_Fint; |
---|
| 154 | # define MPI_Comm_c2f(comm) (MPI_Fint)(comm) |
---|
| 155 | # define MPI_Comm_f2c(comm) (MPI_Comm)(comm) |
---|
| 156 | #endif |
---|
| 157 | |
---|
| 158 | typedef struct rsl_list { |
---|
| 159 | struct rsl_list * next ; |
---|
| 160 | void * data ; /* pointer to some node */ |
---|
| 161 | #ifdef crayx1 |
---|
| 162 | int info1 ; /* blank info field */ |
---|
| 163 | int info2 ; /* blank info field */ |
---|
| 164 | #else |
---|
| 165 | short info1 ; /* blank info field */ |
---|
| 166 | short info2 ; /* blank info field */ |
---|
| 167 | #endif |
---|
| 168 | } rsl_list_t ; |
---|
| 169 | |
---|