Log In | Get Help   
Home My Page Projects Code Snippets Project Openings UPC Operations Microbenchmarking Suite
Summary Activity Tracker Lists Docs News SCM Files
[uoms] Annotation of /trunk/uoms/src/defines.h
[uoms] / trunk / uoms / src / defines.h Repository:
ViewVC logotype

Annotation of /trunk/uoms/src/defines.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (view) (download)

1 : dalvarez 1 /*****************************************************************************/
2 :     /* */
3 :     /* Copyright (c) 2008, 2009, 2010 */
4 :     /* Computer Architecture Group (CAG) */
5 :     /* University of A Coruña, Spain */
6 :     /* (http://gac.des.udc.es) */
7 :     /* Galicia Supercomputing Center (CESGA) */
8 :     /* (http://www.cesga.es) */
9 :     /* Hewlett-Packard Spain (HP) */
10 :     /* (http://www.hp.es) */
11 :     /* */
12 :     /* This file is part of UPC Operations Microbenchmarking Suite (UOMS). */
13 :     /* */
14 :     /* UOMS is free software: you can redistribute it and/or modify */
15 :     /* it under the terms of the GNU Lesser General Public License as published */
16 :     /* by the Free Software Foundation, either version 3 of the License, or */
17 :     /* (at your option) any later version. */
18 :     /* */
19 :     /* UOMS is distributed in the hope that it will be useful, */
20 :     /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
21 :     /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
22 :     /* GNU Lesser General Public License for more details. */
23 :     /* */
24 :     /* You should have received a copy of the GNU Lesser General Public License */
25 :     /* along with UOMS. If not, see <http://www.gnu.org/licenses/>. */
26 :     /* */
27 :     /*****************************************************************************/
28 :    
29 :     /*****************************************************************************/
30 :     /* */
31 :     /* FUNDING: This development has been funded by Hewlett-Packard Spain */
32 :     /* */
33 :     /* Project Name: */
34 :     /* UPCHACO (2008-2011) */
35 :     /* Subproject: */
36 :     /* Improving UPC Usability and Performance in Constellation Systems: */
37 :     /* Implementation/Extensions of UPC Libraries. */
38 :     /* (UPCPU­Project -> UPC Performance and Usability Project) */
39 :     /* */
40 :     /*****************************************************************************/
41 :    
42 :     /*****************************************************************************
43 :    
44 :     For further documentation, see
45 :    
46 :     [1] Files under doc/
47 :    
48 :     ******************************************************************************/
49 :    
50 :     /*
51 :     Do not edit this file!
52 :     If you want to manually set some parameters
53 :     take a look at config/parameters.h
54 :     */
55 :    
56 :     /*
57 :     This is here to force HP UPC to recognize the functions
58 :     */
59 :     #ifdef __HP_UPC_VER
60 :     #include <sched.h>
61 :     /* Access macros for `cpu_set'. */
62 :     #define CPU_SET(cpu, cpusetp) __CPU_SET (cpu, cpusetp)
63 :     #define CPU_ISSET(cpu, cpusetp) __CPU_ISSET (cpu, cpusetp)
64 :     #define CPU_ZERO(cpusetp) __CPU_ZERO (cpusetp)
65 :    
66 :     /* Set the CPU affinity for a task */
67 :     extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
68 :     __const cpu_set_t *__cpuset) __THROW;
69 :     #endif
70 :    
71 :     #include "config/parameters.h"
72 :    
73 : dalvarez 7 #ifdef ASYNCI_MEM_TEST
74 :     #ifdef ASYNC_MEM_TEST
75 :     #define NUM_BMS 51
76 :     #else
77 :     #define NUM_BMS 45
78 :     #endif
79 : dalvarez 1 #else
80 : dalvarez 7 #ifdef ASYNC_MEM_TEST
81 :     #define NUM_BMS 45
82 :     #else
83 :     #define NUM_BMS 39
84 :     #endif
85 : dalvarez 1 #endif
86 :    
87 :     #define VERSION "1.0"
88 :    
89 :     #define BARRIER 0
90 :     #define BROADCAST 1
91 :     #define SCATTER 2
92 :     #define GATHER 3
93 :     #define GATHERALL 4
94 :     #define EXCHANGE 5
95 :     #define PERMUTE 6
96 :     #define MEMGET 7
97 :     #define MEMPUT 8
98 :     #define MEMCPY 9
99 :     #define LMEMGET 10
100 :     #define LMEMPUT 11
101 :     #define LMEMCPY 12
102 :     #define SMEMCPY 13
103 :     #define MEMMOVE 14
104 :    
105 :     #define ALLALLOC 15
106 :     #define FREE 16
107 :    
108 :     #define REDUCE_C 17
109 :     #define PREFIX_REDUCE_C 18
110 :     #define REDUCE_UC 19
111 :     #define PREFIX_REDUCE_UC 20
112 :     #define REDUCE_S 21
113 :     #define PREFIX_REDUCE_S 22
114 :     #define REDUCE_US 23
115 :     #define PREFIX_REDUCE_US 24
116 :     #define REDUCE_I 25
117 :     #define PREFIX_REDUCE_I 26
118 :     #define REDUCE_UI 27
119 :     #define PREFIX_REDUCE_UI 28
120 :     #define REDUCE_L 29
121 :     #define PREFIX_REDUCE_L 30
122 :     #define REDUCE_UL 31
123 :     #define PREFIX_REDUCE_UL 32
124 :     #define REDUCE_F 33
125 :     #define PREFIX_REDUCE_F 34
126 :     #define REDUCE_D 35
127 :     #define PREFIX_REDUCE_D 36
128 :     #define REDUCE_LD 37
129 :     #define PREFIX_REDUCE_LD 38
130 :    
131 : dalvarez 7 #ifdef ASYNCI_MEM_TEST
132 :     #ifdef ASYNC_MEM_TEST
133 :     #define AMEMGET 39
134 :     #define AMEMPUT 40
135 :     #define AMEMCPY 41
136 :     #define ALMEMGET 42
137 :     #define ALMEMPUT 43
138 :     #define ALMEMCPY 44
139 :     #define AIMEMGET 45
140 :     #define AIMEMPUT 46
141 :     #define AIMEMCPY 47
142 :     #define AILMEMGET 48
143 :     #define AILMEMPUT 49
144 :     #define AILMEMCPY 50
145 :     #else
146 :     #define AIMEMGET 39
147 :     #define AIMEMPUT 40
148 :     #define AIMEMCPY 41
149 :     #define AILMEMGET 42
150 :     #define AILMEMPUT 43
151 :     #define AILMEMCPY 44
152 :     #endif
153 :     #else
154 :     #ifdef ASYNC_MEM_TEST
155 :     #define AMEMGET 39
156 :     #define AMEMPUT 40
157 :     #define AMEMCPY 41
158 :     #define ALMEMGET 42
159 :     #define ALMEMPUT 43
160 :     #define ALMEMCPY 44
161 :     #endif
162 : dalvarez 1 #endif
163 :    
164 :     #define MEM_OK(var){ \
165 :     if( var == NULL ){ \
166 :     printf("TH%02d: ERROR: %s == NULL\n", MYTHREAD, #var ); \
167 :     mem_is_ok = -1; \
168 :     } \
169 :     else{ \
170 :     mem_is_ok = 0; \
171 :     } \
172 :     }
173 :    
174 :     #define UPCMEM_OK(var) { \
175 :     if( var == NULL ){ \
176 :     printf("TH%02d: ERROR: %s == NULL\n", MYTHREAD, #var ); \
177 :     if (!MYTHREAD) upc_free(var); \
178 :     mem_is_ok = -1; \
179 :     } \
180 :     else{ \
181 :     mem_is_ok = 0; \
182 :     } \
183 :     }

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge