[web] update Blitz++ build and test guide for GCC 3.4

Janis Johnson janis187@us.ibm.com
Fri Sep 19 22:38:00 GMT 2003


This patch updates the web page testing/testing-blitz.html to describe
how to use a newer version of Blitz++ for GCC integration testing for
GCC 3.4.  The version of Blitz++ that was used previously doesn't
compile at all with 3.4, and this latest released version almost does.
The page now references a small patch that adds "typename" in a few
places where it's now required (backported from the current CVS sources
of Blitz++) and removes "const" for a function that isn't really const
when threads are enabled.

These instructions have been tried on i686-pc-linux-gnu, powerpc-linux,
and powerpc64-linux using GCC mainline (with the Blitz++ patch) and with
GCC 3.3-branch (with and without the Blitz++ patch).  I've followed
these instructions for interoperability testing.  All of my successful
testing used -O2; with -O0 (the default) there are some files for which
the compiler ran out of virtual memory.

The benchmarks in this package might be interesting for the tree-ssa
branch.  They can't be used elsewhere (without changes) because they
require a Fortran 90 compiler.

Is it appropriate to put the Blitz++ patch into wwwdocs/htdocs/testing?
If not, where should it go?

2003-09-19  Janis Johnson  <janis187@us.ibm.com>

	* testing/testing-blitz.html: Update for Blitz++ 0.6
	and GCC 3.4.
	* testing/blitz-0.6.patch: New.

Index: testing/testing-blitz.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/testing/testing-blitz.html,v
retrieving revision 1.3
diff -u -p -r1.3 testing-blitz.html
--- testing/testing-blitz.html	3 Apr 2003 17:11:17 -0000	1.3
+++ testing/testing-blitz.html	19 Sep 2003 22:32:20 -0000
@@ -13,12 +13,11 @@ computing class library as part of GCC i
 
 <h2>Resource usage</h2>
 
-<p>The Blitz++ distribution, available at
-<a href="http://www.oonumerics.org/blitz/download/snapshots/blitz-20001213.tar.gz">
-blitz-20001213.tar.gz</a>,
-is a 0.7 MB file.  The uncompressed distribution
-comprises 4.6 MB of source files.  Building and running the
-test suite adds between 90 and 125 MB of object files
+<p>The Blitz++ 0.6 distribution, available at
+<a href="http://prdownloads.sourceforge.net/blitz/blitz-0.6.tar.gz?download">
+SourceForge</a>, is a 1.0 MB file.  The uncompressed distribution
+comprises 7.5 MB of source files.  Building and running the
+test suite adds between 35 and 125 MB of object files
 and executables to this, and building the Blitz++ example programs
 adds lots more.</p>
 
@@ -32,51 +31,68 @@ programs takes a lot of additional time.
 <ul>
 <li>Unpack the file:
     <ul>
-    <li><code>tar zxf blitz-20001213.tar.gz</code>, or</li>
-    <li><code>gunzip -c blitz-20001213.tar.gz | tar xf -</code></li>
+    <li><code>tar zxf blitz-0.6.tar.gz</code>, or</li>
+    <li><code>gunzip -c blitz-0.6.tar.gz | tar xf -</code></li>
     </ul>
 </li>
 <li>Change to the new directory:
     <ul>
-    <li><code>cd blitz-20001213</code></li>
+    <li><code>cd blitz-0.6</code></li>
+    </ul>
+</li>
+<li>If <code>automake</code> is found the build process will complain if
+    these files do not exist, so create empty ones.
+    <ul>
+    <li><code>touch NEWS AUTHORS</code></li>
+    </ul>
+</li>
+<li>Apply <a href="blitz-0.6.patch">this patch</a> containing changes
+backported from more recent Blitz++ development sources.  This is
+necessary with GCC 3.4 or later, optional for earlier versions of GCC:
+    <ul>
+    <li><code>patch -p0 < directory/with/patch/blitz-0.6.patch</code></li>
     </ul>
 </li>
 </ul>
 
-<p>On some platforms, particularly Cygwin, you'll also need to apply
-<a href="http://gcc.gnu.org/ml/libstdc++/2001-06/msg00074.html">this patch</a>;
-without it, <code>example/random.cpp</code> doesn't build.</p>
+<p>Building Blitz++ requires <code>autoconf</code> version 2.53 or later.</p>
+
+<p>Running <code>configure</code> and <code>make</code> require that
+the directory containing the C++ libraries to test is in
+<code>LD_LIBRARY_PATH</code>.</p>
 
 <h2>Configure</h2>
 
 <p>You can use the simplest form of configuration if the directory
 containing the compiler under test is in your <code>PATH</code> variable
-and the directory containing the C++ libraries to test is in
-<code>LD_LIBRARY_PATH</code>:</p>
+and you don't want specific compilation options:</p>
 
 <pre><code>./configure --prefix=`pwd` --with-cxx=gcc
 </code></pre>
 
 <p>To specify optimizations (by default Blitz++ is built using no
-optimization flags) and to specify the full pathname of the compiler
-and the location of the library, configure with:</p>
+optimization flags) and to specify the full pathname of the compiler,
+configure with:</p>
 
 <pre><code>GCC_INST=directory/where/you/installed/GCC
-LDFLAGS="-Wl,-rpath=${GCC_INST}/lib" \
 ./configure --prefix=`pwd` \
     --with-cxx="gcc:${GCC_INST}/bin/g++ <optimization_flags>" 
 </code></pre>
 
 <h2>Testing</h2>
 
+<p>To build the Blitz++ library, do:</p>
+
+<pre><code>make</code></pre>
+
 <p>To build and run the Blitz++ tests, do:</p>
 
-<pre><code>make check</code></pre>
+<pre><code>make check-testsuite</code></pre>
 
-<p>The output of <code>make check</code> should include the line
-"All tests passed."  Failure to build a test prevents the rest of the
+<p>The output of <code>make check-testsuite</code> should include the line
+"All tests passed".  Failure to build a test prevents the rest of the
 tests from being built and any of the tests from running.  To build and
-run an individual test (see the list for <code>SINGLE_TESTS</code> from
+run an individual test (see the list for <code>EXTRA_PROGRAMS</code> from
 <code>testsuite/Makefile</code>), do:</p>
 
 <pre><code>cd testsuite
@@ -85,21 +101,29 @@ make <testname>
 </code></pre>
 
 <p>The Blitz++ distribution also includes examples.  To build the examples
-as well as building and running the tests, do <code>make all</code>
-instead of <code>make check</code>.</p>
+as well as building and running the tests, do:</p>
+
+<pre><code>make check-examples</code></pre>
+
+<p>As with the testsuite, the output should include the line "All tests
+passed".</p>
 
 <h2>Interoperability testing</h2>
 
-<p>Before running the tests, <code>make check</code> builds the library
-<code>lib/libblitz.a</code> that is used by those tests.  Use Blitz++
-to test interoperability of two compilers by first configuring to use
-one compiler, building the library with <code>make lib</code>, running
-<code>configure</code> a second time specifying the second compiler,
-and then running <code>make check</code>.</p>
+<p>Use Blitz++ to test interoperability of two compilers by first
+configuring to use one compiler, building the library with <code>make</code>,
+running <code>configure</code> a second time specifying the second compiler,
+and then running <code>make check-testsuite</code> or
+<code>make check-examples</code>.</p>
 
 <h2>Timing</h2>
 
-<p>TBD</p>
+<p>The Blitz++ distribution includes benchmarks, most of which have pieces
+in C++, Fortran 77, and Fortran 90.  These compare the performance of C++
+code that uses the Blitz++ library with similar functionality in Fortran.
+The benchmarks could perhaps be modified to use only the C++ code, allowing
+them to be used to compare timings of two versions of G++.  There are also
+compile-time benchmarks.</p>
 
 <h2>Cleanup</h2>
 
--- empty	Fri Sep 19 15:32:42 2003
+++ testing/blitz-0.6.patch	Wed Sep 17 11:29:38 2003
@@ -0,0 +1,119 @@
+--- blitz/memblock.h.orig	Fri Jul 19 13:42:53 2002
++++ blitz/memblock.h	Tue Sep 16 15:39:23 2003
+@@ -223,7 +223,7 @@ protected:
+         return refcount;
+     }
+ 
+-    int references() const
++    int references()
+     {
+         BZ_MUTEX_LOCK(mutex)
+         int refcount = references_;
+--- blitz/array-impl.h.orig	Fri Aug 30 15:12:49 2002
++++ blitz/array-impl.h	Wed Sep 17 08:30:33 2003
+@@ -1998,7 +1998,8 @@ public:
+     _bz_typename SliceInfo<T_numtype,T1,T2>::T_slice
+     operator()(T1 r1, T2 r2) const
+     {
+-        return SliceInfo<T_numtype,T1,T2>::T_slice(noConst(), r1, r2,
++        typedef _bz_typename SliceInfo<T_numtype,T1,T2>::T_slice slice;
++        return slice(noConst(), r1, r2,
+             nilArraySection(), nilArraySection(), nilArraySection(),
+             nilArraySection(), nilArraySection(), nilArraySection(),
+             nilArraySection(), nilArraySection(), nilArraySection());
+@@ -2008,7 +2009,8 @@ public:
+     _bz_typename SliceInfo<T_numtype,T1,T2,T3>::T_slice 
+     operator()(T1 r1, T2 r2, T3 r3) const
+     {
+-        return SliceInfo<T_numtype,T1,T2,T3>::T_slice(noConst(), r1, r2, r3,
++        typedef _bz_typename SliceInfo<T_numtype,T1,T2,T3>::T_slice slice;
++        return slice(noConst(), r1, r2, r3,
+             nilArraySection(), nilArraySection(), nilArraySection(),
+             nilArraySection(), nilArraySection(), nilArraySection(),
+             nilArraySection(), nilArraySection());
+@@ -2018,7 +2020,8 @@ public:
+     _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice
+     operator()(T1 r1, T2 r2, T3 r3, T4 r4) const
+     {
+-        return SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice(noConst(), r1, r2, r3,
++        typedef _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice slice;
++        return slice(noConst(), r1, r2, r3,
+             r4, nilArraySection(), nilArraySection(),
+             nilArraySection(), nilArraySection(), nilArraySection(),
+             nilArraySection(), nilArraySection());
+@@ -2028,7 +2031,8 @@ public:
+     _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice
+     operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5) const
+     {
+-        return SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice(noConst(), r1, r2, 
++        typedef _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice slice;
++        return slice(noConst(), r1, r2, 
+             r3, r4, r5, nilArraySection(),
+             nilArraySection(), nilArraySection(), nilArraySection(),
+             nilArraySection(), nilArraySection());
+@@ -2038,7 +2042,8 @@ public:
+     _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice
+     operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6) const
+     {
+-        return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice(noConst(), r1, 
++        typedef _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice slice;
++        return slice(noConst(), r1, 
+             r2, r3, r4, r5, r6, 
+             nilArraySection(), nilArraySection(), nilArraySection(),
+             nilArraySection(), nilArraySection());
+@@ -2049,8 +2054,8 @@ public:
+     _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice
+     operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7) const
+     {
+-        return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice(noConst(), 
+-            r1, r2, r3, r4, r5, r6, r7,
++        typedef _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice slice;
++        return slice(noConst(), r1, r2, r3, r4, r5, r6, r7,
+             nilArraySection(), nilArraySection(),
+             nilArraySection(), nilArraySection());
+     }
+@@ -2060,8 +2065,8 @@ public:
+     _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_slice
+     operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8) const
+     {
+-        return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_slice(noConst(), 
+-            r1, r2, r3, r4, r5, r6, r7, r8,
++        typedef _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_slice slice;
++        return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8,
+             nilArraySection(), nilArraySection(), nilArraySection());
+     }
+ 
+@@ -2071,9 +2076,8 @@ public:
+     operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, 
+         T9 r9) const
+     {
+-        return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9>
+-            ::T_slice(noConst(), 
+-            r1, r2, r3, r4, r5, r6, r7, r8, r9, 
++        typedef _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9>::T_slice slice;
++        return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, 
+             nilArraySection(), nilArraySection());
+     }
+ 
+@@ -2083,8 +2087,8 @@ public:
+     operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8,
+         T9 r9, T10 r10) const
+     {
+-        return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,
+-            T10>::T_slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, 
++        typedef _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::T_slice slice;
++        return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, 
+             r9, r10, nilArraySection());
+     }
+ 
+@@ -2095,8 +2099,8 @@ public:
+     operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8,
+         T9 r9, T10 r10, T11 r11) const
+     {
+-        return SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,
+-            T11>::T_slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, 
++        typedef _bz_typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::T_slice slice;
++        return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, 
+             r10, r11);
+     }
+ 



More information about the Gcc-patches mailing list