[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
[patch] stand-alone makefile for benchmarks
- To: VSIPL++ Developers List <vsipl++@xxxxxxxxxxxxxxxx>
- Subject: [patch] stand-alone makefile for benchmarks
- From: Don McCoy <don@xxxxxxxxxxxxxxxx>
- Date: Thu, 16 Mar 2006 10:57:53 -0700
The attached patch changes the stand-alone makefile for building
benchmarks. These minor changes should allow it to work correctly with
any implementation of VSIPL++ that provides the .pc file needed for
pkg-config. Instructions for invoking it are included below.
Also attached is the pkg-config file needed for the building against the
reference implementation.
Building the full reference implementation requires three things: the
TASP C-VSIPL code (tvcpp0p8.tgz, available at www.vsipl.org), FFTW 2.15
(www.fftw.org/) and the reference implementation code (in CVS as
vsipl++). C-VSIPL should be put into the vsipl++/ directory
(side-by-side with the implementation/ folder that contains the ref-impl
code) in order for pkg-config to work correctly.
Building the reference implementation is summarized here:
1) Build FFTW for single precision and install it somewhere.
2) Build C-VSIPL (there is no install option)
3) Place a symlink in the tvcpp0p8/lib/ folder to the installed fftw
library
4) Build the reference implementation library (named vsippp instead
of vsip)
5) Ensure the reference implementation folder has a sub-directory
lib/ containing pkgconfig/vsipl++.pc.
To link the benchmarks against it, you must invoke make with a path that
will allow it to find the correct vsipl++.pc file (i.e. the whole path
up to, but not including, lib/). To verify that things are installed
correctly, type
make -f make.standalone PREFIX=~/vsipl++/implementation vars
And it should display something like:
echo "PKG-CFG : " env
PKG_CONFIG_PATH=/home/don/vsipl++/implementation/lib/pkgconfig
pkg-config --define-variable=prefix=/home/don/vsipl++/implementation vsipl++
echo "CXX : " g++
echo "CXXFLAGS: " -I/home/don/work/ref-impl
-I/home/don/vsipl++/implementation/../tvcpp0p8/include -O2 -DNDEBUG
-funswitch-loops -fgcse-after-reload --param
max-inline-insns-single=2000 --param large-function-insns=6000 --param
large-function-growth=800 --param inline-unit-growth=300 -m64
-mtune=nocona -mmmx -msse -msse2 -msse3
echo "LIBS : " -L/home/don/vsipl++/implementation/vsip
-L/home/don/vsipl++/implementation/../tvcpp0p8/lib -lvsippp -lvsip -lfftw
Use the base name of the benchmark you want to build in place of 'vars'
above to build the desired benchmark.
Regards,
--
Don McCoy
don (at) CodeSourcery
(888) 776-0262 / (650) 331-3385, x712
2006-03-16 Don McCoy <don@xxxxxxxxxxxxxxxx>
* benchmarks/make.standalone: Fixed a bug where it would
not recognize that PREFIX was set on the command line.
Fixed include paths and build targets.
Index: benchmarks/make.standalone
===================================================================
RCS file: /home/cvs/Repository/vpp/benchmarks/make.standalone,v
retrieving revision 1.2
diff -c -p -r1.2 make.standalone
*** benchmarks/make.standalone 27 Jan 2006 13:13:23 -0000 1.2
--- benchmarks/make.standalone 16 Mar 2006 17:42:26 -0000
*************** EXEEXT =
*** 56,62 ****
# Variables in this section should not be modified.
# Logic to call pkg-config with PREFIX, if specified.
! ifdef $PREFIX
PC = env PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig \
pkg-config --define-variable=prefix=$(PREFIX) $(PKG)
else
--- 56,62 ----
# Variables in this section should not be modified.
# Logic to call pkg-config with PREFIX, if specified.
! ifdef PREFIX
PC = env PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig \
pkg-config --define-variable=prefix=$(PREFIX) $(PKG)
else
*************** CXXFLAGS := $(shell $(PC) --cflags
*** 69,81 ****
$(shell $(PC) --variable=cxxflags )
LIBS := $(shell $(PC) --libs )
- CXXFLAGS := $(CXXFLAGS) -I../tests
-
sources := $(wildcard *.cpp)
objects := $(patsubst %.cpp, %.$(OBJEXT), $(sources))
exes := $(patsubst %.cpp, %$(EXEEXT), $(sources))
- tests := $(patsubst %.cpp, %.test, $(sources))
statics := $(patsubst %.cpp, %.static$(EXEEXT), $(sources))
--- 69,78 ----
*************** exes_def_build := $(filter-out $(exes_sp
*** 88,104 ****
# Targets
########################################################################
! all: $(tests)
! check: $(tests)
vars:
@echo "CXX : " $(CXX)
@echo "CXXFLAGS: " $(CXXFLAGS)
@echo "LIBS : " $(LIBS)
clean:
! rm -rf *.exe *.o
--- 85,102 ----
# Targets
########################################################################
! all: $(exes_def_build)
! check: $(exes_def_build)
vars:
+ @echo "PKG-CFG : " $(PC)
@echo "CXX : " $(CXX)
@echo "CXXFLAGS: " $(CXXFLAGS)
@echo "LIBS : " $(LIBS)
clean:
! rm -rf $(exes_def_build) $(objects)
prefix=
exec_prefix=${prefix}
libdir=${exec_prefix}/vsip
includedir=${prefix}
cxx=g++
cppflags=-I${includedir} -I${includedir}/../tvcpp0p8/include
cxxflags=-O2 -DNDEBUG -funswitch-loops -fgcse-after-reload --param max-inline-insns-single=2000 --param large-function-insns=6000 --param large-function-growth=800 --param inline-unit-growth=300 -m64 -mtune=nocona -mmmx -msse -msse2 -msse3
ldflags= -L${prefix}/../tvcpp0p8/lib -lvsip -lfftw
Name: Sourcery VSIPL++
Description: CodeSourcery VSIPL++ library
Version: 1.0
Libs: -L${libdir} -lvsippp ${ldflags}
Cflags: ${cppflags}
|