NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

MCSDK HPC 3.0.0 Beta Getting Started Guide On Slayton

From Texas Instruments Wiki
Jump to: navigation, search

TIBanner.png


HPC (High Performance Computing) Development Tools for MCSDK

Version 3.0.0 Beta

Getting Started Guide

Last updated: 06/11/2014


Introduction[edit]

The Multicore Software Development Kit (MCSDK) provides foundational software for TI KeyStone II platforms, by encapsulating a collection of software elements and tools for both the A15 and the DSP. MCSDK-HPC (High Performance Computing), built as an add-on on top of the foundational MCSDK, provides HPC specific software modules and algorithm libraries along with several out of box sample applications. As highlighted in the picture below, SDKs together provides complete development environment [A15 + DSP] to offload HPC applications to TI C66x multi-core DSPs.

Multicore Software Dev Kit New1.png


Listed below are the key components provided by MCSDK-HPC and a brief description about them:

Category Details
OpenCL OpenCL (Open Computing Language) is a multi-vendor open standard for general-purpose parallel programming of heterogeneous systems that include CPUs, DSPs and other processors. OpenCL is used to dispatch tasks from A15 to DSP cores
OpenMP Parallelization on DSP Use OpenMP to achieve parallelize task execution between multiple C66x cores using #pragmas
OpenMPI Run on A15 cluster and use OpenMPI to allow multiple K2H nodes to communicate and collaborate.


Specifically, this Getting Started Guide for MCSDK-HPC provides information needed for running out of box MCSDK-HPC sample applications, recompiling MCSDK-HPC, and developing customer's HPC application leveraging MCSDK-HPC. By the end of this Getting Started Guide the user should have:

  • Installed pre-requisite software for MCSDK-HPC
  • Installed MCSDK-HPC along with the pre-built sample applications
  • Run the out-of-box MCSDK-HPC sample applications on TI KeyStone II devices
  • Recompiled MCSDK-HPC if needed
  • Obtained instructions on how to develop customer's HPC application leveraging MCSDK-HPC


Acronyms[edit]

The following acronyms are used throughout this wiki page.

Acronym Meaning
BLAS Basic Linear Algebra Software
BOC Breakout Cards
CCS Texas Instruments Code Composer Studio
DSP Digital Signal Processor
EVM Evaluation Module, hardware platform containing the Texas Instruments DSP
FFT Fast Fourier Transform
HPC High Performance Computing
IPC Inter-Processor Communication
MCSDK Texas Instruments Multi-Core Software Development Kit
OpenCL Open Computing Language
OpenMP Open Multi-Processing
OpenMPI Open Source Message Passing Interface
TI Texas Instruments
.ipk Debian-style software installation package used by the opkg package management system.


Supported Devices/Platforms[edit]

This release supports the following devices/platforms:

Platform Supported Devices Supported Hardware
[K2H] TCI6636K2H HP ProLiant m800


Slayton Pre-requisites and Setup[edit]

System ROM Firmware[edit]

The System ROM firmware version may be queried from the chassis manager with the following command:
<syntaxhighlight lang="bash">

 > show firmware revisions c1
         Firmware Revisions:
           c1: #Cartridge 1
             Product Name: ProLiant m800 Server Cartridge
             Cartridge Satellite Firmware: 10/18/2013
  -------->  Cartridge System ROM Firmware: 01/99/2014
             Cartridge Data: 08/29/2013
             Cartridge Mezz 1 Data: 09/12/2013
             Cartridge Programmable Logic Device: 04
             Expander A Firmware: 1.1.0 db 5
             Expander B Firmware: 1.1.0 db 5

</syntaxhighlight>
The Cartridge System ROM Firmware may be updated by running the following command from the chassis manager:
<syntaxhighlight lang="bash"> update firmware <http server>/ProLiant_m800_Server_ROM_U01_2014_01_99.HPb c1 </syntaxhighlight>

Ubuntu Version[edit]

The Ubuntu version can be queried from command prompt:
<syntaxhighlight lang="bash"> > uname -a Linux k2hnode1 3.8.0-1701-keystone #0-Ubuntu SMP Sat Nov 30 02:43:59 UTC 2013 armv7l armv7l armv7l GNU/Linux </syntaxhighlight>

If the Ubuntu version needs to be updated, use the following commands:
<syntaxhighlight lang="bash"> sudo apt-get update sudo apt-get dist-upgrade </syntaxhighlight>

Set System Clock[edit]

Add network time server in /etc/rc.local if needed. For example:

<syntaxhighlight lang="bash"> > sudo ntpdate 128.247.5.20 157.170.1.4 157.170.147.6 Or > sudo date 0225080014 </syntaxhighlight>

Establish Two K2H Nodes for OpenMPI Demos[edit]

The steps below establish two K2H nodes on a trust-worthy network so that they can communicate securely in OpenMPI applications. Bypass these steps for non-OpenMPI demos.

1. Modify /etc/hostname to use k2hnode1 for K2H node 1 and k2hnode2 for K2H node 2.

2. Find IP addresses of the K2H nodes (eth0) using ifconfig. Then, edit /etc/hosts of both K2H nodes to include IP addresses of both K2H nodes and their corresponding hostname.

<syntaxhighlight lang="bash"> 127.0.0.1 localhost.localdomain localhost [ip address of K2HEVM node1] k2hnode1 [ip address of K2HEVM node2] k2hnode2 </syntaxhighlight>

3. For both K2H nodes, add mpiuser (user: mpiuser, password: gguser502) if it has not been added earlier.

<syntaxhighlight lang="bash"> sudo adduser mpiuser </syntaxhighlight>

4. Do SSH between the two nodes.

Reboot both K2H EVM nodes, log in as mpiuser on both setups and then do SSH.

<syntaxhighlight lang="bash"> [k2hnode1] ssh mpiuser@k2hnode2, accept [w/ yes] then exit [k2hnode2] ssh mpiuser@k2hnode1, accept [w/ yes] then exit </syntaxhighlight>

After this step, file ~/.ssh/known_hosts (/home/mpiuser/.ssh/known_hosts) is properly set with information about the other node.

5. Set the password for root (user: root, password: gguser502) and then do SSH.

<syntaxhighlight lang="bash"> root@k2hnode1# passwd [k2hnode1] ssh root@k2hnode2, accept [w/ yes] then exit [k2hnode2] ssh root@k2hnode1, accept [w/ yes] then exit </syntaxhighlight>

After this step, file ~/.ssh/known_hosts is updated with the root as user.


MCSDK-HPC Installation[edit]

Install TI CGtools[edit]

Download the latest TI CGTools 7.6.x for ARM from TI CGTools 7.6.x Download. Then, run the commands below to install TI CGTools for arm on the file system under /opt/ti directory.
<syntaxhighlight lang="bash"> mkdir -p /opt/ti cp <path_to_installer>/ti_cgt_C6000_<VER>_armlinuxa8hf_installer.sh /opt/ti cd /opt/ti chmod +x ti_cgt_C6000_<VER>_armlinuxa8hf_installer.sh sudo ./ti_cgt_C6000_<VER>_armlinuxa8hf_installer.sh </syntaxhighlight>

Prepare Slayton to fetch TI packages from PPA[edit]

Add launchpad PPA ti-keystone-team/ti-keystone-ppa repository
<syntaxhighlight lang="bash"> export http_proxy="http://<your_proxy>:<port>" export https_proxy="http://<your_proxy>:<port>" sudo apt-get install python-software-properties sudo -E apt-add-repository ppa:marcola-team/ppa sudo -E apt-add-repository ppa:ti-keystone-team/ti-keystone-ppa </syntaxhighlight>

Install MCSDK-HPC Dependent Packages in PPA[edit]

Use the following commands to fetch the latest MCSDK-HPC (keystone-hpc) from PPA
<syntaxhighlight lang="bash"> sudo apt-get update sudo apt-get install keystone-hpc </syntaxhighlight>

Install MCSDK-HPC Dependent Packages not in PPA yet[edit]

Install mcsdk-hpc_<ver>-slayton_setuplinux.bin to a directory, e.g.,
<syntaxhighlight lang="bash"> > chmod +x mcsdk-hpc_<ver>-slayton_setuplinux.bin > ./mcsdk-hpc_<ver>-slayton_setuplinux.bin </syntaxhighlight>

Install MCSDK-HPC Binaries and Demos[edit]

MCSDK HPC components are provided as binary packages in the directory mcsdk-hpc_<ver>/images. These packages may be installed on Slayton with the following commands:
<syntaxhighlight lang="bash"> sudo dpkg -i opencl_<VER>_armhf.ipk sudo dpkg -i openmpacc_<VER>_armhf.ipk sudo dpkg -i ti-openmpi_<VER>_armhf.ipk sudo dpkg -i mcsdk-hpc-cfg_<VER>_armhf.ipk sudo ./gen_boot-scr.sh </syntaxhighlight>

Installing mcsdk-hpc-cfg_<VER>_armhf.ipk will create /etc/profile.d/mcsdk-hpc-profile.sh. In this file, modify TI_OCL_CGT_INSTALL as needed to point to the full installation path of TI CGtools. Please note that currently, TI_OCL_CGT_INSTALL is set to /opt/ti/c6000_cgt_7.6.0B1, where as when you install CGT, it may create a folder with name 'c6000_7.6.0B1'. Please update TI_OCL_CGT_INSTALL to point to the correct installation directory

The HPC pre-compiled demos are provided in a tar file at [mcsdk install dir]/mcsdk-hpc_<version>/images directory. Extract it to some directory within the user's home directory on the file system. <syntaxhighlight lang="bash"> > tar -xzvf demos.tar.gz </syntaxhighlight>

Reboot Slayton[edit]

The installation is now complete. Please reboot Slayton

Running Out of box Sample Applications[edit]

MCSDK-HPC provides multiple categories of demo applications to demonstrate OpenCL, OpenMPI, OpenMP, OpenMP accelerator Model run times. Please follow README under each demo folder to find instructions for running the demos. Log in as root to run the demos.

Please refer to User Guides below for more information about the three categories of HPC demo applications.


Recompiling MCSDK-HPC and Sample Applications[edit]

Install MCSDK[edit]

Please visit MCSDK HPC download page to look for the download link of MCSDK to be used with the HPC release. Click the MCSDK download link to open the MCSDK product download page, and then download the MCSDK installer for native Linux (mcsdk_native<ver>_native_setuplinux.bin), please change the attribute of the installer to executable and run the installer as shown below. Install MCSDK to the directory where MCSDK-HPC has been installed.
<syntaxhighlight lang="bash"> > chmod +x mcsdk_native<ver>_native_setuplinux.bin > ./mcsdk_native<ver>_native_setuplinux.bin </syntaxhighlight>

Steps to Recompile MCSDK-HPC[edit]

Then, follow the steps below to cross-compile HPC on a Ubuntu Desktop.

1. Modify variables in setup_hpc_env.sh as needed to point to install location of MCSDK 3.0.x, MCSDK-HPC, TI CGTools, and etc. <syntaxhighlight lang="bash"> TI_INSTALL_DIR=~/ti:/opt/ti LINARO_INSTALL_PATH=~/linaro:~/ti/linaro TI_CGT_INSTALL_PATH=~/ti:/opt/ti MCSDK_INSTALL_PATH=~/ti MCSDK_HPC_INSTALL_PATH=~/ti

...

TI_SEARCH_PATH=~/ti:/opt:/opt/ti:/usr/src:/usr/src/dsp </syntaxhighlight>

If needed, modify the following line in MCSDK-HPC-BOM.txt to point to the installation folder name of TI CGTools. Please note that the version number may need to be changed also if a later version of TI CGTools 7.6.x is downloaded and installed. <syntaxhighlight lang="bash"> all:C6X_GEN:c6000_7.6.0B1 </syntaxhighlight>

Also modify TI_OCL_CGT_INSTALL as needed in <mcsdk-hpc dir>/patches/targetfs/mcsdk-hpc-profile.sh to point to the full installation path of TI CGtools.

2. Set environment variables using script in top folder.

<syntaxhighlight lang="bash"> source setup_hpc_env.sh </syntaxhighlight> Running the above command will check if all the required components can be located. It reports error when there are missing components. Ensure all the components are installed and the installation directory have been correctly set in setup_hpc_env.sh.

3. Configure openmpi and cmem.

<syntaxhighlight lang="bash"> make config </syntaxhighlight>

4. Compile sdk and openmpi.

<syntaxhighlight lang="bash"> make </syntaxhighlight>

5. Install openmpi, mpm-transport, and opencl.

<syntaxhighlight lang="bash"> sudo make install </syntaxhighlight>

6. Configure demos

<syntaxhighlight lang="bash"> make config_demos </syntaxhighlight>

7. Compile demos

<syntaxhighlight lang="bash"> make demos </syntaxhighlight>

8. Install demos to a specified INSTALL_DIR, e.g.,

<syntaxhighlight lang="bash"> sudo make install_demos INSTALL_DIR=/home/mpiuser </syntaxhighlight>


Write Customer's Application on top of MCSDK-HPC[edit]

The out of box demos provided by MCSDK-HPC can facilitate users to write their own HPC applications. Please refer to the links below for code walk through for OpenCL, OpenMP, and OpenMPI applications.


Useful Resources and Links[edit]

Product Download and Updates[edit]

For product download and updates, please visit the links listed in the table below.

Product Download Link
MCSDK HPC Download http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk_hpc/latest/index_FDS.html
MCSDK Download http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk/3_00_04_17/index_FDS.html
TI CGTools Download https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/beta.htm


Troubleshooting[edit]

Listed below are some Frequently Asked Questions. Please click on the "Expand" link adjacent to any question to see the answer.

  • I see an error "pycurl.error: (60, 'server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none')" when doing apt-add-repository
You'll see the issue when ‘date’ is not set up correctly. Please set up the date as mentioned in the set up above"
  • New Question Template
Here is the answer"

For more questions and answers, please visit MCSDK-HPC Trouble Shooting Wiki.


E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK HPC 3.0.0 Beta Getting Started Guide On Slayton here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK HPC 3.0.0 Beta Getting Started Guide On Slayton here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article MCSDK HPC 3.0.0 Beta Getting Started Guide On Slayton here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article MCSDK HPC 3.0.0 Beta Getting Started Guide On Slayton here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article MCSDK HPC 3.0.0 Beta Getting Started Guide On Slayton here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MCSDK HPC 3.0.0 Beta Getting Started Guide On Slayton here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MCSDK HPC 3.0.0 Beta Getting Started Guide On Slayton here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article MCSDK HPC 3.0.0 Beta Getting Started Guide On Slayton here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article MCSDK HPC 3.0.0 Beta Getting Started Guide On Slayton here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity