/*****************************************************************************/ /* */ /* Copyright (c) 2008, 2009, 2010 */ /* Computer Architecture Group (CAG) */ /* University of A Coruña, Spain */ /* (http://gac.des.udc.es) */ /* Galicia Supercomputing Center (CESGA) */ /* (http://www.cesga.es) */ /* Hewlett-Packard Spain (HP) */ /* (http://www.hp.es) */ /* */ /* This file is part of UPC Operations Microbenchmarking Suite (UOMS). */ /* */ /* UOMS is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU Lesser General Public License as published */ /* by the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* UOMS is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU Lesser General Public License for more details. */ /* */ /* You should have received a copy of the GNU Lesser General Public License */ /* along with UOMS. If not, see . */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* FUNDING: This development has been funded by Hewlett-Packard Spain */ /* */ /* Project Name: */ /* UPCHACO (2008-2011) */ /* Subproject: */ /* Improving UPC Usability and Performance in Constellation Systems: */ /* Implementation/Extensions of UPC Libraries. */ /* (UPCPU­Project -> UPC Performance and Usability Project) */ /* */ /*****************************************************************************/ /***************************************************************************** For further documentation, see [1] Files under doc/ ******************************************************************************/ /* Do not edit this file! If you want to manually set some parameters take a look at config/parameters.h */ /* This is here to force HP UPC to recognize the functions */ #ifdef __HP_UPC_VER #include /* Access macros for `cpu_set'. */ #define CPU_SET(cpu, cpusetp) __CPU_SET (cpu, cpusetp) #define CPU_ISSET(cpu, cpusetp) __CPU_ISSET (cpu, cpusetp) #define CPU_ZERO(cpusetp) __CPU_ZERO (cpusetp) /* Set the CPU affinity for a task */ extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, __const cpu_set_t *__cpuset) __THROW; #endif #include "config/parameters.h" #ifdef ASYNC_MEM_TEST #define NUM_BMS 45 #else #define NUM_BMS 39 #endif #define VERSION "1.0" #define BARRIER 0 #define BROADCAST 1 #define SCATTER 2 #define GATHER 3 #define GATHERALL 4 #define EXCHANGE 5 #define PERMUTE 6 #define MEMGET 7 #define MEMPUT 8 #define MEMCPY 9 #define LMEMGET 10 #define LMEMPUT 11 #define LMEMCPY 12 #define SMEMCPY 13 #define MEMMOVE 14 #define ALLALLOC 15 #define FREE 16 #define REDUCE_C 17 #define PREFIX_REDUCE_C 18 #define REDUCE_UC 19 #define PREFIX_REDUCE_UC 20 #define REDUCE_S 21 #define PREFIX_REDUCE_S 22 #define REDUCE_US 23 #define PREFIX_REDUCE_US 24 #define REDUCE_I 25 #define PREFIX_REDUCE_I 26 #define REDUCE_UI 27 #define PREFIX_REDUCE_UI 28 #define REDUCE_L 29 #define PREFIX_REDUCE_L 30 #define REDUCE_UL 31 #define PREFIX_REDUCE_UL 32 #define REDUCE_F 33 #define PREFIX_REDUCE_F 34 #define REDUCE_D 35 #define PREFIX_REDUCE_D 36 #define REDUCE_LD 37 #define PREFIX_REDUCE_LD 38 #ifdef ASYNC_MEM_TEST #define AMEMGET 39 #define AMEMPUT 40 #define AMEMCPY 41 #define ALMEMGET 42 #define ALMEMPUT 43 #define ALMEMCPY 44 #endif #define MEM_OK(var){ \ if( var == NULL ){ \ printf("TH%02d: ERROR: %s == NULL\n", MYTHREAD, #var ); \ mem_is_ok = -1; \ } \ else{ \ mem_is_ok = 0; \ } \ } #define UPCMEM_OK(var) { \ if( var == NULL ){ \ printf("TH%02d: ERROR: %s == NULL\n", MYTHREAD, #var ); \ if (!MYTHREAD) upc_free(var); \ mem_is_ok = -1; \ } \ else{ \ mem_is_ok = 0; \ } \ }