<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zeitgeist Project &#187; mhr3</title>
	<atom:link href="/author/mhr3/feed/" rel="self" type="application/rss+xml" />
	<link>https://zeitgeist-project.com</link>
	<description>Desktop Activity Logging</description>
	<lastBuildDate>Wed, 11 Sep 2013 01:15:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>OpenCL on Ubuntu 13.04</title>
		<link>http://mhr3.blogspot.com/2013/06/opencl-on-ubuntu-1304.html</link>
		<comments>http://mhr3.blogspot.com/2013/06/opencl-on-ubuntu-1304.html#comments</comments>
		<pubDate>Sun, 02 Jun 2013 18:03:00 +0000</pubDate>
		<dc:creator>mhr3</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[opencl]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Unfortunately two years after my post about getting Intel&#039;s OpenCL to work on Ubuntu, the out-of-box situation for using OpenCL isn&#039;t much better - you can install the OpenCL library/headers/package config files with a nice and quick `apt-get...]]></description>
			<content:encoded><![CDATA[<div>Unfortunately two years after my post about getting Intel&#039;s OpenCL to work on Ubuntu, the out-of-box situation for using OpenCL isn&#039;t much better - you can install the OpenCL library/headers/package config files with a nice and quick `<span style="font-size: x-small;"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;">apt-get install ocl-icd-opencl-dev</span></span>`, but doing that will probably just get you to CL_PLATFORM_NOT_FOUND_KHR (-1001) error from clGetPlatformIDs. That&#039;s because you do have the dispatcher, but no actual OpenCL drivers. Therefore I decided to play with the three major OpenCL implementations (Intel, AMD, NVidia).<br><br>The reason why one can do the simple apt-get install is a free software project called <a href="https://forge.imag.fr/projects/ocl-icd/">ocl-icd</a> - this provides libOpenCL.so and implements the dispatcher so that every icd-compatible OpenCL implementation can use it and therefore provides nice basis for using OpenCL, but to get to building and running CL kernels you need to have at least one driver, so let&#039;s look at them.<br><br><h3>Intel&#039;s OpenCL</h3><br>Intel recently released <a href="http://software.intel.com/en-us/vcsource/tools/opencl">Intel SDK for OpenCL Applications XE 2013</a> - but Ubuntu/Debain users are out of luck, you won&#039;t find an official .deb on Intel&#039;s web. Fortunately that is not a deal breaker and with a few commands you can turn the rpm into a deb package (and it is what I recommended in my <a href="http://mhr3.blogspot.co.uk/2011/05/opencl-on-ubuntu.html">old post</a>). But since we have ocl-icd these days, I&#039;d go for a different approach this time - install just the bare minimum to have ocl-icd pick up the Intel driver (and add proper dependencies on ocl-icd-libopencl1 and libnuma1), so I created the debs manually this time.<br><br>So, what I did was:<br><ol><li>Grab the tgz from Intel&#039;s web.</li><li>Extract it into a temporary location where you&#039;ll find license, readme file, a bunch of scripts and five rpms:</li><ul><li>opencl-1.2-base-[version] - contains the libOpenCL.so, which we don&#039;t need cause we have ocl-icd-libopencl1</li><li>opencl-1.2-devel-[version] - contains OpenCL headers, which also aren&#039;t needed, as those are in opencl-headers package which is a dependency of ocl-icd-opencl-dev</li><li>opencl-1.2-intel-cpu-[version] - bingo, the ICD</li><li>opencl-1.2-intel-devel-[version] - a few development tools - offline compiler and Qt-based KernelBuilder application</li><li>opencl-1.2-intel-mic-[version] - additional libraries to support also Xeon Phi coprocessor besides Core processors - I ignored this one, cause I don&#039;t have access to such processor.</li></ul><li>Now, lets make binary debian packages from the unzipped files (note that only the intel-cpu package is required to use OpenCL apps, the devel tools are optional), this is pretty easy, following a <a href="http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/">simple debian package building HOWTO</a>, I put the files from the intel-cpu and intel-devel rpms into the following directory structure:<br><blockquote class="tr_bq"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;"> |-opencl-driver-intel-cpu<br> | \-DEBIAN<br> | \-etc<br> |   \-OpenCL<br> |     \-vendors<br> | \-usr<br> |   \-lib<br> |     \-x86_64-linux-gnu<br> |       \-OpenCL<br> |         \-vendors<br> |           \-intel<br> |   \-share<br> |     \-doc<br> |       \-opencl-driver-intel-cpu<br> |-opencl-driver-intel-tools<br> | \-bin<br> | \-DEBIAN<br> | \-usr<br> |   \-lib<br> |     \-x86_64-linux-gnu<br> |       \-intel<br> |         \-opencl-1.2-3.0.67279<br> |   \-share<br> |     \-doc<br> |       \-opencl-driver-intel-tools</span></blockquote><br>The DEBIAN directories contain the control files:<br><blockquote class="tr_bq"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;">$ opencl-driver-intel-cpu/DEBIAN/control:<br></span>Package: opencl-driver-intel-cpu<br>Version: 3.0.67279-1<br>Section: libs<br>Priority: optional<br>Architecture: amd64<br>Depends: ocl-icd-libopencl1 (&gt;= 2.0), libnuma1<br>Maintainer: Your Name &lt;your_email&gt;<br>Description: Intel OpenCL CPU implementation<br> This package provides Intel OpenCL implementation which can utilize Intel Core processors.<br><br>$ opencl-driver-intel-tools/DEBIAN/control:<br><br>Package: opencl-driver-intel-tools<br>Version: 3.0.67279-1<br>Section: libs<br>Priority: optional<br>Architecture: amd64<br>Depends: ocl-icd-libopencl1 (&gt;= 2.0)<br>Maintainer: Your Name &lt;your_email&gt;<br>Description: Intel SDK for OpenCL Applications development tools<br> This package contains the following tools:<br>  - Intel SDK for OpenCL - Kernel Builder, which enables building and analyzing OpenCL kernels and provides full offline OpenCL language compilation.<br>  - Intel SDK for OpenCL - Offline Compiler, a command-line utility, which enables offline compilation and building of OpenCL kernels.&lt;/your_email&gt;&lt;/your_email&gt;</span></blockquote>The leaf directory opencl-driver-intel-cpu/usr/lib/x86_64-linux-gnu/OpenCL/vendors/intel contains all the object files from the intel-cpu rpm, and opencl-driver-intel-tools/usr/lib/x86_64-linux-gnu/intel/opencl-1.2-3.0.67279/ contains the binaries from intel-devel rpm with tiny changes so the bash scripts point to a correct location.<br><br>Once this is done, the only remaining file to tamper with is the actual .icd in opencl-driver-intel-cpu/etc/OpenCL/vendors/intel64.icd, which contains just one line with path to the library: <br><span style="font-family: &quot;Courier New&quot;,Courier,monospace;">/usr/lib/x86_64-linux-gnu/OpenCL/vendors/intel/libintelocl.so</span></li><li>Now just run `<span style="font-size: x-small;"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;">dpkg-deb --build opencl-driver-intel-cpu</span></span>` and `<span style="font-size: x-small;"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;">dpkg-deb --build opencl-driver-intel-tools</span></span>` and voila your debs with Intel&#039;s OpenCL are ready.</li></ol>You can also download my <a href="http://ubuntuone.com/0TQe45evEJRLjXVTscEGtE">opencl-driver-intel-cpu.deb</a> and <a href="http://ubuntuone.com/42k6bKNMEvDUB3qlU72c5p">opencl-driver-intel-tools.deb</a>.<br><br>Note that these are here just for reference, you should delete them after making sure that your package looks the same - ie I&#039;m not redistributing these.<br><br>Once installed, a simple OpenCL app that lists the available platforms should output something like this:<br><blockquote class="tr_bq"><span style="font-size: x-small;"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;">PLATFORM_NAME: Intel(R) OpenCL<br>  VERSION: OpenCL 1.2 LINUX<br>  VENDOR: Intel(R) Corporation<br>  PROFILE: FULL_PROFILE<br>    DEVICE:       Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz<br>    DEVICE VENDOR: Intel(R) Corporation<br>    MAX COMPUTE UNITS: 8<br>    DEVICE VERSION: OpenCL 1.2 (Build 67279)<br>    DRIVER VERSION: 1.2</span></span></blockquote><br><h3>NVidia&#039;s OpenCL</h3><br>In Ubuntu 13.04 there are now multiple nvidia packages which contain various versions of nvidia&#039;s driver, but I couldn&#039;t find anywhere a package with the icd file and therefore even if all the nvidia-3* packages do have the driver, the ICD loader isn&#039;t able to find it. Nonetheless, the fix for that is easy:<br><br>Run `<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">locate libnvidia-opencl.so</span>`, this will probably find a few files, in my case these are found:<br><blockquote class="tr_bq"><span style="font-size: x-small;"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;">/usr/lib/nvidia-304/libnvidia-opencl.so.304.88<br>/usr/lib/nvidia-current/libnvidia-opencl.so.1<br>/usr/lib32/nvidia-304/libnvidia-opencl.so.304.88<br>/usr/lib32/nvidia-current/libnvidia-opencl.so.1</span></span></blockquote>For some reason though, the *.so.1 are broken symlinks in my case (maybe because I have Optimus laptop), therefore I created the .icd in the following manner:<br><br><span style="font-family: &quot;Courier New&quot;,Courier,monospace;">echo /usr/lib/nvidia-304/libnvidia-opencl.so.304.88 &gt; /etc/OpenCL/vendors/nvidia64.icd</span><br><br>The problem with this is that if the driver gets updated, you&#039;ll have to modify the .icd again, so if your *.so.1 symlink is not broken, you should use that instead.<br><br>Note that the driver also contains the OpenCL loader library (libOpenCL.so) and depending on your LD_LIBRARY_PATH settings, it might get used instead of the one provided by ocl-icd. That is not necessarily terrible, but keep in mind that NVidia&#039;s implementation is OpenCL 1.1, so even if other ICDs support 1.2, you&#039;ll be stuck with 1.1. Solution? Just remove the extra libOpenCL.so* from /usr/lib/nvidia-*/<br><br>Once done, listing CL platforms and devices should also list NVidia:<br><blockquote class="tr_bq"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;"><span style="font-size: x-small;">PLATFORM_NAME: NVIDIA CUDA<br>  VERSION: OpenCL 1.1 CUDA 4.2.1<br>  VENDOR: NVIDIA Corporation<br>  PROFILE: FULL_PROFILE<br>    DEVICE: GeForce GT 635M<br>    DEVICE VENDOR: NVIDIA Corporation<br>    MAX COMPUTE UNITS: 2<br>    DEVICE VERSION: OpenCL 1.1 CUDA<br>    DRIVER VERSION: 304.88</span></span></blockquote><br><h3>OpenCL and Bumblebee</h3><br>As previously mentioned, I have an Optimus laptop (with integrated Intel GPU as well as NVidia which is used for more demanding applications). If the NVidia GPU is shut down, you won&#039;t see the NVidia platform as available (which I find a bit strange, should be a platform with 0 available devices, no?), but once turned on with a `<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">optirun bash</span>`, things should be working properly, although I haven&#039;t tried for example CL-GL interop, I can imagine that might not work with Bumblebee.<br><br>One issue I noticed though is that if you have both NVidia and Intel&#039;s drivers, Intel&#039;s driver will crash any OpenCL app run <b>inside the optirun shell</b>, which seems to be caused by the LD_PRELOAD libraries that VirtualGL uses. So either run your apps inside the shell with `<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">LD_PRELOAD= ./myApp</span>`, or just don&#039;t run them inside the optirun shell, use a regular one. As long as the GPU is active it is perfectly able to perform calculations even without VirtualGL set up.<br><br><h3>AMD&#039;s driver</h3><br>AMD enables to use both CPU and GPU devices with <a href="http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/">their driver</a>. I don&#039;t have a GPU by AMD, so I only got to try the CPU implementation (luckily Intel&#039;s and AMD&#039;s CPUs are still compatible enough). The installer that they provide installs the whole SDK into /opt/AMDAPP, changes your /etc/profile to include the directories in LD_LIBRARY_PATH, and installs the icd to /etc/OpenCL/vendors.<br><br>What I don&#039;t like about this is that their SDK also contains libOpenCL.so, so it will be used instead of ocl-icd&#039;s. In this case this is less of a problem than in NVidia&#039;s case, cause AMD&#039;s implementation isn&#039;t limited to just OpenCL 1.1, but if you want to use ocl-icd, just remove the libOpenCL.so* from /opt/AMDAPP/lib/x86_64.<br><br>It would be nice to have a similar deb package for the AMD&#039;s CL driver, but I didn&#039;t get to that, maybe someone else wants to? ;) Anyway:<br><blockquote class="tr_bq"><span style="font-size: x-small;"><span style="font-family: &quot;Courier New&quot;,Courier,monospace;">PLATFORM_NAME: AMD Accelerated Parallel Processing<br>  VERSION: OpenCL 1.2 AMD-APP (1113.2)<br>  VENDOR: Advanced Micro Devices, Inc.<br>  PROFILE: FULL_PROFILE<br>    DEVICE: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz<br>    DEVICE VENDOR: GenuineIntel<br>    MAX COMPUTE UNITS: 8<br>    DEVICE VERSION: OpenCL 1.2 AMD-APP (1113.2)<br>    DRIVER VERSION: 1113.2 (sse2,avx)</span></span> </blockquote><br><h3>Conclusion </h3><br>As I was testing the various drivers I encountered quite a few issues - Intel&#039;s implementation crashes on <a href="http://www.ratgpu.com/">ratGPU</a> tests, AMD&#039;s pretends to work with my <a href="http://mhr3.blogspot.co.uk/2012/03/face-detection-with-opencl.html">OpenCL face detection</a> but doesn&#039;t detect anything (Intel&#039;s and NVidia&#039;s work fine), on top of that the crashes with Intel and Bumblebee/VirtualGL LD_PRELOAD shell. Samples from AMD&#039;s SDK crash when used with ocl-icd ICD loader because they call clReleaseContext(NULL), works with AMD&#039;s loader though. But in the end there is also a lot more that actually is working - for example a year ago my face detection didn&#039;t work at all with Intel&#039;s implementation, now it&#039;s fine, many of the SDK samples did work with all three drivers. I&#039;d say there was some good progress.<br><br>So that&#039;s about the current OpenCL state, it&#039;s usable, just not out-of-the-box, I do hope that a year from now at least this post will be just saying &quot;To use OpenCL just run `apt-get install opencl-driver-*`&quot;.</div>
    ]]></content:encoded>
			<wfw:commentRss>http://mhr3.blogspot.com/feeds/2616592544529309265/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GUADEC 2012 and Zeitgeist hackfest</title>
		<link>http://mhr3.blogspot.com/2012/08/guadec-2012-and-zeitgeist-hackfest.html</link>
		<comments>http://mhr3.blogspot.com/2012/08/guadec-2012-and-zeitgeist-hackfest.html#comments</comments>
		<pubDate>Fri, 03 Aug 2012 09:17:00 +0000</pubDate>
		<dc:creator>mhr3</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[As many others, I&#039;ve been to great La Coruna to meet up with fellow gnomies and zeitgeistians, and even though I arrived on Sunday, I still managed to make it to a couple of interesting talks and on Monday we started Zeitgeist hackfest which laste...]]></description>
			<content:encoded><![CDATA[<div>As many others, I&#039;ve been to great La Coruna to meet up with fellow gnomies and zeitgeistians, and even though I arrived on Sunday, I still managed to make it to a couple of interesting talks and on Monday we started Zeitgeist hackfest which lasted till Wednesday.<br><br>The biggest chunk of work I managed to do was to review RainCT&#039;s libzeitgeist2 branch (with more than 3 thousand line vala-diff), which extracts the datamodel and dbus interface bits from the not-that-long-ago-rewritten-in-vala zeitgeist-daemon and puts those bits in a library which will supersede the current version of libzeitgeist. The old version was conceived during my GSoC (in 2010) and was purely C-based and since at that point the daemon was written in python it had no connection to the current sources, and currently this was more of a maintenance burden for us - you can imagine that it&#039;s easier to keep the lib up-to-date when the daemon itself is built with it. By the end of the hackfest the branch was merged into master, and even though there are still some small pieces missing (like documentation and syntax sugaring), we should finish those in a couple of days. The API is currently very similar to the old libzeitgeist, although we did change the stealing behaviour that was used, therefore now it&#039;s not as convenient to use in C as it used to be. On the other hand though, it&#039;s straightforward to use it from introspected languages as well as Vala itself.<br><br>Other than reviews of huge and small branches, we were brainstorming about Zeitgeist&#039;s FTS extension (which does textual search of the log for us, but has issues). Unfortunately it seems that all the open source search engine libraries have some issues, be it <a href="http://mhr3.blogspot.co.at/2012/04/fts-engines-memory-usage.html">memory balooning problems</a>, fact that they&#039;re written in Java (which I think is pretty unusable on desktop), limbo state of commits to them, or lack of features. Currently the best option seems to be <a href="https://github.com/luceneplusplus/LucenePlusPlus">LucenePlusPlus</a>, but it falls into the &quot;limbo state of commits&quot; category. That being said, perhaps proclaiming our interest in it could change that? Pretty please? :)<br><br>Besides Zeitgeist, I also managed to stop by at the PyGObject hackfest and bother Pitti with memory leaks we&#039;re seeing when using <a href="https://launchpad.net/dee">libdee</a>. Although we didn&#039;t manage to tackle them, I have high hopes that we do. I also discussed ways to make a library as optional as possible with Ryan, and will apply that to the instrumentation lib I&#039;m currently working on.<br><br>One of the things that pleasantly surprised me was an increased general interest in Zeitgeist from the community (at least when compared to last year&#039;s GUADEC) and big number of smaller contributions, which are of course great and integrating with Zeitgeist is the way to improve the general user experience. Plus overall it&#039;s nice to see this after pushing for it for the past couple of years. Hopefully we will even see direct support for Zeitgeist in GTK soon. ;)<br><br>Last but not least, I want to thank GNOME foundation for sponsoring my stay.<br><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-b0IMNZXd5QQ/TjlV_PlaF3I/AAAAAAAAAGU/sdRsEOVzirI/s1600/sponsored-badge-shadow.png" style="margin-left: 1em; margin-right: 1em;"><img alt="Sponsored by GNOME foundation" border="0" src="http://2.bp.blogspot.com/-b0IMNZXd5QQ/TjlV_PlaF3I/AAAAAAAAAGU/sdRsEOVzirI/s1600/sponsored-badge-shadow.png" style="border: 0px;" title=""></a></div><br></div>
    ]]></content:encoded>
			<wfw:commentRss>http://mhr3.blogspot.com/feeds/2702664506603838299/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FTS engines &#8211; memory usage</title>
		<link>http://mhr3.blogspot.com/2012/04/fts-engines-memory-usage.html</link>
		<comments>http://mhr3.blogspot.com/2012/04/fts-engines-memory-usage.html#comments</comments>
		<pubDate>Sat, 21 Apr 2012 21:12:00 +0000</pubDate>
		<dc:creator>mhr3</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Following up on Mathias&#039;s great post on Full Text Search engines, I decided to take a look at the memory usage of some of the engines while performing queries. Mathias looked at Lucene++, SQLite, QtCLucene, Tracker and Xapian, I focused only on th...]]></description>
			<content:encoded><![CDATA[<div>Following up on Mathias&#039;s great <a href="http://taschenorakel.de/mathias/2012/04/18/fulltext-search-benchmarks/">post on Full Text Search engines</a>, I decided to take a look at the memory usage of some of the engines while performing queries. Mathias looked at Lucene++, SQLite, QtCLucene, Tracker and Xapian, I focused only on three of them - Lucene++, SQLite and Xapian (version numbers match those that Mathias used as I&#039;m also testing on Ubuntu 12.04).<br><br>The procedure was simple - I grabbed the benchmark repo (<a href="https://gitorious.org/openismus-playground/fts-benchmark">https://gitorious.org/openismus-playground/fts-benchmark</a>), used it to built two sets of the databases with 17251 and 121587 movies and then just ran valgrind&#039;s massif while only performing queries on the already built databases. Here are the values of peak memory usage:<br><br><table border="1" cellpadding="2" cellspacing="0" style="width: 100%;">  <tbody><tr>      <th><br></th>      <th>Lucene++</th>      <th>SQLite</th>      <th>Xapian</th>    </tr><tr>      <td>17251</td>      <td>1.4 MiB</td>      <td>2.5 MiB</td>      <td>1.2 MiB</td>    </tr><tr>      <td>121587</td>      <td>3.1 MiB</td>      <td>2.6 MiB</td>      <td>5.2 MiB</td>    </tr></tbody></table><br>Of course, the peak memory usage by itself isn&#039;t terribly interesting value, what matters is also how does the engine work with memory over time, so let&#039;s look at that as well (images are courtesy of <a href="https://projects.kde.org/massif-visualizer">Milian&#039;s fantastic massif-visualizer</a>, note that their scale is not relative to each other):<br><br><div style=""><table border="1" cellpadding="2" cellspacing="0" style="width: 100%;">  <tbody><tr>      <th><br></th>      <th>Lucene++</th>      <th>SQLite</th>      <th>Xapian</th>    </tr><tr>      <td>17251</td>      <td><a href="http://2.bp.blogspot.com/-1mUuAp93-ds/T5MOKYcr6GI/AAAAAAAAAKE/nX49fGBkrqQ/s1600/lucene-small-db.png"><img border="0" src="http://2.bp.blogspot.com/-1mUuAp93-ds/T5MOKYcr6GI/AAAAAAAAAKE/nX49fGBkrqQ/s200/lucene-small-db.png"></a></td>      <td><a href="http://2.bp.blogspot.com/-MLJAI4irVko/T5MOSrxyjqI/AAAAAAAAAKU/Ajjxblq2X0M/s1600/sqlite-small-db.png"><img border="0" src="http://2.bp.blogspot.com/-MLJAI4irVko/T5MOSrxyjqI/AAAAAAAAAKU/Ajjxblq2X0M/s200/sqlite-small-db.png"></a></td>      <td><a href="http://1.bp.blogspot.com/-79Ms9RN0YLY/T5MOdZq25kI/AAAAAAAAAKk/U8J02V7A4cg/s1600/xapian-small-db.png"><img border="0" src="http://1.bp.blogspot.com/-79Ms9RN0YLY/T5MOdZq25kI/AAAAAAAAAKk/U8J02V7A4cg/s200/xapian-small-db.png"></a></td>    </tr><tr>      <td>121587</td>      <td><a href="http://2.bp.blogspot.com/-9akHENTo42s/T5MOFG6PYSI/AAAAAAAAAJ8/UWVGxVEOLXI/s1600/lucene-large-db.png"><img border="0" src="http://2.bp.blogspot.com/-9akHENTo42s/T5MOFG6PYSI/AAAAAAAAAJ8/UWVGxVEOLXI/s200/lucene-large-db.png"></a></td>      <td><a href="http://4.bp.blogspot.com/-zO-YGyZJ_rY/T5MOOkyYzVI/AAAAAAAAAKM/d3QGfC_25Rw/s1600/sqlite-large-db.png"><img border="0" src="http://4.bp.blogspot.com/-zO-YGyZJ_rY/T5MOOkyYzVI/AAAAAAAAAKM/d3QGfC_25Rw/s200/sqlite-large-db.png"></a></td>      <td><a href="http://3.bp.blogspot.com/-U67Q6j0KUFE/T5MOX5KR4qI/AAAAAAAAAKc/8jsT_ugAVuc/s1600/xapian-large-db.png"><img border="0" src="http://3.bp.blogspot.com/-U67Q6j0KUFE/T5MOX5KR4qI/AAAAAAAAAKc/8jsT_ugAVuc/s200/xapian-large-db.png"></a></td>    </tr></tbody></table></div><br>We can see that both Lucene and SQLite seem to build a cache on the first query and then use it, Xapian on the other hand doesn&#039;t seem to be keeping a cache, as the rapid drops in mem usage suggest, but maybe there&#039;s different explanation to that.<br><br>So that&#039;s it for memory usage while performing standard queries, but what I was particularly interested in was memory usage when performing wildcard queries (as I saw some strange behaviour here and there with Xapian). Therefore I added one simple wildcard query &quot;T*&quot; to the list of executed queries and ran it on the largest DBs (ones with 121587 movies). As you can imagine the &quot;T*&quot; query is really generic and it matches around 110 thousand documents from the dataset, that&#039;s why I also added a limit of 10k results per query to each backend (although that shouldn&#039;t make much difference).<br><br>Let&#039;s look at the results:<br><br><div style=""><table border="1" cellpadding="2" cellspacing="0" style="width: 100%;">  <tbody><tr>      <th><br></th>      <th>Lucene++</th>      <th>SQLite</th>      <th>Xapian</th>    </tr><tr>      <td>Peak mem usage</td>      <td>4.6 MiB</td>      <td>7.3 MiB</td>      <td>442.2 MiB</td>    </tr><tr>      <td>Visualization</td>      <td><a href="http://1.bp.blogspot.com/-7568a5587PY/T5MYnq1BFXI/AAAAAAAAAKs/rLd0jwzZ8Yc/s1600/lucene-wildcard.png"><img border="0" src="http://1.bp.blogspot.com/-7568a5587PY/T5MYnq1BFXI/AAAAAAAAAKs/rLd0jwzZ8Yc/s200/lucene-wildcard.png"></a></td>      <td><a href="http://4.bp.blogspot.com/-D6_Oi5mATeo/T5MYr7imnVI/AAAAAAAAAK0/vH3Vr2l7Rlw/s1600/sqlite-wildcard.png"><img border="0" src="http://4.bp.blogspot.com/-D6_Oi5mATeo/T5MYr7imnVI/AAAAAAAAAK0/vH3Vr2l7Rlw/s200/sqlite-wildcard.png"></a></td>      <td><a href="http://2.bp.blogspot.com/-8vvMZg3QGhI/T5MYyK8pi6I/AAAAAAAAAK8/XIObKtJjjfQ/s1600/xapian-wildcard.png"><img border="0" src="http://2.bp.blogspot.com/-8vvMZg3QGhI/T5MYyK8pi6I/AAAAAAAAAK8/XIObKtJjjfQ/s200/xapian-wildcard.png"></a></td>    </tr></tbody></table></div><br>Now we can clearly see that Xapian uses huge amount of memory during expansion of the wildcard query (can this be considered a bug report? :)), SQLite has a couple of peaks there, but nothing to be worried too much about, and Lucene++ shines with its fairly constant (and really low) mem usage.<br><br>You saw the data, so I&#039;ll leave any conclusions up to you. ;)<br><br>The small number of changes I had to do to the original benchmark repository is available as <a href="http://ubuntuone.com/4RQduB4ay3ocbxhz3ZXVYC">a simple diff here</a>.</div>
    ]]></content:encoded>
			<wfw:commentRss>http://mhr3.blogspot.com/feeds/3774843054869375733/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Face detection with OpenCL</title>
		<link>http://mhr3.blogspot.com/2012/03/face-detection-with-opencl.html</link>
		<comments>http://mhr3.blogspot.com/2012/03/face-detection-with-opencl.html#comments</comments>
		<pubDate>Sun, 04 Mar 2012 15:23:00 +0000</pubDate>
		<dc:creator>mhr3</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[opencl]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I&#039;ve been meaning to write about the topic of my thesis for quite some time, but didn&#039;t really get to it until now, so even though it&#039;s almost a year late, here we go.Before I get into some technical details, here&#039;s a youtube video ...]]></description>
			<content:encoded><![CDATA[<div>I&#039;ve been meaning to write about the topic of my thesis for quite some time, but didn&#039;t really get to it until now, so even though it&#039;s almost a year late, here we go.<br><br>Before I get into some technical details, here&#039;s a <a href="http://www.youtube.com/watch?feature=player_embedded&amp;v=aTErTqOIkss">youtube video</a> where you can see the OpenCL implementation of my detector in action:<br><br><div class="separator" style="clear: both; text-align: center;">&lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://i.ytimg.com/vi/aTErTqOIkss/0.jpg&quot; height=&quot;266&quot; width=&quot;320&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/aTErTqOIkss?version=3&amp;amp;f=user_uploads&amp;amp;c=google-webdrive-0&amp;amp;app=youtube_gdata&quot;/&gt;     &lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot;/&gt;     &lt;embed height=&quot;266&quot; src=&quot;http://www.youtube.com/v/aTErTqOIkss?version=3&amp;amp;f=user_uploads&amp;amp;c=google-webdrive-0&amp;amp;app=youtube_gdata&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;320&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</div><br>Pretty neat, right? :) So what you just saw was an implementation of a detector based on the WaldBoost algorithm (a variant of <a href="http://en.wikipedia.org/wiki/AdaBoost">AdaBoost</a>) that had as its input a classifier trained for detecting frontal faces (and an awesome video of course) running on a GPU.<br><br>If you know anything about boosting algorithms, you&#039;ll know that one strong classifier is usually composed of lots of weak classifiers (which are usually very simple and computationally inexpensive functions) - in my case there are 1000 weak classifiers where each uses <a href="http://en.wikipedia.org/wiki/Local_binary_patterns">Local Binary Patterns</a> to extract a feature from the input texture. Unfortunately such strong classifier is resolution dependent, and to be able to detect objects of various sizes in the input image, we need a pre-processing step.<br><br>During pre-processing we create a pyramid of images by gradually down-scaling the input (oh and we don&#039;t need colors, so we also convert it to greyscale). This way the detector can still detect only faces with resolution of 24x24, but using a mapping function we will know when it actually detected something in any of the downscaled versions of the image and there we have resolution independent detector. Interesting tidbit: it turned out that creating the pyramid texture by putting the downscaled images horizontally instead of vertically (which you can see on the image below) slightly improved performance of the detector - simply because the texture cache unit had higher hit ratio in such setup, but since the pyramid texture is approximately 3.6 times larger than the width of the original image, the detector wouldn&#039;t be able to process HD (1280x720) nor Full-HD (1920x1080) videos, because maximum texture size for OpenCL image is 4096 pixels (when using vertical layout though 1080 x 3.6 ~= 3900, so even Full-HD videos can be processed).<br><br><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="border: 0px; margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-MhjfC8Bv2FE/T1Nj_NezKfI/AAAAAAAAAJg/Ca_mZ2vSRdI/s1600/pyramid2.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="305" src="http://3.bp.blogspot.com/-MhjfC8Bv2FE/T1Nj_NezKfI/AAAAAAAAAJg/Ca_mZ2vSRdI/s320/pyramid2.png" width="320"></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Left - original image, right - pyramid of downscaled images (real pyramid texture also has the original on top)</td></tr></tbody></table><br>Once we have our pyramid image, it&#039;s divided into small blocks, which are processed by the GPU cores and each work item (or thread if you wish) in this block is evaluating the strong classifier at a particular window position of the pyramid image. Overall we&#039;ll evaluate every window position - think of every pixel. (in reality it&#039;s more complicated than that - the detector is using multiple kernels and each is evaluating only a part of the strong classifier - that&#039;s because WaldBoost can preliminary reject a window without evaluating all weak classifiers, so when a kernel finishes it just reduces the number of candidate windows and next kernel continues to evaluate only windows that survived the previous steps - this also ensures that we keep most of the work items in the work groups busy).<br><br>Once the detector finishes, we have a couple of window positions in the pyramid image and response value of the strong classifier in these windows, and these are sent back to the host. The CPU can then finish the detection (by simply thresholding the response values) and map the coordinates back to the input image. If you watched the video carefully you&#039;d have noticed that there are multiple positive responses around a face, so this would be also a good place to do some post-processing and merge these. Plus there&#039;s a false detection from time to time, so again good place to get rid of them.<br><br>You&#039;re surely asking how does this compare to a pure CPU implementation and as you can imagine having to evaluate every window position in the pyramid image is very costly and even optimized SSE implementations can&#039;t get close to performance of a GPU (even though you need to copy a lot of data between the host and the GPU). So a simple graph to answer that (note the logarithmic scale):<br><br><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="border: 0px; margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-v-sX3coHMm4/T1N4ZTDHp3I/AAAAAAAAAJo/J64vvxDGuHA/s1600/fps.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="http://2.bp.blogspot.com/-v-sX3coHMm4/T1N4ZTDHp3I/AAAAAAAAAJo/J64vvxDGuHA/s400/fps.png" width="400"></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Processed video frames per second (CPU: Core2 Duo E8200 @ 2.66GHz; GPU: GeForce GTX 285 - driver ver 270)</td></tr></tbody></table>So why do I talk about all this on my free software related blog? Well of course I&#039;m making the source available for anyone to play with it, optimize it further (there&#039;s still plenty of room for that) or do whatever you feel like doing with it. But I need to warn you first - the implementation is heavily optimized for nvidia&#039;s hardware and was never really tested on anything else (the AMD CPU implementation of OpenCL doesn&#039;t support images, the Intel CPU implementation does support images, but not the image formats I&#039;m using, so that basically leaves only AMD GPU implementation, but I didn&#039;t have such hardware available). I&#039;m also making assumptions that are true only on nvidia&#039;s hardware - like that there are 32 work items running at a given time (which is true for nvidia&#039;s warp). There are even some helper methods that allowed this to be run on hardware without local atomic operations (so even OpenCL 1.0 was enough), but I see now that I can no longer run it on my old GeForce 9300 with latest nvidia&#039;s driver (although it did work with version 270). So I don&#039;t even know if it works at all with the compiler in the latest driver... you&#039;ve been warned.<br><br>Grab the code branch from Launchpad (bzr branch <a href="https://code.launchpad.net/~mhr3/+junk/ocl-detector">lp:~mhr3/+junk/ocl-detector</a>), or get the <a href="http://ubuntuone.com/5HfCfcX3t81yP00Q8TZCcg">tarball</a> (the only dependencies are glib, opencv plus libOpenCL.so somewhere where the linker can find it). Run it with `<span style="font-family: 'Courier New',Courier,monospace; font-size: x-small;">./oclDetector -s CAM</span>` (and if that doesn&#039;t seem to detect anything try `<span style="font-family: 'Courier New',Courier,monospace; font-size: x-small;">./oclDetector -r -20 -s CAM</span>`).</div>
    ]]></content:encoded>
			<wfw:commentRss>http://mhr3.blogspot.com/feeds/3358723902208969713/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>News from the Zeitgeist land</title>
		<link>http://mhr3.blogspot.com/2011/11/news-from-zeitgeist-land.html</link>
		<comments>http://mhr3.blogspot.com/2011/11/news-from-zeitgeist-land.html#comments</comments>
		<pubDate>Thu, 03 Nov 2011 15:57:00 +0000</pubDate>
		<dc:creator>mhr3</dc:creator>
				<category><![CDATA[vala]]></category>
		<category><![CDATA[zeitgeist]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hey everyone,on behalf of the Zeitgeist team I&#039;d like to announce that today we&#039;re releasing the latest version of Zeitgeist (0.8.99-alpha1). It&#039;s quite unusual for Zeitgeist to do alpha releases, but this one is special - the entire dae...]]></description>
			<content:encoded><![CDATA[<div>Hey everyone,<br><br>on behalf of the Zeitgeist team I&#039;d like to announce that today we&#039;re releasing the latest version of Zeitgeist (0.8.99-alpha1). It&#039;s quite unusual for Zeitgeist to do alpha releases, but this one is special - the entire daemon was rewritten from Python to Vala, which most likely brings a couple of new bugs, but also fixes another bunch of old bugs. Therefore we&#039;d need people to test the release to see if there are some outstanding issues we missed.<br><br>As usual, the <a href="http://launchpad.net/zeitgeist/0.9/0.9.0/+download/zeitgeist-0.8.99~alpha1.tar.bz2">tarball is available on Launchpad</a>. Of course we&#039;ll be also pushing the package into <a href="https://launchpad.net/~zeitgeist/+archive/ppa">our PPA</a> soon (although the alpha release may be only available for Oneiric users). Please report any bugs you encounter to either <a href="https://bugs.freedesktop.org/describecomponents.cgi?product=Zeitgeist">Zeitgeist&#039;s freedesktop.org bugzilla</a> or to <a href="https://bugs.launchpad.net/zeitgeist/+filebug">our Launchpad bug page</a>.<br><br>The biggest difference you&#039;ll be able to see at this point is much faster startup time, other than that the changes will be minimal - we&#039;re still using the same database, as well as the same DBus API, so everything should be working as before. One thing we did break is the API for the Activity Journal extension, so if you want to continue using it with this and further releases, you need to update also Activity Journal.<br><br>What&#039;s still missing is rewrite of our FTS extension (which provides search capabilities), so for the time being we&#039;re still using the old one written in python which is included in the tarball.<br><br>Before I wrap up, I&#039;d like to say huge thank you to Collabora and Canonical, who sponsored the development, and of course to the whole team: <a href="http://seilo.geekyogre.com/">Seif</a> (seiflotfy), <a href="http://bloc.eurion.net/">Siegfried</a> (RainCT), <a href="http://grillbar.org/">Mikkel</a> (kamstrup) and <a href="http://milky.manishsinha.net/">Manish</a> (m4n1sh).<br><br><div class="separator" style="clear: both; text-align: center;"><a href="http://www.collabora.co.uk/logos/collabora-logo-small.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="116" src="http://www.collabora.co.uk/logos/collabora-logo-small.png" style="border: 0;" width="354"></a></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://aruiz.synaptia.net/.a/6a00d8341fa10a53ef014e8c4fc502970d-pi" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="42" src="http://aruiz.synaptia.net/.a/6a00d8341fa10a53ef014e8c4fc502970d-pi" style="border: 0;" width="320"></a></div></div>
    ]]></content:encoded>
			<wfw:commentRss>http://mhr3.blogspot.com/feeds/1027753180585013967/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intel&#8217;s OpenCL on Ubuntu</title>
		<link>http://mhr3.blogspot.com/2011/05/opencl-on-ubuntu.html</link>
		<comments>http://mhr3.blogspot.com/2011/05/opencl-on-ubuntu.html#comments</comments>
		<pubDate>Tue, 17 May 2011 12:44:00 +0000</pubDate>
		<dc:creator>mhr3</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[opencl]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Since I work with OpenCL a lot and yesterday I found out that Intel&#039;s OpenCL is now finally available for Linux, I thought I&#039;d share a few words of how to get it to work on Ubuntu (even though Intel currently provides only a rpm package for R...]]></description>
			<content:encoded><![CDATA[<div>Since I work with OpenCL a lot and yesterday I found out that Intel&#039;s OpenCL is now finally available for Linux, I thought I&#039;d share a few words of how to get it to work on Ubuntu (even though Intel currently provides only a rpm package for RHEL and Suse).<br><br>First of all, I&#039;m testing all of this on Lucid 64bit, but I suppose it&#039;d work also on newer Ubuntu releases (though you need to be using 64bit version, cause the Intel package is for 64).<br><br>So let&#039;s get to it.<br><br><ol><li>First of all grab the rpm package from <a href="http://software.intel.com/en-us/articles/download-intel-opencl-sdk/">http://software.intel.com/en-us/articles/download-intel-opencl-sdk/</a>.</li><li>Install the rpm and alien packages (`sudo apt-get install rpm alien`).</li><li>Convert the rpm package to deb using alien - `fakeroot alien --to-deb &lt;intel&#039;s rpm package filename&gt;`. The conversion spits some warnings, I wouldn&#039;t pay any attention to them.</li><li>Install the newly created deb package. `sudo dpkg -i intel-ocl-sdk-suse+11.1_1.1-2_amd64.deb`</li><li>One extra package you need to install for the library to work is libnuma. `sudo apt-get install libnuma1`</li><li>Make sure the ICD is installed. `sudo echo &quot;libintelocl.so&quot; &gt; /etc/OpenCL/vendors/intelocl64.icd`</li><li>The package is nice and also installs OpenCL headers in /usr/include/CL. Also the main binary (libOpenCL.so) is installed in /usr/lib64 - if you don&#039;t have any other OpenCL platform installed on your system, I suggest moving it to /usr/lib (run `sudo ldconfig` afterwards), if you do have this library already (for example nvidia driver also contains it) just leave it there.</li><li>Since the libraries are installed in non-standard location for Ubuntu (/usr/lib64/OpenCL/vendors/intel), you&#039;ll need to adjust your LD_LIBRARY_PATH. I usually do this using a script, but you can just run:<br><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export LD_LIBRARY_PATH=/usr/lib64/OpenCL/vendors/intel:$LD_LIBRARY_PATH</span></li></ol><div><div><span class="Apple-style-span" style="font-family: inherit;">Running a OpenCL program that just lists available platforms should return now at least one platform. Or if you have multiple platforms including their ICDs installed you&#039;d get something like:</span></div><div><pre>There are 3 platforms available<br>PLATFORM_NAME: Intel(R) OpenCL<br>  VERSION: OpenCL 1.1 LINUX<br>  VENDOR: Intel(R) Corporation<br>  PROFILE: FULL_PROFILE<br>    DEVICE: Intel(R) Core(TM)2 Duo CPU     P7370  @ 2.00GHz<br>    MAX COMPUTE UNITS: 2<br>    DEVICE VERSION: OpenCL 1.1 <br>    DRIVER VERSION: 1.1<br>PLATFORM_NAME: ATI Stream<br>  VERSION: OpenCL 1.1 ATI-Stream-v2.3 (451)<br>  VENDOR: Advanced Micro Devices, Inc.<br>  PROFILE: FULL_PROFILE<br>    DEVICE: Intel(R) Core(TM)2 Duo CPU     P7370  @ 2.00GHz<br>    MAX COMPUTE UNITS: 2<br>    DEVICE VERSION: OpenCL 1.1 ATI-Stream-v2.3 (451)<br>    DRIVER VERSION: 2.0<br>PLATFORM_NAME: NVIDIA CUDA<br>  VERSION: OpenCL 1.0 CUDA 3.2.1<br>  VENDOR: NVIDIA Corporation<br>  PROFILE: FULL_PROFILE<br>    DEVICE: GeForce 9300M GS<br>    MAX COMPUTE UNITS: 1<br>    DEVICE VERSION: OpenCL 1.0 CUDA<br>    DRIVER VERSION: 260.19.29<br></pre></div></div><br>Good luck implementing your OpenCL kernels. :)</div>
    ]]></content:encoded>
			<wfw:commentRss>http://mhr3.blogspot.com/feeds/2588039295736613301/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenCL on Ubuntu</title>
		<link>http://mhr3.blogspot.com/2011/05/opencl-on-ubuntu.html</link>
		<comments>http://mhr3.blogspot.com/2011/05/opencl-on-ubuntu.html#comments</comments>
		<pubDate>Thu, 12 May 2011 12:18:00 +0000</pubDate>
		<dc:creator>mhr3</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[opencl]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Since I work with OpenCL a lot and yesterday I found out that Intel&#039;s OpenCL is now finally available for Linux, I thought I&#039;d share a few words of how to get it to work on Ubuntu (even though Intel currently provides only a rpm package for R...]]></description>
			<content:encoded><![CDATA[<div>Since I work with OpenCL a lot and yesterday I found out that Intel&#039;s OpenCL is now finally available for Linux, I thought I&#039;d share a few words of how to get it to work on Ubuntu (even though Intel currently provides only a rpm package for RHEL and Suse).<br><br>First of all, I&#039;m testing all of this on Lucid 64bit, but I suppose it&#039;d work also on newer Ubuntu releases (though you need to be using 64bit version, cause the Intel package is for 64).<br><br>So let&#039;s get to it.<br><br><ol><li>First of all grab the rpm package from <a href="http://software.intel.com/en-us/articles/download-intel-opencl-sdk/">http://software.intel.com/en-us/articles/download-intel-opencl-sdk/</a>.</li><li>Install the rpm and alien packages (`sudo apt-get install rpm alien`).</li><li>Convert the rpm package to deb using alien - `fakeroot alien --to-deb &lt;intel&#039;s rpm package filename&gt;`. The conversion spits some warnings, I wouldn&#039;t pay any attention to them.</li><li>Install the newly created deb package. `sudo dpkg -i intel-ocl-sdk-suse+11.1_1.1-2_amd64.deb`</li><li>One extra package you need to install for the library to work is libnuma. `sudo apt-get install libnuma1`</li><li>Make sure the ICD is installed. `sudo echo &quot;libintelocl.so&quot; &gt; /etc/OpenCL/vendors/intelocl64.icd`</li><li>The package is nice and also installs OpenCL headers in /usr/include/CL. Also the main binary (libOpenCL.so) is installed in /usr/lib64 - if you don&#039;t have any other OpenCL platform installed on your system, I suggest moving it to /usr/lib (run `sudo ldconfig` afterwards), if you do have this library already (for example nvidia driver also contains it) just leave it there.</li><li>Since the libraries are installed in non-standard location for Ubuntu (/usr/lib64/OpenCL/vendors/intel), you&#039;ll need to adjust your LD_LIBRARY_PATH. I usually do this using a script, but you can just run:<br><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">export LD_LIBRARY_PATH=/usr/lib64/OpenCL/vendors/intel:$LD_LIBRARY_PATH</span></li></ol><div><div><span class="Apple-style-span" style="font-family: inherit;">Running a OpenCL program that just lists available platforms should return now at least one platform. Or if you have multiple platforms including their ICDs installed you&#039;d get something like:</span></div><div><pre>There are 3 platforms available<br>PLATFORM_NAME: Intel(R) OpenCL<br>  VERSION: OpenCL 1.1 LINUX<br>  VENDOR: Intel(R) Corporation<br>  PROFILE: FULL_PROFILE<br>    DEVICE: Intel(R) Core(TM)2 Duo CPU     P7370  @ 2.00GHz<br>    MAX COMPUTE UNITS: 2<br>    DEVICE VERSION: OpenCL 1.1 <br>    DRIVER VERSION: 1.1<br>PLATFORM_NAME: ATI Stream<br>  VERSION: OpenCL 1.1 ATI-Stream-v2.3 (451)<br>  VENDOR: Advanced Micro Devices, Inc.<br>  PROFILE: FULL_PROFILE<br>    DEVICE: Intel(R) Core(TM)2 Duo CPU     P7370  @ 2.00GHz<br>    MAX COMPUTE UNITS: 2<br>    DEVICE VERSION: OpenCL 1.1 ATI-Stream-v2.3 (451)<br>    DRIVER VERSION: 2.0<br>PLATFORM_NAME: NVIDIA CUDA<br>  VERSION: OpenCL 1.0 CUDA 3.2.1<br>  VENDOR: NVIDIA Corporation<br>  PROFILE: FULL_PROFILE<br>    DEVICE: GeForce 9300M GS<br>    MAX COMPUTE UNITS: 1<br>    DEVICE VERSION: OpenCL 1.0 CUDA<br>    DRIVER VERSION: 260.19.29<br></pre></div></div><br>Good luck implementing your OpenCL kernels. :)<div class="blogger-post-footer"><img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/5662148629346975559-1283596754373661746?l=mhr3.blogspot.com" width="1"></div></div>
    ]]></content:encoded>
			<wfw:commentRss>http://mhr3.blogspot.com/feeds/1283596754373661746/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Synapse again!</title>
		<link>http://mhr3.blogspot.com/2011/04/new-synapse-again.html</link>
		<comments>http://mhr3.blogspot.com/2011/04/new-synapse-again.html#comments</comments>
		<pubDate>Thu, 07 Apr 2011 16:43:00 +0000</pubDate>
		<dc:creator>mhr3</dc:creator>
				<category><![CDATA[synapse]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[In the release-often spirit, we prepared Synapse 0.2.6, which, as opposed to last release, contains lots of user interface tweaks, changes and additions (drag and drop, new theme, improved focus grabbing). This time you can read all about it at Albert...]]></description>
			<content:encoded><![CDATA[<div>In the release-often spirit, we prepared Synapse 0.2.6, which, as opposed to last release, contains lots of user interface tweaks, changes and additions (drag and drop, new theme, improved focus grabbing). This time you can read all about it <a href="http://codingyourdreams.net/2011/04/07/synapse-aspartate-0-2-6/">at Alberto&#039;s blog</a>.<br><br><div class="separator" style="clear: both; text-align: center;"><a href="http://codingyourdreams.net/wp-content/uploads/2011/04/synapse-0.2.6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://codingyourdreams.net/wp-content/uploads/2011/04/synapse-0.2.6.png" width="320"></a></div><div class="blogger-post-footer"><img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/5662148629346975559-4437732703451806213?l=mhr3.blogspot.com" width="1"></div></div>
    ]]></content:encoded>
			<wfw:commentRss>http://mhr3.blogspot.com/feeds/4437732703451806213/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Synapse: Anandamide</title>
		<link>http://mhr3.blogspot.com/2011/02/synapse-anandamide.html</link>
		<comments>http://mhr3.blogspot.com/2011/02/synapse-anandamide.html#comments</comments>
		<pubDate>Tue, 22 Feb 2011 23:41:00 +0000</pubDate>
		<dc:creator>mhr3</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[Just a quick shout about new release of Synapse - 0.2.4! There aren&#039;t too many user visible changes in this release, besides a few new plugins. Mostly polishing and more polishing.Anyhow here&#039;s the changelog: added Calculator pluginmultiple f...]]></description>
			<content:encoded><![CDATA[<div>Just a quick shout about new release of Synapse - 0.2.4! There aren&#039;t too many user visible changes in this release, besides a few new plugins. Mostly polishing and more polishing.<br><br>Anyhow here&#039;s the changelog:<br><ul><li> added Calculator plugin</li><li>multiple fixes to Zeitgeist searches</li><li>add plugin descriptions (links to wiki)</li><li>added simple Launchpad plugin</li><li>added Pastebin plugin</li><li>added Copy to clipboard action</li><li>added Imgur plugin (uploads images to imgur)</li><li>added Selection plugin (execute actions on currently selected text)</li><li>small UI fixes and speedups</li><li>multiple smaller bug fixes</li></ul>If you like Synapse, you can help out by writing plugin descriptions on our <a href="http://synapse.zeitgeist-project.com/wiki/index.php?title=Main_Page">wiki</a>, just click the help button in Synapse&#039;s preferences window (in the plugin tab) and you&#039;ll be taken to a wiki page (most likely empty right now) where all other users will then be able to read this.<br><br>Tarballs are at the usual <a href="http://launchpad.net/synapse-project/0.2/0.2.4/+download/synapse-0.2.4.tar.gz">place</a>. Ubuntu users using our bleeding edge PPA (ppa:synapse-core/testing) could have been enjoying most of these improvements for quite some time, but the new packages have now been built also on our stable PPA (<b>ppa:synapse-core/ppa</b>).<div class="blogger-post-footer"><img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/5662148629346975559-6779349946613781026?l=mhr3.blogspot.com" width="1"></div></div>
    ]]></content:encoded>
			<wfw:commentRss>http://mhr3.blogspot.com/feeds/6779349946613781026/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Synapse: Anandamide</title>
		<link>http://mhr3.blogspot.com/2011/02/synapse-anandamide.html</link>
		<comments>http://mhr3.blogspot.com/2011/02/synapse-anandamide.html#comments</comments>
		<pubDate>Tue, 22 Feb 2011 23:41:00 +0000</pubDate>
		<dc:creator>mhr3</dc:creator>
				<category><![CDATA[synapse]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Just a quick shout about new release of Synapse - 0.2.4! There aren&#039;t too many user visible changes in this release, besides a few new plugins. Mostly polishing and more polishing.Anyhow here&#039;s the changelog: added Calculator pluginmultiple f...]]></description>
			<content:encoded><![CDATA[<div>Just a quick shout about new release of Synapse - 0.2.4! There aren&#039;t too many user visible changes in this release, besides a few new plugins. Mostly polishing and more polishing.<br><br>Anyhow here&#039;s the changelog:<br><ul><li> added Calculator plugin</li><li>multiple fixes to Zeitgeist searches</li><li>add plugin descriptions (links to wiki)</li><li>added simple Launchpad plugin</li><li>added Pastebin plugin</li><li>added Copy to clipboard action</li><li>added Imgur plugin (uploads images to imgur)</li><li>added Selection plugin (execute actions on currently selected text)</li><li>small UI fixes and speedups</li><li>multiple smaller bug fixes</li></ul>If you like Synapse, you can help out by writing plugin descriptions on our <a href="http://synapse.zeitgeist-project.com/wiki/index.php?title=Main_Page">wiki</a>, just click the help button in Synapse&#039;s preferences window (in the plugin tab) and you&#039;ll be taken to a wiki page (most likely empty right now) where all other users will then be able to read this.<br><br>Tarballs are at the usual <a href="http://launchpad.net/synapse-project/0.2/0.2.4.2/+download/synapse-0.2.4.2.tar.gz">place</a>. Ubuntu users using our bleeding edge PPA (ppa:synapse-core/testing) could have been enjoying most of these improvements for quite some time, but the new packages have now been built also on our stable PPA (<b>ppa:synapse-core/ppa</b>).</div>
    ]]></content:encoded>
			<wfw:commentRss>http://mhr3.blogspot.com/feeds/6779349946613781026/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
