These instructions are for CLOC 1.3.2 (Nov 2016 Update). CLOC now installs from the ROCM apt server. Please remove old packages that you installed with dpkg -i before using the new apt server. These include amdcloc, libamdgcn, amdllvm, amdllvmbin, hlc, libhsakmt, hsa-runtime-dev, and hcc. Use the "dpkg -P" command to remove these packages.
This set of instructions can be used to install a comprehensive HSA software stack and the Cloc utility for Ubuntu. In addition to Linux, you must have an HSA compatible system such as a Kaveri processor, a Carrizo processor, or a fiji card. There are four steps to this process:
- 1. Prepare for Upgrade
- 2. Install ROCM Software
- 3. Install and Test CLOC
- 4. Optional Install of Infiniband Software
Make sure Ubuntu 14.04 LTS 64-bit version has been installed. Ubunutu 14.04 is also known as trusty. We recommend the server package set. The utica version of ubuntu (14.10) has not been tested with HSA.
After you install Ubuntu, add two additional repositories with these root-authorized commands:
sudo su -
add-apt-repository ppa:ubuntu-toolchain-r/test
wget -qO - http://packages.amd.com/rocm/apt/debian/rocm.gpg.key | apt-key add -
echo 'deb [arch=amd64] http://packages.amd.com/rocm/apt/debian/ trusty main' > /etc/apt/sources.list.d/rocm.list
apt-get update
apt-get upgrade
If you have Infiniband installed, uninstall the MLNX_OFED packages.
mount the appropriate MLNX_OFED iso
/<mount point>/uninstall.sh
Install rocm software packages and reboot your system with these commands:
sudo apt-get install rocm
sudo reboot
Execute this command:
sudo apt-get install amdcloc
Test the snack and cloc examples as follows.
cp -rp /opt/rocm/cloc/examples/snack/helloworld /tmp/.
cd /tmp/helloworld
./buildrun.sh
cp -rp /opt/rocm/cloc/examples/hsa/vector_copy_codeobject_rocm /tmp/.
cd /tmp/vector_copy_codeobject_rocm
make
make test
The HSA plugin for GCC 6 is currently experimental. It does not yet support discrete GPU cards such as fiji. We build versions of the development compiler for testing the GCC plugin for HSA. The latest version can be downloaded and installed as follows.
cd $HOME/git
git clone -b master https://github.com/HSAFoundation/hsa-openmp-gcc-amd
sudo dpkg -i hsa-openmp-gcc-amd/packages/ubuntu/rocmgcc6*.deb
Go to the Mellanox site and download the following MLNX_OFED iso package:
http://www.mellanox.com/page/products_dyn?product_family=26
2.4-1.0.4/Ubuntu/Ubuntu 14.10/x86_86/MLNX_OFED*.iso
Ubuntu 14.10 is the one that needs to be downloaded to be able to build and install with the 3.17 and 3.19 kernels
Mount the MLNX_OFED iso for Ubuntu 14.10
sudo /<mount point>/mlnxofedinstall --skip-distro-check
Edit /etc/network/interfaces to setup IPoIB (ib0)
On a couple of the systems, opensm should be run
sudo /etc/init.d/opensmd start
Load the IB/RDMA related kernel components
sudo /etc/init.d/openibd restart
Run this command
lsmod | egrep .ib_|mlx|rdma.
It should show 14 or more IB-related modules loaded.