Thursday, March 29, 2012

Migrate your fav. packages to a new workstation.



Lovely Package Exchange #1

Once in a while we are setting up our workstations - yet again.
I often faced the problem to migrate my finest selection of packages from my former system, to the new one.
Groups are surely one way to install roughly those packages you need on the new system, but in very rare cases your package selection is unique.

The following snippet might help you, to install the packages of DA_OLD_HOST on your new system.
On your new host:
$ ssh $DA_OLD_HOST 'rpm -qa --qf "%{NAME}\n"' \
  | xargs yum install -y --skip-broken

Hint: It seems as if something is broken with the fedora mirros, you can work around problems by commenting the mirrorlist and uncommenting the baseurl option in the appropriate yum repo .conf.

Thursday, March 15, 2012

Package management using zif.

As yum was introduced I was happy about it's features. Also some of the later features like history and the rollback are nice and handy.
But yum can be slow.

If you want to use a different rpm high-level management system with a comparable featureset to yum give zif a try:
$ sudo yum install -y zif-tools PackageKit-zif
This also installs the zif backend for PackageKit - which appears to the user as the package update dialog.
Many known commands will work:
$ zif search yum
$ sudo zif install -y livecd-tools
$ zif # will print help

Monday, March 5, 2012

They did it. A smallish OpenCL example running on Mesa's r600.


This happened somewhat unexpected while looking again at the state of open OpenCL implementations (so pocl and clover).

Suddenly some hero told me that there is a smallish OpenCL example which actually works with Mesa's OpenCL implementation (actually this is bound to r600 based devices). So what is awesome if this ain't?

What you need:
  • tstellar's clover-r600-master branch
  • Fedora 16 (okay, it might also work somewhere else), with rawhide clang and llvm
  • and the example code
  • oh - and - important -  an appropriate card e.g. HD6310 (AMD E-350/E-450) or some other evergreen GPU

What actually has to be done is - this time - left to the user.
A few hints:
  • Look at the comment in line 96 of src/gallium/state_trackers/clover/llvm/invocation.cpp and swap comments (there are r600 patches for LLVM which can be applied to get around this).
  • The implementation expects the opencl libs to reside in /usr/local/lib/opencl - so install or softlink
  • Set LD_LIBRARY_PATH to mesa/lib when building the example
  • You need to provide the OpenCL headers
The present support is currently just basic, but it's awesome to see this progress.

What you get:

There are 1 platforms.
There are 1 GPU devices.
clCreateContext() succeeded.
notkernel
main
clCreateCommandQueue() succeeded.
clCreateProgramWithSource() suceeded.
build log:
clBuildProgram() suceeded.
clCreateKernel() suceeded.
clCreateBuffer() succeeded.
clSetKernelArg() succeeded.
--------------------------------------------------
[...]
clEnqueueReadBuffer() suceeded.
pi = 3.141590

Let's see when I can build gst-plugins-opencl against mesa. And "they" include zack, steckdenis, and tstellar.

Some more informations using this tool:
$ make clInfo CFLAGS="-I$PATH_TO_CL_HEADERS" LDFLAGS="-lOpenCL -L$MESAPATH/lib"
$ sudo LD_LIBRARY_PATH="$MESAPATH/lib" ./clInfo
Found 1 platform(s).
platform[(nil)]: profile: FULL_PROFILE
platform[(nil)]: version: OpenCL 1.1 MESA 8.0.0
platform[(nil)]: name: Default
platform[(nil)]: vendor: Mesa
platform[(nil)]: extensions: 
platform[(nil)]: Found 1 device(s).
[...]