IntBLAS

Interval Basic Linear Algebra Subroutines


This package, IntBLAS, contains a C++ implementation of the 2002 Interval Basic Linear Algebra Subroutines (BLAS) standard with built-in interval arithmetic. It is ready to install on machines with GCC or Microsoft Visual Studio .NET 2003.

Successful installation should result two static libraries: an optimized library called intblas.lib and a debug version called intblas_d.lib. The unit testing program can also be built.

This library is licensed under the GNU LGPL (Lesser General Public License). For a copy of the license, see the 'LICENSE' file.

  1. Bug reports
  2. Installation
    1. Windows, using Visual Studio .Net 2003
    2. Linux/Unix using GCC
    3. Other platforms
  3. Usage

Bug Reports

To report bugs email me at mike_nooner@yahoo.com Be sure to include IntBLAS in the subject line so your email is not mistaken for spam.


Installation

The library is easy to install. The installation procedures outlined here have been tested using Ubuntu Linux, Windows, and Solaris (requires GCC and make).

Visual Studio .Net 2003

  1. Go to the vs folder.
  2. Open the folder bin. Here you will see three batch files. If your Visual Studio installation path is not "C:\Program Files\Microsoft Visual Studio .NET 2003" then edit the var.bat file and change the %VSPATH% variable to the correct path of your Visual Studio .Net 2003 installation.
  3. Run install.bat (by double-clicking the icon) This will build and install the libraries, header file, and documentation. The documentation for the library can be found in the %VSPATH%\Vc7\IntBLAS-1.0 directory. Be aware that there is copious output, the batch file will notify you if there are any errors, and pause so you can safely ignore most of the output. Two libraries are built intblas_d.lib and intblas.lib. The former contains debugging information, while the later is optimized but contains no debugging information.
  4. You can uninstall the library by running the uninstall.bat file.

Linux/Unix using GCC

To install this library you will need GCC and make. By default the libraries are installed in /usr/lib, the header file is located in /usr/include, and the documentation is located in /usr/share/doc/IntBLAS-1.0. If these are not the paths you desire then you can make the appropriate changes to the configuration section of the Makefile.

  1. Open a console
  2. Go to the packages gcc folder
  3. Type make install Two libraries are built intblas_d.lib and intblas.lib. The former contains debugging information, while the later is optimized but contains no debugging information.
  4. Type make test to create the unit testing application.
  5. To uninstall the package type make uninstall

Other Platforms

The above installation procedures can be used on the three platforms we use for testing. The library is tested using Ubuntu Linux, Windows XP, and Solaris on a 64-bit SPARC. If you wish to run the library on another system, the easiest way is probably to edit the Makefile for GCC to have it use your compiler and installation paths. The code itself is written in ANSI/ISO standard C++, therefore as long as your compiler is standards compliant, the code should compile without error. Next, you will need to know if the library works. This is the purpose for including the unit tests with the distrobution.

You can run the standard test cases for the library using the packaged tester application. On Windows machines this file is built automatically when you run install.bat and is called %VSPATH%\Vc7\IntBLAS-1.0\test.exe. On Linix and Unix you you must run make test and it will build ./test.

The test application is used to run the standard test cases. The application is console based. From the appropriate directory, i.e. either gcc or %VSPATH%\Vc7\IntBLAS-1.0, type test -h for a listing of the available options.

The test application runs four sets of tests. The first three test whether the Interval, IntervalVector, and/or IntervalMatrix classes function properly. You can set which of these sets of tests to run using the -i, -v, and -m options respectivly. The final set of tests, test for correctness in selected operations. This is done by performing a number of the operations using random numbers. The operations tested include matrix-matrix multiplication multiplication, matrix-vector multiplication, matrix scaled accumulation, and vector scaled accumulation. You can set the number of iterations using the -r option. Finally it is a good idea to pass in a file name as an option. This will cause the pass/fail output to be placed into the file. Otherwise the pass/fail output will be written to the screen.

Example:

> test -i -m dump.txt
This will cause the Interval and IntervalMatrix classes to be tested and the output will be written to the file dump.txt, further the IntervalVector and correctness tests will be skiped.

> test -r 40
This will cause only the correctness tests to be run and each test will perform fourty repetitions, the output of which will be written to the screen.

Usage

The IntBlas library is easy to use, it is simply a static library. Sample C++ programs in the sample directory are ready to be compiled and run.

  1. Include the file <IntBLAS.h> in your source file(s).
  2. All classes, functions, global variables, etc. are defined in the intblas namespace. So make the appropriate using declarations.
  3. You need to call the function INIT_INTERVAL() before making use of any of the classes, functions, or global variables.
  4. Finally you will need to instruct your compiler to link to intblas.lib or intblas_d.lib as appropriate. It should be in the compiler's search path.