This page is a guide to running the testing and timing programs for the FTensor tensor class library as part of GCC integration testing.
The uncompressed distribution comprises some 2.9 MB of source files.
To prepare for a build, perform the following:
./waf configurefollowed by
./wafto configure and build.
FTensor tests in directory
most of the package's possible operations, and the tests in directory
tests/speed compare how fast the FTensor classes are
compared to ordinary arrays. See the file
for more information about the two sets of tests.
To build and run the subset of conformance tests meant for compiler testing, do:
cd tests/conformance make CXX=<compiler> CXXOPTIMIZE="<flags>" test_compiler ./test_compiler
The conformance tests print out
followed by a unique test name. There should be no failures.
The path to the C++ compiler is defined in
CXX and the
compiler optimization options are defined in
in the Makefile. If you don't override them as shown above,
CXX will be
will be the flags that are normally used by FTensor developers and
users. Testing with the usual flags ensures that FTensor will work for
its users on your platform; testing with other optimizations might
uncover GCC bugs.
To build and run the performance tests using the optimizations that are normally used for them, simply do:
cd tests/speed make CXX=<compiler> CXXOPTIMIZE="<flags>" one_over one_over_fast ./one_over_script
In addition to printing timing information,
FAIL for each performance test,
followed by the unique test name. There should be no failures.
The timing information output by the script
tests/speed/one_over_script can be compared for different
versions of GCC, starting with version 3.1.
Cleanup (to prepare for a fresh run, e.g. with another version of the compiler), is done as follows:
(cd tests/conformance; make clean) (cd tests/speed; make clean)
Copyright (C) Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.