1 |
/*****************************************************************************/ |
/******************************************************************************/ |
2 |
/* */ |
/* */ |
3 |
/* Copyright (c) 2008, 2009, 2010 */ |
/* Copyright (c) 2008, 2009, 2010 */ |
4 |
/* Computer Architecture Group (CAG) */ |
/* Computer Architecture Group (CAG) */ |
24 |
/* You should have received a copy of the GNU Lesser General Public License */ |
/* 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/>. */ |
/* 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 */ |
/* FUNDING: This development has been funded by Hewlett-Packard Spain */ |
32 |
/* */ |
/* */ |
35 |
/* Subproject: */ |
/* Subproject: */ |
36 |
/* Improving UPC Usability and Performance in Constellation Systems: */ |
/* Improving UPC Usability and Performance in Constellation Systems: */ |
37 |
/* Implementation/Extensions of UPC Libraries. */ |
/* Implementation/Extensions of UPC Libraries. */ |
38 |
/* (UPCPUProject -> UPC Performance and Usability Project) */ |
/* (UPCPUProject -> UPC Performance and Usability Project) */ |
39 |
/* */ |
/* */ |
40 |
/*****************************************************************************/ |
/******************************************************************************/ |
41 |
|
|
42 |
/***************************************************************************** |
/****************************************************************************** |
43 |
|
|
44 |
For further documentation, see |
For further documentation, see |
45 |
|
|
46 |
[1] Files under doc/ |
[1] Files under doc/ |
47 |
|
|
48 |
******************************************************************************/ |
*******************************************************************************/ |
49 |
|
|
50 |
#include <stdio.h> |
#include <stdio.h> |
51 |
#include <stdlib.h> |
#include <stdlib.h> |
67 |
Set benchmarks names |
Set benchmarks names |
68 |
*/ |
*/ |
69 |
void set_bms_names(){ |
void set_bms_names(){ |
70 |
|
valid_bms[FORALL_R] = "upc_forall read"; |
71 |
|
valid_bms[FORALL_W] = "upc_forall write"; |
72 |
|
valid_bms[FORALL_RW] = "upc_forall read+write"; |
73 |
|
valid_bms[FOR_R] = "for read"; |
74 |
|
valid_bms[FOR_W] = "for write"; |
75 |
|
valid_bms[FOR_RW] = "for read+write"; |
76 |
valid_bms[BARRIER] = "upc_barrier"; |
valid_bms[BARRIER] = "upc_barrier"; |
77 |
valid_bms[BROADCAST] = "upc_all_broadcast"; |
valid_bms[BROADCAST] = "upc_all_broadcast"; |
78 |
valid_bms[SCATTER] = "upc_all_scatter"; |
valid_bms[SCATTER] = "upc_all_scatter"; |
292 |
bm_list = malloc(num_bms*sizeof(int)); |
bm_list = malloc(num_bms*sizeof(int)); |
293 |
if(errno != 0){ |
if(errno != 0){ |
294 |
if(MYTHREAD == 0){ |
if(MYTHREAD == 0){ |
295 |
|
/* |
296 |
|
Just in case you want to run the benchmark in a toaster or someone/something steal all your memory ;-) |
297 |
|
*/ |
298 |
fprintf(stderr,"*** Unable to allocate %ld bytes for benchmark list storing: ",num_bms*sizeof(int)); |
fprintf(stderr,"*** Unable to allocate %ld bytes for benchmark list storing: ",num_bms*sizeof(int)); |
299 |
perror(NULL); |
perror(NULL); |
300 |
} |
} |
369 |
bm_list = malloc(num_bms*sizeof(int)); |
bm_list = malloc(num_bms*sizeof(int)); |
370 |
if(errno != 0){ |
if(errno != 0){ |
371 |
if(MYTHREAD == 0){ |
if(MYTHREAD == 0){ |
372 |
|
/* |
373 |
|
Just in case you want to run the benchmark in a toaster or someone/something steal all your memory ;-) |
374 |
|
*/ |
375 |
fprintf(stderr,"*** Unable to allocate %ld bytes for benchmark list storing: ",num_bms*sizeof(int)); |
fprintf(stderr,"*** Unable to allocate %ld bytes for benchmark list storing: ",num_bms*sizeof(int)); |
376 |
perror(NULL); |
perror(NULL); |
377 |
} |
} |