Skip to content

Commit

Permalink
Update some examples' makefiles/headers/problem sizes
Browse files Browse the repository at this point in the history
Update some examples' makefiles/headers/problem sizes

Signed-off-by: Uday Reddy <udayreddy@gmail.com>
  • Loading branch information
bondhugula committed May 12, 2011
1 parent 07e013d commit ee9571a
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
8 changes: 4 additions & 4 deletions examples/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
CC=gcc

# Intel MKL and AMD ACML library paths
MKL=/usr/local/mkl
MKL=/opt/intel/mkl
ACML=/usr/local/acml

ifeq ($(CC), icc)
OPT_FLAGS=-O3 -I/usr/include -fp-model strict
OPT_FLAGS=-O3 -I/usr/include -fp-model precise
PAR_FLAGS := -parallel
OMP_FLAGS := -openmp
else
Expand Down Expand Up @@ -86,8 +86,8 @@ opt-test: orig opt
diff -q out_orig out_opt

clean:
rm -f out_* *.tiled.c *.opt.c opt orig tiled sched \
sched hopt hopt *.par.c par *.par2d.c orig_par *.out.* \
rm -f out_* *.tiled.c *.opt.c *.par.c orig opt tiled par sched orig_par \
hopt hopt *.par2d.c *.out.* \
*.kernel.* a.out $(EXTRA_CLEAN) tags tmp* gmon.out *~ .unroll \
.vectorize par2d parsetab.py *.body.c *.pluto.c *.par.cloog *.tiled.cloog

Expand Down
2 changes: 1 addition & 1 deletion examples/dsyr2k/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SRC= dsyr2k

PLCFLAGS = --context=100 #--unroll
PLCFLAGS = --context=100 #--unroll --ufactor=2
TILEFLAGS = #--l2tile

include ../common.mk
Expand Down
4 changes: 2 additions & 2 deletions examples/dsyr2k/decls.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#define N 1000
double f[N][N+13];
#define NMAX 2000
static double a[NMAX][NMAX], b[NMAX][NMAX], c[NMAX][NMAX];
6 changes: 2 additions & 4 deletions examples/dsyr2k/dsyr2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <math.h>
#include <sys/time.h>

#include "decls.h"

#define TIME 1

#ifdef TIME
Expand All @@ -22,10 +24,6 @@ double rtclock()
}


#define NMAX 2000

static double a[NMAX][NMAX], b[NMAX][NMAX], c[NMAX][NMAX];

void dsyr2k(long N) {
int i,j,k;

Expand Down
3 changes: 3 additions & 0 deletions examples/dsyr2k/tile.sizes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
16
32
32
4
4
4
2 changes: 2 additions & 0 deletions examples/dsyrk/decls.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define NMAX 3000
static double a[NMAX][NMAX], c[NMAX][NMAX];
6 changes: 2 additions & 4 deletions examples/dsyrk/dsyrk.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <unistd.h>
#include <sys/time.h>

#include "decls.h"

#ifdef TIME
#define IF_TIME(foo) foo;
#else
Expand All @@ -23,10 +25,6 @@ double rtclock()
}
#endif

#define NMAX 3000
#define MEASURE_TIME 1

static double a[NMAX][NMAX], c[NMAX][NMAX];

void dsyrk(long N)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/jacobi-1d-imper/decls.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define N 100000
#define N 500000
#define T 1000
double a[N];
double b[N];
2 changes: 1 addition & 1 deletion examples/matmul/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ atlas: dgemm.f decls.h
gfortran -m64 -O dgemm.f -L /usr/local/ATLAS/lib -o atlas -llapack -lcblas -lf77blas -latlas -lpthread

mkl: matmul.blas.c decls.h
$(CC) -O3 $(CFLAGS) -I/usr/local/mkl/include matmul.blas.c -L /usr/local/mkl/lib/em64t -lmkl_em64t -lmkl -lguide -lpthread -o mkl
$(CC) -O3 $(CFLAGS) -I$(MKL)/include matmul.blas.c -L $(MKL)/lib/ia32 -lmkl_intel -lpthread -o mkl

acml: matmul.blas.c decls.h
$(CC) -O3 -c -I $(ACML)/ifort64_mp/include -openmp matmul.acml.c -DTIME
Expand Down

0 comments on commit ee9571a

Please sign in to comment.