sprite, a cute workaholic

Thursday, January 11, 2007

I will be taking course from ELE!

I will be taking ELE5140 (ELE is electronic engineering) in the coming semester, which is an unexpected event. I have also talked with a EE student which wants to pursue a degree in medicine after he graduates. I believe this would be an interesting course for me to take (and to meet with others with similar interests).

Also, it seems that Lap Chi's algorithm course (and also its web page, it is pretty difficult to find a pretty course home page in our department) is quite good. Hopefully it is good enough that it makes me interested in those theoretical stuff (and mathematics in general).

* * *

Yesterday night I have finished volume bounded proxy geometry for volume rendering, which takes much less time than I have expected (it took me one night only...). The resulting demo is pretty funny to play with. :D

* * *

I have attended a seminar on research today. Although it is mostly "standard" stuff such as "think outside the box", it does makes me think a little bit deeper about my own research topics and methods...

Thursday, January 04, 2007

Installing Cell SDK 2.0 on Debian etch (x86)

Warning: Technical stuff ahead.

Yesterday I have installed IBM Cell SDK 2.0 on Debian etch RC1 (x86). I followed the steps outlined in Daniel's page loosely (Daniel's page is for installing SDK v1.1).

  1. Download SDK v2.0
  2. Download additional RPMs from BSC:
    • ppu-binutils-3.3-72.i686.rpm
    • ppu-gcc-3.3-72.i686.rpm
    • ppu-gcc-c++-3.3-72.i686.rpm
    • ppu-gdb-3.3-72.i686.rpm
    • ppu-sysroot-3.3-6.noarch.rpm
    • ppu-sysroot64-3.3-6.noarch.rpm
    • spu-binutils-3.3-72.i686.rpm
    • spu-gcc-3.3-72.i686.rpm
    • spu-gcc-c++-3.3-72.i686.rpm
    • spu-gdb-3.3-72.i686.rpm
    • spu-newlib-3.3-72.i686.rpm
    • sysroot_image-2.0-7.noarch.rpm
  3. mount the iso image (CellSDK20.iso): mount -o loop CellSDK20.iso /directory/for/mounted/image.
  4. Copy the RPMs from the mounted image (/directory/for/mounted/image/software/):
    • cell-alf-2.0-3.noarch.rpm
    • cell-sdk-lib-samples-2.0-5.noarch.rpm
    • cell-spu-timing-2.0-3.i686.rpm
    • systemsim-cell-2.0-12.i386.rpm
    • xlc.cmp-8.1.0-12.i386.rpm
    • xlc.lib-8.1.0-12.i386.rpm
    • xlcpp.cmp-8.1.0-12.i386.rpm
    • xlcpp.help-8.1.0-12.i386.rpm
    • xlcpp.lib-8.1.0-12.i386.rpm
  5. (Optional) Copy the contents of the mounted image to another location for future access: cp -R /directory/for/mounted/image/ /directory/for/future/access/.
  6. Use apt-get or aptitude to install the following packages:
    • For converting from rpm to deb, can be removed after installation:
      • alien
    • Prerequisites:
      • freeglut3
      • freeglut3-dev
      • gcc
      • gcc
      • make
      • rsync
      • flex
      • byacc
      • tk8.4
      • tk8.4-dev
      • tcl8.4
      • tcl8.4-dev
    • X Window System:
      • xbase-clients for X11 forwarding, or;
      • x-window-system for local X server.
  7. Convert the RPMs to DEBs: alien -k --to-deb *.rpm
  8. Install the DEBs: dpkg -i *.deb
  9. Apply the following patch to a local copy of /directory/for/mounted/image/software/cellsdk:
    --- cd/software/cellsdk 2007-01-04 08:24:29.000000000 +0800
    +++ cellsdk     2007-01-04 22:11:49.000000000 +0800
    @@ -2487,7 +2487,7 @@
     shift
    
     case $TASK in
    -  install|depend|uninstall|build|synch|version|verify)
    +  debian|install|depend|uninstall|build|synch|version|verify)
         ;;
    
       -?|-h|--help|--usage)
    @@ -2519,6 +2519,11 @@
    
    
     case $TASK in
    +       debian)
    +               install_self
    +               integrate
    +               ;;
    +
            install)
                    check_first_install
                    install
    
  10. Run the install script (as root) to complete the installation: ./cellsdk debian
  11. Test your installation (courtesy of Daniel's tutorial):
    mkdir sandbox
    cd sandbox
    cp /opt/ibm/systemsim-cell/run/cell/linux/.systemsim.tcl .
    export PATH=/opt/ibm/systemsim-cell/bin:$PATH
    systemsim -g
    

This should be it, and use the above instructions at your own risk :). Hopefully it does not format your hard drive or produces smoke from your computer.

* * *

(Edited on 5 Jan 2007) You will need to run the following commands to copy the headers and libraries for libspe in order to compile SPE sample codes. (A ugly hack, but it works)

mount -o loop /opt/ibm/systemsim-cell/images/cell/sysroot_disk /mnt/cell-sdk-sysroot
mkdir -p /opt/ibm/cell-sdk/prototype/sysroot/usr/include
mkdir -p /opt/ibm/cell-sdk/prototype/sysroot/usr/lib
cp /mnt/cell-sdk-sysroot/usr/include/libspe.h /opt/ibm/cell-sdk/prototype/sysroot/usr/include
cp /mnt/cell-sdk-sysroot/usr/include/cbea_map.h /opt/ibm/cell-sdk/prototype/sysroot/usr/include
cp /mnt/cell-sdk-sysroot/usr/lib/libspe* /opt/ibm/cell-sdk/prototype/sysroot/usr/lib
umount /mnt/cell-sdk-sysroot

* * *

(Edited again on 5 Jan 2007) You will also need to install a newer version of GNU C Libary to run the compiler, you can install it from experimental using the following steps.

  1. Add this line to /etc/apt/sources.list: deb http://www.hk.debian.org/debian/ experimental main (Please choose your own mirror)
  2. apt-get update
  3. apt-get -t experimental install libc6