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/UOMS.upc
[uoms] / trunk / uoms / src / UOMS.upc Repository:
ViewVC logotype

View of /trunk/uoms/src/UOMS.upc

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: 21502 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/

*******************************************************************************/

#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/utsname.h>
#include <sys/time.h>
#include <values.h>
#include <stdio.h>
#include <unistd.h>
#include <math.h>
#include <string.h>

/* UPC */
#include <upc.h>
#include <upc_collective.h>

/* Timers */
#include "timers.h"

#include "defines.h"
#include "headers.h"

FILE* unit;

/*
	Distributed array used in various benchmarks
*/
shared char *distArr;

/*
	Broadcast array
*/
shared [] char *broadcastArr;

/*
	Scatter array
*/
shared [] char *scatterArr;

/*
	Gather array
*/
shared [] char *gatherArr;

/*
	Gatherall array
*/
shared char *gatherallArr;

/*
	Exchange array
*/
shared char *exchangeArr;

/*
	Permute array
*/
shared char *permuteArr;

/*
	Reduce array (will store only 1 element)
*/
shared [] char *reduceArr;

/*
	Prefix reduce array
*/
shared char *prefixReduceArr;

/*
	Pointer for memory allocation and freeing test
*/
shared char *mem_alloc_tests_pointer;

/*
	Arrays for p2p benchmarking
*/
shared char *p2pDistArr;
shared char *p2pDistArr2;
char *p2pLocalArr;
char *p2pLocalArr2;

shared		      double b;// for reduction result
shared 		      int    perm[THREADS]; //for permutation
shared 		      long   threads_times[THREADS]; //for timing

long *sizes;
int num_sizes = 0;

int *bm_list;
int num_bms = 0;
char * valid_bms[NUM_BMS];

int cache_invalidation = 0;

upc_op_t reduce_op = UPC_ADD;
char * char_reduce_op = "UPC_ADD";

int warmup;

upc_flag_t sync_mode = UPC_IN_ALLSYNC | UPC_OUT_ALLSYNC;
char * char_sync_mode = "UPC_IN_ALLSYNC|UPC_OUT_ALLSYNC";

int global_aux_var = 0;

int main(int argc, char **argv)
/*

Input variables:

-argc                 (type int)
                      Number of command line arguments

-argv                 (type char **)
                      List of command line arguments

Return value          (type int)
                      0 always

*/
{

	init(argc, argv);

	if (!MYTHREAD)
		UOMS_general_info();

	for(int i = 0; i < num_bms; i++){
		if(p2poperation(bm_list[i]) == 0){
			bench(bm_list[i]);
		}
		else{
			if (THREADS == 2){
				affinity_bench(bm_list[i]);
			}
			else{
				if(MYTHREAD == 0){
					fprintf(unit,"\n#---------------------------------------------------\n");
					fprintf(unit,"# Skipping benchmark %s. To run it use only 2 threads.\n",valid_bms[bm_list[i]]);
					fprintf(unit,"#---------------------------------------------------\n\n");
				}
			}
		}
	}

	if(unit != stdout && unit != stderr){
		fclose(unit);
	}

	return 0;
}



int p2poperation(int operation_code) {
	switch (operation_code) {
		case LMEMCPY:
		case MEMCPY:
		case LMEMGET:
		case MEMGET:
		case LMEMPUT:
		case MEMPUT:
		#ifdef ASYNC_MEM_TEST
		case ALMEMCPY:
		case AMEMCPY:
		case ALMEMGET:
		case AMEMGET:
		case ALMEMPUT:
		case AMEMPUT:
		#endif
		#ifdef ASYNCI_MEM_TEST
		case AILMEMCPY:
		case AIMEMCPY:
		case AILMEMGET:
		case AIMEMGET:
		case AILMEMPUT:
		case AIMEMPUT:
		#endif
		case SMEMCPY:
		case MEMMOVE: 
		return 1;
		default:
		break;
	}
	return 0;
}

/*
 Generic bench function 
*/
void bench(int operation_code) {

	long int cursize;
	long int niterations, iter;
	uint64_t start, end;
	uint64_t minTime, totalTime, maxTime, prevMinTime;

	if (!MYTHREAD)
		UOMS_function_info(operation_code,THREADS,operation_header(operation_code));

	int global_iter;
	int initial_iter = (warmup)?0:1;

	int mem_is_ok;

	for(global_iter = initial_iter; global_iter <2; global_iter++) {

		prevMinTime = 0;

		/*
		  Benchmarking coll with cursize-size and niterations-iterations
		*/
		for(int cursize_index=0;cursize_index<num_sizes;cursize_index++){

			cursize = sizes[cursize_index];

			/*
				Skip test that do not achieve the minimum size
			*/
			if(cursize <= 0){
					continue;
			}
			else if(operation_code == REDUCE_C || operation_code == PREFIX_REDUCE_C){
				if(cursize<sizeof(char)){
					continue;
				}
			}
			else if(operation_code == REDUCE_UC || operation_code == PREFIX_REDUCE_UC){
				if(cursize<sizeof(unsigned char)){
					continue;
				}
			}
			else if(operation_code == REDUCE_S || operation_code == PREFIX_REDUCE_S){
				if(cursize<sizeof(short)){
					continue;
				}
			}
			else if(operation_code == REDUCE_US || operation_code == PREFIX_REDUCE_US){
				if(cursize<sizeof(unsigned short)){
					continue;
				}
			}
			else if(operation_code == REDUCE_I || operation_code == PREFIX_REDUCE_I){
				if(cursize<sizeof(int)){
					continue;
				}
			}
			else if(operation_code == REDUCE_UI || operation_code == PREFIX_REDUCE_UI){
				if(cursize<sizeof(unsigned int)){
					continue;
				}
			}
			else if(operation_code == REDUCE_L || operation_code == PREFIX_REDUCE_L){
				if(cursize<sizeof(long)){
					continue;
				}
			}
			else if(operation_code == REDUCE_UL || operation_code == PREFIX_REDUCE_UL){
				if(cursize<sizeof(unsigned long)){
					continue;
				}
			}
			else if(operation_code == REDUCE_F || operation_code == PREFIX_REDUCE_F){
				if(cursize<sizeof(float)){
					continue;
				}
			}
			else if(operation_code == REDUCE_D || operation_code == PREFIX_REDUCE_D){
				if(cursize<sizeof(double)){
					continue;
				}
			}
			else if(operation_code == REDUCE_LD || operation_code == PREFIX_REDUCE_LD){
				if(cursize<sizeof(long double)){
					continue;
				}
			}

			long int nbuckets;
			niterations = niters(cursize);

			if(cache_invalidation == 1){
				nbuckets=niterations;
			}
			else{
				nbuckets=1;
			}

			if(allocate_arrays(operation_code,cursize,nbuckets) == -1) // Unsuccessful allocation
				continue;

			upc_barrier;	

			minTime=MAXLONG;
			maxTime=0L;
			totalTime=0L;

			uint64_t tmax;

			for(iter=0;iter<niterations;iter++){

				/*
					For this benchmark the array should be allocated per iteration
				*/
				if(operation_code == FREE){
					mem_alloc_tests_pointer = upc_all_alloc(THREADS,cursize);
					UPCMEM_OK(mem_alloc_tests_pointer);
					if(mem_is_ok == -1)
						continue;
				}

				upc_barrier;	
				
				start = getTicks();
				function(operation_code,cursize,(iter%nbuckets)*cursize);
				upc_barrier;	
				end = getTicks() - start;
				
				/*
					For this benchmark the array should be freed per iteration
				*/
				if(operation_code == ALLALLOC){
					UPCMEM_OK(mem_alloc_tests_pointer);
					if(mem_is_ok == -1)
						continue;
					upc_barrier;	
					if(MYTHREAD == 0)
						upc_free(mem_alloc_tests_pointer);
				}

				threads_times[MYTHREAD]=end;
				upc_barrier;
				if (MYTHREAD == 0) {
					int i;
					tmax = 0L;
					for(i=0;i<THREADS;i++) {
						if (threads_times[i]>tmax)
							tmax=threads_times[i];
					}
				}
				end=tmax;

				totalTime+=end;
			
				//in order to avoid irregular latencies for short messages 
				if (end<minTime)
					minTime = ((end<prevMinTime)&&(cursize<32*1024))?prevMinTime:end;
				if (end>maxTime)
					maxTime = end;
			}

			upc_barrier;
	
			free_arrays(operation_code);

			if(global_iter)
				print_performance_data(operation_code,cursize,niterations,minTime,maxTime,totalTime);
			prevMinTime = minTime;
			
			upc_barrier;	
			
			if(operation_code == BARRIER){
				break;
			}

		}

	}//fi global_iter

	return;

}



/*
	Call the corresponding function 
*/
void function(int operation_code, long int cursize,long int offset){

	int aux_var = 0;

	switch (operation_code) {
		case FORALL_R:
			upc_forall(int i = offset; i < cursize*THREADS+offset; i++; &distArr[i]){
				aux_var+=distArr[i];
			}
			/*
				Some compilers with aggressive optimizations may drop the whole loop if they detect that
				aux_var is not going to be used. Writing its value to an external variable may prevent this.
			*/
			global_aux_var = aux_var;
			break;
		case FORALL_W:
			upc_forall(int i = offset; i < cursize*THREADS+offset; i++; &distArr[i]){
				distArr[i] = i;
			}
			break;
		case FORALL_RW:
			upc_forall(int i = offset; i < cursize*THREADS+offset; i++; &distArr[i]){
				distArr[i] += i;
			}
			break;
		case FOR_R:
			if(MYTHREAD == 0){
				for(int i = offset; i < cursize*THREADS+offset; i++){
					aux_var+=distArr[i];
				}
			}
			/*
				Some compilers with aggressive optimizations may drop the whole loop if they detect that
				aux_var is not going to be used. Writing its value to an external variable may prevent this.
			*/
			global_aux_var = aux_var;
			break;
		case FOR_W:
			if(MYTHREAD == 0){
				for(int i = offset; i < cursize*THREADS+offset; i++){
					distArr[i] = i;
				}
			}
			break;
		case FOR_RW:
			if(MYTHREAD == 0){
				for(int i = offset; i < cursize*THREADS+offset; i++){
					distArr[i] += i;
				}
			}
			break;
		case BROADCAST:
			upc_all_broadcast(&(distArr[THREADS*offset]),&(broadcastArr[offset]), cursize, sync_mode);
			break;
		case SCATTER: 
			upc_all_scatter(&(distArr[THREADS*offset]),&(scatterArr[THREADS*offset]), cursize, sync_mode);
			break;
		case GATHER: 		
			upc_all_gather( &(gatherArr[THREADS*offset]),&(distArr[THREADS*offset]), cursize, sync_mode);
			break;
		case GATHERALL:
			upc_all_gather_all( &(gatherallArr[THREADS*THREADS*offset]),&(distArr[THREADS*offset]), cursize, sync_mode);
			break;
		case EXCHANGE:
			upc_all_exchange(&(exchangeArr[THREADS*THREADS*offset]), &(distArr[THREADS*THREADS*offset]), cursize, sync_mode );
			break;
		case PERMUTE:
			upc_all_permute(&(permuteArr[THREADS*offset]), &(distArr[THREADS*offset]), perm, cursize, sync_mode );
			break;
		case REDUCE_C: 
			upc_all_reduceC((shared char *)reduceArr,  (shared char*)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(char))*THREADS, cursize/sizeof(char), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_C:
			upc_all_prefix_reduceC((shared char *)&(distArr[THREADS*offset]), (shared char *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(char))*THREADS, cursize/sizeof(char), NULL,  sync_mode );
			break;
		case REDUCE_UC: 
			upc_all_reduceUC((shared unsigned char *)reduceArr,  (shared unsigned char *)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(unsigned char))*THREADS, cursize/sizeof(unsigned char), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_UC:
			upc_all_prefix_reduceUC((shared unsigned char *)&(distArr[THREADS*offset]), (shared unsigned char *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(unsigned char))*THREADS, cursize/sizeof(unsigned char), NULL,  sync_mode );
			break;
		case REDUCE_S: 
			upc_all_reduceS((shared short *)reduceArr,  (shared short *)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(short))*THREADS, cursize/sizeof(short), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_S:
			upc_all_prefix_reduceS((shared short *)&(distArr[THREADS*offset]), (shared short *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(short))*THREADS, cursize/sizeof(short), NULL,  sync_mode );
			break;
		case REDUCE_US: 
			upc_all_reduceUS((shared unsigned short *)reduceArr,  (shared unsigned short *)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(unsigned short))*THREADS, cursize/sizeof(unsigned short), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_US:
			upc_all_prefix_reduceUS((shared unsigned short *)&(distArr[THREADS*offset]), (shared unsigned short *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(unsigned short))*THREADS, cursize/sizeof(unsigned short), NULL,  sync_mode );
			break;
		case REDUCE_I: 
			upc_all_reduceI((shared int *)reduceArr,  (shared int *)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(int))*THREADS, cursize/sizeof(int), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_I:
			upc_all_prefix_reduceI((shared int *)&(distArr[THREADS*offset]), (shared int *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(int))*THREADS, cursize/sizeof(int), NULL,  sync_mode );
			break;
		case REDUCE_UI: 
			upc_all_reduceUI((shared unsigned int *)reduceArr,  (shared unsigned int *)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(unsigned int))*THREADS, cursize/sizeof(unsigned int), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_UI:
			upc_all_prefix_reduceUI((shared unsigned int *)&(distArr[THREADS*offset]), (shared unsigned int *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(unsigned int))*THREADS, cursize/sizeof(unsigned int), NULL,  sync_mode );
			break;
		case REDUCE_L: 
			upc_all_reduceL((shared long *)reduceArr,  (shared long *)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(long))*THREADS, cursize/sizeof(long), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_L:
			upc_all_prefix_reduceL((shared long *)&(distArr[THREADS*offset]), (shared long *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(long))*THREADS, cursize/sizeof(long), NULL,  sync_mode );
			break;
		case REDUCE_UL: 
			upc_all_reduceUL((shared unsigned long *)reduceArr,  (shared unsigned long *)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(unsigned long))*THREADS, cursize/sizeof(unsigned long), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_UL:
			upc_all_prefix_reduceUL((shared unsigned long *)&(distArr[THREADS*offset]), (shared unsigned long *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(unsigned long))*THREADS, cursize/sizeof(unsigned long), NULL,  sync_mode );
			break;
		case REDUCE_F: 
			upc_all_reduceF((shared float *)reduceArr,  (shared float *)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(float))*THREADS, cursize/sizeof(float), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_F:
			upc_all_prefix_reduceF((shared float *)&(distArr[THREADS*offset]), (shared float *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(float))*THREADS, cursize/sizeof(float), NULL,  sync_mode );
			break;
		case REDUCE_D: 
			upc_all_reduceD((shared double *)reduceArr,  (shared double *)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(double))*THREADS, cursize/sizeof(double), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_D:
			upc_all_prefix_reduceD((shared double *)&(distArr[THREADS*offset]), (shared double *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(double))*THREADS, cursize/sizeof(double), NULL,  sync_mode );
			break;
		case REDUCE_LD: 
			upc_all_reduceLD((shared long double *)reduceArr,  (shared long double *)&(distArr[THREADS*offset]),
				reduce_op, (cursize/sizeof(long double))*THREADS, cursize/sizeof(long double), NULL,  sync_mode );
			break;
		case PREFIX_REDUCE_LD:
			upc_all_prefix_reduceLD((shared long double *)&(distArr[THREADS*offset]),(shared long double *)&(prefixReduceArr[THREADS*offset]),
				reduce_op,  (cursize/sizeof(long double))*THREADS, cursize/sizeof(long double), NULL,  sync_mode );
			break;
		case BARRIER:
			upc_barrier;
			break;
		case MEMGET:
			if (!MYTHREAD)
				upc_memget((p2pLocalArr+offset),&(p2pDistArr[1+THREADS*offset]),cursize);
			break;
		case LMEMGET:
			if (!MYTHREAD)
				upc_memget((p2pLocalArr+offset),&(p2pDistArr[THREADS*offset]),cursize);
			break;
#ifdef ASYNC_MEM_TEST
		case AMEMGET:
			if (!MYTHREAD){
				upc_handle_t handler = upc_memget_async((p2pLocalArr+offset),&(p2pDistArr[1+THREADS*offset]),cursize);
				upc_waitsync(handler);
			}
			break;
		case ALMEMGET:
			if (!MYTHREAD){
				upc_handle_t handler = upc_memget_async((p2pLocalArr+offset),&(p2pDistArr[THREADS*offset]),cursize);
				upc_waitsync(handler);
			}
			break;
#endif
#ifdef ASYNCI_MEM_TEST
		case AIMEMGET:
			if (!MYTHREAD){
				upc_memget_asynci((p2pLocalArr+offset),&(p2pDistArr[1+THREADS*offset]),cursize);
				upc_waitsynci();
			}
			break;
		case AILMEMGET:
			if (!MYTHREAD){
				upc_memget_asynci((p2pLocalArr+offset),&(p2pDistArr[THREADS*offset]),cursize);
				upc_waitsynci();
			}
			break;
#endif
		case MEMPUT:
			if (!MYTHREAD)
				upc_memput(&(p2pDistArr[1+THREADS*offset]),p2pLocalArr+offset,cursize);
			break;
		case LMEMPUT:
			if (!MYTHREAD)
				upc_memput(&(p2pDistArr[THREADS*offset]),p2pLocalArr+offset,cursize);
			break;
#ifdef ASYNC_MEM_TEST
		case AMEMPUT:
			if (!MYTHREAD){
				upc_handle_t handler = upc_memput_async(&(p2pDistArr[1+THREADS*offset]),p2pLocalArr+offset,cursize);
				upc_waitsync(handler);
			}
			break;
		case ALMEMPUT:
			if (!MYTHREAD){
				upc_handle_t handler = upc_memput_async(&(p2pDistArr[THREADS*offset]),p2pLocalArr+offset,cursize);
				upc_waitsync(handler);
			}
			break;
#endif
#ifdef ASYNCI_MEM_TEST
		case AIMEMPUT:
			if (!MYTHREAD){
				upc_memput_asynci(&(p2pDistArr[1+THREADS*offset]),p2pLocalArr+offset,cursize);
				upc_waitsynci();
			}
			break;
		case AILMEMPUT:
			if (!MYTHREAD){
				upc_memput_asynci(&(p2pDistArr[THREADS*offset]),p2pLocalArr+offset,cursize);
				upc_waitsynci();
			}
			break;
#endif
		case MEMCPY:
			if (!MYTHREAD)
				upc_memcpy(&(p2pDistArr[1+THREADS*offset]),&(p2pDistArr2[THREADS*offset]),cursize);
			break;
		case LMEMCPY:
			if (!MYTHREAD)
				upc_memcpy(&(p2pDistArr[THREADS*offset]),&(p2pDistArr2[THREADS*offset]),cursize);
			break;
#ifdef ASYNC_MEM_TEST
		case AMEMCPY:
			if (!MYTHREAD){
				upc_handle_t handler = upc_memcpy_async(&(p2pDistArr[1+THREADS*offset]),&(p2pDistArr2[THREADS*offset]),cursize);
				upc_waitsync(handler);
			}
			break;
		case ALMEMCPY:
			if (!MYTHREAD){
				upc_handle_t handler = upc_memcpy_async(&(p2pDistArr[THREADS*offset]),&(p2pDistArr2[THREADS*offset]),cursize);
				upc_waitsync(handler);
			}
			break;
#endif
#ifdef ASYNCI_MEM_TEST
		case AIMEMCPY:
			if (!MYTHREAD){
				upc_memcpy_asynci(&(p2pDistArr[1+THREADS*offset]),&(p2pDistArr2[THREADS*offset]),cursize);
				upc_waitsynci();
			}
			break;
		case AILMEMCPY:
			if (!MYTHREAD){
				upc_memcpy_asynci(&(p2pDistArr[THREADS*offset]),&(p2pDistArr2[THREADS*offset]),cursize);
				upc_waitsynci();
			}
			break;
#endif
		case SMEMCPY:
			if (!MYTHREAD)
				memcpy(p2pLocalArr2+offset,p2pLocalArr+offset,cursize);
			break;
		case MEMMOVE:
			if (!MYTHREAD)
				memmove(p2pLocalArr2+offset,p2pLocalArr+offset,cursize);
			break;
		case ALLALLOC:
			mem_alloc_tests_pointer = upc_all_alloc(THREADS,cursize);
			break;
		case FREE:
			if(!MYTHREAD)
				upc_free(mem_alloc_tests_pointer);
			break;

		default:
			break;
	}
	return;
}


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

Powered By FusionForge