FTensor build and test guide

This page is a guide to running the testing and timing programs for the FTensor tensor class library as part of GCC integration testing.

Resource usage

The uncompressed distribution comprises some 2.9 MB of source files.

Prepare

To prepare for a build, perform the following:

Testing

FTensor tests in directory tests/conformance exercise 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 tests/README 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 PASS or FAIL 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 CXXOPTIMIZE in the Makefile. If you don't override them as shown above, CXX will be g++ and CXXOPTIMIZE 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, one_over_script prints out PASS or FAIL for each performance test, followed by the unique test name. There should be no failures.

Timing

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

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)
For questions related to the use of GCC, please consult these web pages and the GCC manuals. If that fails, the gcc-help@gcc.gnu.org mailing list might help. Comments on these web pages and the development of GCC are welcome on our developer list at gcc@gcc.gnu.org. All of our lists have public archives.

Copyright (C) Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

These pages are maintained by the GCC team. Last modified 2023年03月11日.

AltStyle によって変換されたページ (->オリジナル) /