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 1 - (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 :     #ifdef ASYNC_MEM_TEST
74 :     #define NUM_BMS 45
75 :     #else
76 :     #define NUM_BMS 39
77 :     #endif
78 :    
79 :     #define VERSION "1.0"
80 :    
81 :     #define BARRIER 0
82 :     #define BROADCAST 1
83 :     #define SCATTER 2
84 :     #define GATHER 3
85 :     #define GATHERALL 4
86 :     #define EXCHANGE 5
87 :     #define PERMUTE 6
88 :     #define MEMGET 7
89 :     #define MEMPUT 8
90 :     #define MEMCPY 9
91 :     #define LMEMGET 10
92 :     #define LMEMPUT 11
93 :     #define LMEMCPY 12
94 :     #define SMEMCPY 13
95 :     #define MEMMOVE 14
96 :    
97 :     #define ALLALLOC 15
98 :     #define FREE 16
99 :    
100 :     #define REDUCE_C 17
101 :     #define PREFIX_REDUCE_C 18
102 :     #define REDUCE_UC 19
103 :     #define PREFIX_REDUCE_UC 20
104 :     #define REDUCE_S 21
105 :     #define PREFIX_REDUCE_S 22
106 :     #define REDUCE_US 23
107 :     #define PREFIX_REDUCE_US 24
108 :     #define REDUCE_I 25
109 :     #define PREFIX_REDUCE_I 26
110 :     #define REDUCE_UI 27
111 :     #define PREFIX_REDUCE_UI 28
112 :     #define REDUCE_L 29
113 :     #define PREFIX_REDUCE_L 30
114 :     #define REDUCE_UL 31
115 :     #define PREFIX_REDUCE_UL 32
116 :     #define REDUCE_F 33
117 :     #define PREFIX_REDUCE_F 34
118 :     #define REDUCE_D 35
119 :     #define PREFIX_REDUCE_D 36
120 :     #define REDUCE_LD 37
121 :     #define PREFIX_REDUCE_LD 38
122 :    
123 :     #ifdef ASYNC_MEM_TEST
124 :     #define AMEMGET 39
125 :     #define AMEMPUT 40
126 :     #define AMEMCPY 41
127 :     #define ALMEMGET 42
128 :     #define ALMEMPUT 43
129 :     #define ALMEMCPY 44
130 :     #endif
131 :    
132 :     #define MEM_OK(var){ \
133 :     if( var == NULL ){ \
134 :     printf("TH%02d: ERROR: %s == NULL\n", MYTHREAD, #var ); \
135 :     mem_is_ok = -1; \
136 :     } \
137 :     else{ \
138 :     mem_is_ok = 0; \
139 :     } \
140 :     }
141 :    
142 :     #define UPCMEM_OK(var) { \
143 :     if( var == NULL ){ \
144 :     printf("TH%02d: ERROR: %s == NULL\n", MYTHREAD, #var ); \
145 :     if (!MYTHREAD) upc_free(var); \
146 :     mem_is_ok = -1; \
147 :     } \
148 :     else{ \
149 :     mem_is_ok = 0; \
150 :     } \
151 :     }

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

Powered By FusionForge