1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
bzsubsect(Installation)
bzindex(installation)
bzindex(autoconf)
bzindex(makefiles)
Blitz++ uses GNU Autoconf, which handles rewriting Makefiles
for various platforms and compilers. It has greatly simplified
installation and porting. Many thanks for 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:
bzverb(\
[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 main blitz directory, and type:
bzindex(configure script)
bf(bzverb(\
./configure --with-cxx=[compiler]
))
where [compiler] is one of tt(gcc), tt(KCC), tt(cray), tt(aCC),
tt(DECcxx), tt(pgCC), tt(SGI32), or tt(SGI64).
If your compiler has been renamed (e.g. tt(eg++) for gcc instead of the usual
tt(g++)), you can use this syntax to specify the command name for the compiler:
bf(bzverb(\
./configure --with-cxx=gcc:eg++
))
You can also specify special command-line options for your compiler, using
this syntax:
bf(bzverb(\
./configure --with-cxx="gcc:eg++ -ftemplate-depth-50"
))
If you are interested in benchmarking, you may want to use
the option tt(--with-blas=...) to specify the path where the
blas library is found.
Once the configure script is done, you can do any of these
things:
startdit()
dit(tt(make lib )) Check the compiler and create libblitz.a
dit(tt(make check )) Do the above plus build and check the testsuite
dit(tt(make all )) Do the above plus build the examples and benchmarks.
This may take a bf(long) time.
enddit()
Building the benchmark programs requires both a Fortran 77 and
Fortran 90 compiler.
bzsubsect(The Blitz++ directory tree)
The main Blitz++ directory contains these subdirectories:
startdit()
dit(tt(blitz/ )) Blitz++ headers and source files
dit(tt(random/ )) Random number generators
dit(tt(compiler/ )) Blitz++ compiler tests. The tt(bzconfig) script is used
to test a compiler for ISO/ANSI C++ compatability. This script creates
the tt(blitz/config.h) header file, which may enable various kludges
to compensate for deficiencies of your compiler.
dit(tt(examples/ )) Example programs
dit(tt(manual/ )) Documentation in HTML and PostScript.
dit(tt(benchmarks/ )) Benchmark programs
dit(tt(testsuite/ )) Testsuite programs
dit(tt(src/ )) Source code for tt(libblitz.a)
dit(tt(lib/ )) Where tt(libblitz.a) lives.
enddit()
bzsubsect(Porting Blitz++)
bzindex(porting Blitz++)
If you want to try porting Blitz++ to a new compiler or platform,
I suggest the following approach:
startit()
it() First check the Blitz++ web page to make sure you have
the latest snapshot, and that someone hasn't already ported
blitz to your platform.
it() Go into the compiler subdirectory and run the bzconfig
script. This will exercise your compiler to see what
language features it supports. If it doesn't have
member templates and enum computations, just give up.
it() Install autoconf (from e.g. ftp://prep.ai.mit.edu/pub/gnu)
if you don't have it already.
it() Make a backup of configure.in, and edit configure.in
to add appropriate cases for your compiler. Then invoke
autoconf to generate the configure script. Then try
configure with your new --with-cxx= option. Repeat
until it works..
endit()
|