Blitz++ uses GNU Autoconf, which handles rewriting Makefiles for various platforms and compilers. It has greatly simplified installation and porting. Many thanks to John W. Eaton and Brendan Kehoe for their help with this.
To install blitz, unpack the blitz-VERSION.tar.gz file (it will install into a subdirectory blitz-VERSION). For example:
[tveldhui@n2001:~] 32: ls -l blitz*.gz -rw-r--r-- 1 tveldhui users 480953 Jun 23 15:20 blitz-0.5.tar.gz [tveldhui@n2001:~] 33: gunzip blitz-0.5.tar.gz [tveldhui@n2001:~] 34: tar xvf blitz-0.5.tar blitz-0.5/CHANGELOG blitz-0.5/COPYING blitz-0.5/INSTALL blitz-0.5/Makefile.in blitz-0.5/README blitz-0.5/THANKS . .
Then go into the blitz-VERSION directory, and type:
./configure CXX=[compiler]
where [compiler] is one of xlc++
, icpc
, pathCC
,
xlC
, cxx
, aCC
, CC
, g++
, KCC
,
pgCC
or FCC
. (If you do not choose a C++ compiler, the
configure script will attempt to find an appropriate compiler for the
current platform.)
By default, the configure script will use a particular set of options with each C++ compiler. You can disable these default settings and then substitute your own preferred compiler options with the CXXFLAGS variable, using this syntax:
./configure CXX=g++ --disable-cxx-flags-preset CXXFLAGS="-ftemplate-depth-50"
If you are interested in benchmarking, you may want to use the option
--with-blas=...
to specify the path where the blas library is found.
Run the configure script with the option --help
to see all the
available options.
Once the configure script is done, you can do any of these things:
make lib
make check-testsuite
make check-examples
make check-benchmarks
make all
make install
Building the benchmark programs requires both a Fortran 77 and Fortran 90 compiler.
The main Blitz++ directory contains these subdirectories:
blitz
random
src
lib
doc
testsuite
examples
benchmarks
If you want to try porting Blitz++ to a new compiler or platform, I suggest the following approach: