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] View of /trunk/uoms/src/defines.h
[uoms] / trunk / uoms / src / defines.h Repository:
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (download) (annotate)
Mon Nov 29 18:07:07 2010 UTC (13 years, 6 months ago) by dalvarez
File size: 6921 byte(s)
V1.1
/******************************************************************************/
/*                                                                            */
/*  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 <http://www.gnu.org/licenses/>.             */
/*                                                                            */
/******************************************************************************/

/******************************************************************************/
/*                                                                            */
/*    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.                            */
/*     (UPCPUProject -> 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 <sched.h>
	/* 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 ASYNCI_MEM_TEST
	#ifdef ASYNC_MEM_TEST
		#define NUM_BMS 57
	#else
		#define NUM_BMS 51
	#endif
#else
	#ifdef ASYNC_MEM_TEST
		#define NUM_BMS 51
	#else
		#define NUM_BMS 45
	#endif
#endif

#define VERSION "1.1"

#define FORALL_R 0
#define FORALL_W 1
#define FORALL_RW 2

#define FOR_R 3
#define FOR_W 4
#define FOR_RW 5

#define BARRIER   6
#define BROADCAST 7
#define SCATTER   8
#define GATHER    9
#define GATHERALL 10
#define EXCHANGE  11
#define PERMUTE   12
#define MEMGET 13
#define MEMPUT 14
#define MEMCPY 15
#define LMEMGET 16
#define LMEMPUT 17
#define LMEMCPY 18
#define SMEMCPY 19
#define MEMMOVE 20

#define ALLALLOC 21
#define FREE 22

#define REDUCE_C    23
#define PREFIX_REDUCE_C  24
#define REDUCE_UC   25
#define PREFIX_REDUCE_UC 26
#define REDUCE_S    27
#define PREFIX_REDUCE_S  28
#define REDUCE_US   29
#define PREFIX_REDUCE_US 30
#define REDUCE_I    31
#define PREFIX_REDUCE_I  32
#define REDUCE_UI   33
#define PREFIX_REDUCE_UI 34
#define REDUCE_L    35
#define PREFIX_REDUCE_L  36
#define REDUCE_UL   37
#define PREFIX_REDUCE_UL 38
#define REDUCE_F    39
#define PREFIX_REDUCE_F  40
#define REDUCE_D    41
#define PREFIX_REDUCE_D  42
#define REDUCE_LD   43
#define PREFIX_REDUCE_LD 44

#ifdef ASYNCI_MEM_TEST
	#ifdef ASYNC_MEM_TEST
		#define AMEMGET 45
		#define AMEMPUT 46
		#define AMEMCPY 47
		#define ALMEMGET 48
		#define ALMEMPUT 49
		#define ALMEMCPY 50
		#define AIMEMGET 51
		#define AIMEMPUT 52
		#define AIMEMCPY 53
		#define AILMEMGET 54
		#define AILMEMPUT 55
		#define AILMEMCPY 56
	#else
		#define AIMEMGET 45
		#define AIMEMPUT 46
		#define AIMEMCPY 47
		#define AILMEMGET 48
		#define AILMEMPUT 49
		#define AILMEMCPY 50
	#endif
#else
	#ifdef ASYNC_MEM_TEST
		#define AMEMGET 45
		#define AMEMPUT 46
		#define AMEMCPY 47
		#define ALMEMGET 48
		#define ALMEMPUT 49
		#define ALMEMCPY 50
	#endif
#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;                                        \
	}                                                         \
}

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

Powered By FusionForge