Cell/Quasar Educational Course

Download Report

Transcript Cell/Quasar Educational Course

IBM Systems & Technology Group
Cell/Quasar Ecosystem & Solutions Enablement
Cell Broadband Engine
Cell BE SDK for Multicore Acceleration
Version 3.0
Francesco Bertagnolli
System & Technology Group
1
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Class Objectives
 Things you will learn
– The Cell Broadband Engine™ (Cell BE) Software Development Kit for
Multicore Acceleration v3.0
Agenda

Cell BE SDK for Multicore Acceleration v3.0
1. Overview: Packaging and Installation
2. Runtime Environment
3. Program Development Tools
4. Development Libraries
5. Performance Tools
2
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Cell BE SDK for Multicore Acceleration v3.0
1- Overview: Packaging
3
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
SDK 3.0 Packages
Component
License
LibSPE2
GCC Compiler
Performance Tools (FDPR-PRO, PDT, PDTR), SPU Timing, OProfile
Development Libraries (ALF, DacS, BLAS, SIMDMath, MASS)
Cell Eclipse IDE
Examples, Demos Tutorial, Docs
XL C/C++ SS compilers
Mambo Simulator
4
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Cell BE SDK for Multicore Acceleration v3.0
2- Runtime Environment
> System Simulator
5
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
IBM Full-System Simulator
 Emulates the behavior of a full system that contains a Cell BE processor.
 Can start Linux on the simulator and run applications on the simulated
operating system.
 Supports the loading and running of statically-linked executable programs and
standalone tests without an underlying operating system.
 Simulation models
– Functional-only simulation
For code development and debugging.
– Performance simulation
For system and application performance analysis.
6
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Cell BE SDK for Multicore Acceleration v3.0
Program Development Tools
> gcc and GNU Toolchain
> XL C/C++ Compilers
> Eclipse IDE
7
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
GCC and GNU Toolchain
 Base toolchain
– Based on GCC 4.1.1 extended by PPE and SPE support
– binutils 2.18, SPE newlib 1.15.0+, GDB 6.6+
New hardware support
– Code generation for SPE with enhanced double precision FP
Contains the GCC compiler for the PPU and the SPU.
– ppu-gcc, ppu-g++, ppu32-gcc, ppu32-g++, spu-gcc, spu-g++
– For the PPU, GCC replaces the native GCC on PPC platforms and it is a
cross-compiler on x86. The GCC for the PPU is preferred and the
makefiles are configured to use it when building the libraries and
samples.
– For the SPU, GCC contains a separate SPE cross-compiler that
supports the standards defined in the following documents:
• C/C++ Language Extensions for Cell BE Architecture V2.4
• SPU Application Binary Interface (ABI) Specification V1.7
• SPU Instruction Set Architecture V1.2
8
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
XL C/C++/Fortran Compilers
 IBM XL C/C++ for Multicore Acceleration for Linux, V9.0 (dual source compiler)
 IBM XL Fortran for Multicore Acceleration for Linux, V11.1 (dual source
compiler)
 IBM XL C/C++ Alpha Edition for Multicore Acceleration, V0.9 (single source
compiler)
– Allows programmer to use OpenMP directives to specify parallelism on PPE and
SPE
9
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Eclipse IDE
 IBM IDE, which is built upon the Eclipse and C/C++ Development Tools
(CDT) platform, integrates Cell GNU tool chain, XLC/GCC compilers, IBM FullSystem Simulator for the Cell BE, and other development components in order
to provide a comprehensive, user-friendly development platform that simplifies
Cell BE development.
Cell IDE
CDT
Eclipse
10
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Cell IDE Key Features
 Cell C/C++ PPE/SPE managed make project support
 A C/C++ editor that supports syntax highlighting; a customizable
template; and an outline window view for procedures, variables,
declarations, and functions that appear in source code.
 Full configurable build properties.
 Integration of Cell BE Simulator into Eclipse
 Automatic makefile generator, builder, performance tools, and several
other enhancements.
 Support development platforms (x86, x86_64, Power PC, Cell)
 Performance tools Support .
 Automatic embedSPU integration
11
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Cell BE SDK for Multicore Acceleration v3.0
Development Libraries
>SIMD Math
>MASS
>BLAS
>FFT
>Monte carlo Random Number Generator
>SPU Timer
12
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group
Cell/Quasar Ecosystem & Solutions Enablement
Hands-on System Start&Check
Cell Programming Workshop
Cell Ecosystem Solutions Enablement
13
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Class Objectives – Things you will learn
For this class, we will create a Cell BE virtual machine which
provides a Cell program development environment with a host
Linux system and the current release of Cell SDK 3.0 and tools
Make sure to have a fully Cell operational environment under
VMware player
–Fedora 7 as host
–Cell SDK 3.0
–system simulator systemsim-cell
–Cell IDE
14
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Perform Cell VMware image installation
 Cell VMware image – Cell-VMWare-F7-SDK30
– Fedora 7 + Cell SDK 3.0 + IDE + XLC + Hands-on-30
 Assume your system is running under WinXP, and at least 512MB of RAM
– Copy all files to a windows directory, e.g., cellvm
• Cell-VMware-F7-SDK30-ddmm07.zip
• VMware-player-2.0.1-55017.exe (for Windows)
• VMware-player-2.0.1-55017.i386.rpm (for Linux)
– Unzip Cell-VMware-F7-SDK30-ddmm07.zip
– Install VMware player
15
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Check for correct system installation
!
 Start the VMware Player
– Select the correct virtual machine configuration file
– For the first time run, answer all questions using the default selected options
– Wait for the complete boot of the guest Fedora 7, then login
• Userid: root
• Password: inn0vate
– Open a terminal session and do “cat /proc/version” or “uname –a”, you
should see the kernel version 2.6.22.9-91.fc7
16
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Check for correct system components
 We should have at least the following directories
– /opt/cell (Cell SDK 3.0 installation script)
– /opt/cell/sdk (Cell SDK 3.0 top directory)
– /opt/cell/sdk/buildutils (Cell SDK 3.0 makefile files)
– /opt/cell/sdk/docs (Cell BE documentation)
– /opt/cell/sdk/src (Cell SDK 3.0 examples)
– /opt/ibm/systemsim-cell (Cell BE full system simulator)
– /opt/ibmcmp (IBM xlc and xlcpp)
– /home/student/eclipse (Cell BE Integrated Development Environment)
– /opt/cell_class (hands-on examples)
17
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Check for IDE Operational
 cd /home/student/eclipse
 ./eclipse
Note: eclipse should come up after ./eclipse was typed. If you don’t see it, it is
probably hidden and running behind some foreground windows. To see it,
you click on the screen to bring the background to foreground.
18
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group
Cell/Quasar Ecosystem & Solutions Enablement
Cell Broadband Engine
Linux on PS3
Francesco Bertagnolli
System & Technology Group
19
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Open Source Environment for Cell BE
Open source software choice to accelerate the development of an
ecosystem for the Cell architecture
– accelerated architecture validation ad debugging
– environment for early Cell adopters
– accelerated market deployment: familiar programming environment
steadily growing community of Cell developers
Yellow dog
Fedora
www.yellowdoglinux.com
20
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Install Linux on PS3
 We have:
– USB or Memory card
– DVD with Fedora (YLD)
– USB Keyboard and mouse
– Bootloader Installer (1 MB)
(otheros.self)
– Bootloader (otheros.bld)
21
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Software Development
Demo >>
www.ibm.irt.com
22
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
>>
1
23
2
Cell Programming Workshop
3
4
7/7/2015
© 2007 IBM Corporation
IBM Systems & Technology Group – Cell/Quasar Ecosystem & Solutions Enablement
Develop for Cell BE
If you want:
• System simulator
• Playstation 3
• IBM cell blade
(2xCell processor)
–
Remote access
–
Segrate!
www.yellowdoglinux.com
24
Cell Programming Workshop
7/7/2015
© 2007 IBM Corporation