3. Installing AOCL#
3.1. Building from Source#
You can download the following open-source libraries of AOCL from GitHub and build from source:
AOCL-BLAS (amd/blis)
AOCL-LAPACK (amd/libflame)
AOCL-FFTW (amd/amd-fftw)
AOCL-LibM (amd/aocl-libm-ose)
AOCL-ScaLAPACK (amd/aocl-scalapack)
AOCL-Sparse (amd/aocl-sparse)
AOCL-Cryptography (amd/aocl-crypto)
AOCL-Compression (amd/aocl-compression)
AOCL-LibMem (amd/aocl-libmem)
AOCL-Utils (amd/aocl-utils)
AOCL-DA (amd/aocl-da)
The details on installing from source for each library are explained in the later sections. For more information on Spack-based installation of AOCL libraries, refer to AMD Developer Central (https://www.amd.com/en/developer/zen-software-studio/applications/spack/spack-aocl.html).
3.2. Installing AOCL Binary Packages#
The section describes the procedure to install AOCL binaries on Linux and Windows.
3.2.1. Using Master Package#
Complete the following steps to install the AOCL library suite:
Download the AOCL tar packages from the Download (https://www.amd.com/en/developer/aocl.html#downloads) section to the target machine.
Use the command
tar -xvf <aocl-linux-<compiler>-5.0.0.tar.gz>
to untar the package. The installer fileinstall.sh
is available inaocl-linux-<compiler>-5.0.0
.Run
./install.sh
to install the AOCL package (all libraries) to the defaultINSTALL_PATH: /home/<username>/aocl/5.0.0/<compiler>
, where the compiler value is aocc or gcc.Use
install.sh
to print the usage of the script. A few supported options are:Table 3.1 install.sh Script Options# Option
Description
-h
Print the help.
-t
Custom target directory to install libraries.
-l
Library to be installed.
-i
Select LP64/ILP64 libraries to be set as default.
To install the AOCL package in a custom location, use the installer with the option:
-t <CUSTOM_PATH>
. For example,./install.sh -t /home/<username>
.You can use the master installer to install the individual library out of the master package. The library names used are blis, libflame, libm, scalapack, rng, secrng, fftw, compression, crypto, aocl-da, and sparse. You can do one of the following:
To install a specific library, use the option:
-l <library name>
. For example,./install.sh -l blis
.Install the individual library in a path of your choice. For example,
./install.sh -t /home/amd -l libm
.
AOCL libraries support the following two integer types:
LP64 libraries and header files are installed respectively in the following paths: -
/INSTALL_PATH/lib_LP64
-/INSTALL_PATH/include_LP64
ILP64 libraries and header files are installed respectively in the following paths: -
/INSTALL_PATH/lib_ILP64
-/INSTALL_PATH/include_ILP64
Note
AOCL-Compression supports only LP64; AOCL-FFTW supports LP64 and ILP64 in single binary using a different set of APIs.
By default, LP64 libraries and header files are available in
/INSTALL_PATH/lib
and/INSTALL_PATH/include
respectively.Suffix
./install.sh
with-i <lp64/ilp64>
to:Set the LP64 libraries as the default libraries, use the installer with the option:
-i lp64
. For example,./install.sh -t /home/amd -l blis -i lp64
.This installs only AOCL-BLAS library in the path
/home/amd
and sets LP64 AOCL-BLAS libraries as the default.Set ILP64 libraries as the default use the installer with the option:
-i ilp64
. For example,./ install.sh -i ilp64
.This installs all AOCL libraries in the default path and sets ILP64 libraries as the default.
3.2.2. Using Library Package#
Refer to the AOCL home page (https://www.amd.com/en/developer/aocl.html#downloads) to download the individual library binaries from the respective pages.
For example, AOCL-BLAS and AOCL-LAPACK tar packages are available in the BLAS library page (https://www.amd.com/en/developer/aocl/blas.html).
3.2.3. Using Debian and RPM Packages#
The Debian and RPM packages of AOCL are available in the Download section (https://www.amd.com/en/developer/aocl.html#downloads).
The package name used in the following installation procedure is based on the ‘gcc’ build. For the AOCC build, you can replace ‘gcc’ with ‘aocc’.
3.2.3.1. Installing Debian Package#
Complete the following steps to install the AOCL Debian package:
Download the AOCL 5.0 Debian package to the target machine.
Check the installation path before installing.
$ dpkg -c aocl-linux-gcc-5.0.0_1_amd64.deb
Install the package.
$ sudo dpkg -i aocl-linux-gcc-5.0.0_1_amd64.deb Or $ sudo apt install ./aocl-linux-gcc-5.0.0_1_amd64.deb
Note
You must have the sudo privileges to perform this action.
Display the installed package information along with the package version and a short description.
$ dpkg -s aocl-linux-gcc-5.0.0
List the contents of the package.
$dpkg -L aocl-linux-gcc-5.0.0
AOCL libraries support the following two integer types:
LP64 libraries and header files are installed in
/INSTALL_PATH/lib_LP64
and/INSTALL_PATH/include_LP64
respectively.ILP64 libraries and header files are installed in
/INSTALL_PATH/lib_ILP64
and/INSTALL_PATH/include_ILP64
respectively.
Note
AOCL-Compression supports only LP64; AOCL-FFTW supports LP64 and ILP64 in single binary using a different set of APIs.
By default, LP64 libraries and header files are available in
/INSTALL_PATH/lib
and/INSTALL_PATH/include
respectively, where:INSTALL_PATH:
/opt/AMD/aocl/aocl-linux-<compiler>-5.0.0/<compiler>
Compiler: aocc or gcc
For example, INSTALL_PATH for aocc compiler is:
/opt/AMD/aocl/aocl-linux-aocc-5.0.0/aocc
To change the default library path to ILP64 / LP64, use the script as follows:
$ cd /opt/AMD/aocl/aocl-linux-<compiler>-5.0.0/aocc $ sudo bash set_aocl_interface_symlink.sh <ilp64 / lp64>
3.2.3.2. Uninstalling Debian Package#
Execute one of the following commands to uninstall the AOCL Debian package:
$ sudo dpkg -r aocl-linux-gcc-5.0.0
or
$ sudo apt remove aocl-linux-gcc-5.0.0
3.2.3.3. Installing RPM Package#
Complete the following steps to install the AOCL RPM package:
Download the AOCL 5.0 RPM package to the target machine.
Install the package.
$ sudo rpm -ivh aocl-linux-gcc-5.0.0-1.x86_64.rpm
Note
You must have the sudo privileges to perform this action.
Display the installed package information along with the package version and a short description.
$ rpm -qi aocl-linux-gcc-5.0.0.x86_64
List the contents of the package.
$ rpm -ql aocl-linux-gcc-5.0.0
AOCL libraries support the following two integer types:
LP64 libraries and header files are installed in
/INSTALL_PATH/lib_LP64
and/INSTALL_PATH/include_LP64
respectively.ILP64 libraries and header files are installed in
/INSTALL_PATH/lib_ILP64
and/INSTALL_PATH/include_ILP64
respectively.
Note
AOCL-Compression supports only LP64; AOCL-FFTW supports LP64 and ILP64 in single binary using a different set of APIs.
By default, LP64 libraries and header files are available in
/INSTALL_PATH/lib
and/INSTALL_PATH/include
respectively.Where,
INSTALL_PATH:
/opt/AMD/aocl/aocl-linux-<compiler>-5.0.0/<compiler>
Compiler: aocc or gcc
For example, INSTALL_PATH for aocc compiler is:
/opt/AMD/aocl/aocl-linux-aocc-5.0.0/aocc
To change the default library path to ILP64 / LP64, use the script as follows:
$ cd /opt/AMD/aocl/aocl-linux-<compiler>-5.0.0/aocc $ sudo bash set_aocl_interface_symlink.sh <ilp64 / lp64>
3.2.3.4. Uninstalling RPM Package#
Execute the following command to uninstall the AOCL RPM package:
$ rpm -e aocl-linux-gcc-5.0.0
3.2.3.5. Setting Environment Using Modules#
- Prerequisites
Install modules on your system.
Set AOCL environment using module file:
After installing aocl-linux-<compiler>-5.0.0.tar.gz file on your system, set AOCL environment using module file generated on the installed path using below commands.
$ module load ./aocl-linux-aocc-5.0_module $ module load ./aocl-linux-gcc-5.0_module
To unset AOCL environment using module file:
$ module unload ./aocl-linux-aocc-5.0_module $ module unload ./aocl-linux-gcc-5.0_module
3.2.3.6. Using Package Config#
Package config is enabled for AOCL-BLAS, AOCL-LAPACK, and AOCL-Utils libraries.
Set PKG_CONFIG_PATH:
After installing aocl-linux-<compiler>-5.0.0.tar.gz file on your system, set PKG_CONFIG_PATH to the package config file where .pc files are located.
$ export PKG_CONFIG_PATH=<INSTALL_PATH>/lib/pkgconfig:$PKG_CONFIG_PATH After setting the path, compile the code using the pkg-config commands. An example for aocl-utils is shown here:
$ g++ cpuid_example.cc `pkg-config --cflags --libs aocl-utils`
Note: Package config has support to link with shared binaries only. For static linking, you need a work around to keep only static binaries in the PKG_CONFIG_PATH or build library with only static.
3.2.4. Using Windows Packages#
3.2.4.1. Installing a Windows Package#
Complete the following steps to install the AOCL Windows package:
Download the AOCL Windows installer from the Download (https://www.amd.com/en/developer/aocl.html#downloads) section.
Double-click the executable. The installation wizard is displayed.
Click the Next button.
Accept the License Agreement and click the Next button.
Select the libraries to be installed and the destination folder.
Click the Install button to begin the installation.
Click the Finish button to complete the installation.
3.2.4.2. Uninstalling a Windows Package#
Complete the following steps to uninstall the AOCL Windows binaries:
Double-click the AOCL Windows installer.
Click the Remove button.
Alternatively, you can also use the Add or remove programs option in Windows.
Click the Finish button to complete the uninstallation.