This section explains how to install and run Sourcery VSIPL++ from a pre-built package. Pre-built Sourcery VSIPL++ packages are available from CodeSourcery's customer support portal. Visit your account http://www.codesourcery.com/VSIPLXX to download packages.
Sourcery VSIPL++ binary packages are available as RPM packages.
The following commands use RPM to unpack the binary distribution
into the location
/opt/sourceryvsipl++-2.2-9:
> rpm -i sourceryvsipl++-2.2-9-noarch.rpm
Sourcery VSIPL++ binary packages are distributed as compressed
Tape Archive (Tar) files that are intended to be installed in
the /opt directory. The following
commands use GNU Tar to unpack the binary distribution into the
location /opt/sourceryvsipl++-2.2-9:
> cd /opt
> tar -xjf path/to/sourceryvsipl++-2.2-9.tar.bz2
Replace path/to/sourceryvsipl++-2.2-9.tar.bz2 with
the location and name of the particular Sourcery VSIPL++ package you
are installing.
If you will be using pkg-config to determine compile and link
time options, you should include the directory
/opt/sourceryvsipl++-2.2-9/lib/pkgconfig
in your PKG_CONFIG_PATH environment variable:
> export PKG_CONFIG_PATH=/opt/sourceryvsipl++-2.2-9/lib/pkgconfig
The directory layout of the installed package is as follows:
`- opt
`- sourceryvsipl++-2.2-9
|- bin // General executables and scripts
| |- [arch] // Arch-specific binary files
| | `- [variant] // Variant-specific binary files
| | `- benchmarks // Benchmark executables
|- include
| |- vsip // Sourcery VSIPL++ Headers
| |- vsip_csl // CodeSourcery extensions
| `- ... // Other non-SV++ headers as necessary
|- lib
| |- [arch] // Arch-specific library files
| | `- [variant] // Variant-specific library files
| | `- pkgconfig // Variant-specific pkg-config
| `- pkgconfig // Pkg-config links for all variants
|- sbin // Installation scripts
`- share // Documentation and user files
|- doc
| `- sourceryvsipl++ // PDF and HTML documentation
`- sourceryvsipl++ // Example programs
Sourcery VSIPL++ binary packages contain a single set of shared library headers, and contain multiple library archives that are specialized by processor architecture they support and external libraries they use. These libraries are organized into lib/[arch]/[variant] directories, where [arch] is the processor architecture, and [variant] is the variant. For example, the GNU/Linux x86 binary package supports the ia32 and em64t architectures.
The [variant] subdirectory indicates which external libraries the VSIPL++ library is configured to use, and what level of optimization the library has been built with. For example, the GNU/Linux x86 binary package provides the following 4 variants built with high level of optimization (for release software): par-builtin, which uses LAM/MPI and the builtin ATLAS and FFTW3 libraries, par-intel, which uses LAM/MPI and the Intel IPP and MKL libraries, ser-builtin, which uses just the builtin ATLAS and FFTW3 libraries with no MPI, and ser-intel, which uses just the Intel IPP and MKL libraries with no MPI. In addition, 4 corresponding variants with debug optons: par-builtin-debug, par-intel-debug, ser-builtin-debug, and ser-intel-debug.
If you install Sourcery VSIPL++ into a directory other than
opt/sourceryvsipl++-2.2-9, you must run
the set-prefix.sh script to update the
installation prefixes stored in the library's pkg-config
.pc files.
The set-prefix.sh is located in the
sbin subdirectory of the tarball.
For example, to install a binary package in
$HOME/sourceryvsipl++-2.2-9:
Example 2.1. Installing a binary package in $HOME
> cd $HOME > tar xfj sourceryvsipl++-2.2-9.tar.bz2 > $HOME/sourceryvsipl++-2.2-9/sbin/set-prefix.sh > export PKG_CONFIG_PATH=$HOME/sourceryvsipl++-2.2-9/lib/pkgconfig
Sourcery VSIPL++ binary packages that use the following external libraries have the library installation paths hard-coded in their pkg-config files (install path in parenthesis):
Intel IPP (/opt/intel/ipp).
Intel MKL (/opt/intel/mkl).
If these libraries are not installed in these locations, it is necessary to do one of the following:
Update the pkg-config file paths using set-prefix.sh.
Create a symbolic link from the default install location to the actual install location.
Manually specify the paths to the libraries on each invocation of pkg-config.
Each of the options is described in more detail below.
The set-prefix.sh script in the
sourceryvsipl++-2.2-9/sbin will update
the pkg-config files with the correct installation
prefixes for external libraries. set-prefix.sh
takes arguments of the form ipp:/prefix/to/ipp,
mkl:/prefix/to/mkl, and
mpi:/prefix/to/mpi, to specify prefixes for IPP,
MKL, and MPICH respectively.
For example, if the library has been installed into
/opt/sourceryvsipl++-2.2-9 and IPP
is installed in /opt/intel/ipp41:
Example 2.2. Using set-prefix.sh to use IPP from different prefix
> /opt/sourceryvsipl++-2.2-9/sbin/set-prefix.sh ipp:/opt/intel/ipp41
If multiple prefixes need to be changed, set-prefix.sh can either be called once with multiple prefixes:
> /opt/sourceryvsipl++-2.2-9/sbin/set-prefix.sh \
ipp:/opt/intel/ipp41 mkl:/opt/intel/mkl821Or multiple times, once for each prefix:
> /opt/sourceryvsipl++-2.2-9/sbin/set-prefix.sh ipp:/opt/intel/ipp41 > /opt/sourceryvsipl++-2.2-9/sbin/set-prefix.sh mkl:/opt/intel/mkl821
Using symbolic links, it is possible to direct Sourcery VSIPL++'s expected directory to the actual installation libraries.
For example, if IPP is installed in
/opt/intel/ipp41:
Example 2.3. Using a symbolic link to use IPP from different prefix
> ln -s /opt/intel/ipp41 /opt/intel/ipp
Finally, it is possible to manually pass the prefixes for external libraries to pkg-config program on each invocation.
For example, if IPP is installed in
/opt/intel/ipp41 and that MKL is
installed in /opt/intel/mkl821, to
query --libs from pkg-config:
Example 2.4. Overriding library prefixes from the command line
LIBS = `pkg-config \
--define-variable=ipp_prefix=/usr/local/ipp41 \
--define-variable=mkl_prefix=/usr/local/mkl821 \
--libs vsipl++`