As part of any major project, it occasionally happens that you assume something is a ‘solved problem’ when its really not.
Posts Tagged: programming
14
Apr 11
CUDA Compute 20 Error and other issues
There’s a quirk of using older CUDA drivers is that the latest NVIDIA SDK code examples are not backward compatible, i.e compiling the 3.0 SDK against the 2.3 toolkit (that I’ve spent the last day doing) is a fools errand (Thanks very much to @thebaron on #cuda on freenode and tkerwin on StackOverflow.)
Basically, the 3.x drivers reclassify newer cards based on the; previously, the ‘compute’ value (a measure of OpenCL adherence) would max out at 1.3, but now the range is extended up to 2.0, but the 2.3 toolkit does not recognise this value, so craps out.
nvcc fatal : Unsupported gpu architecture 'compute_20'
The first solution is to try to use the 2.3 SDK instead, and thankfully, NVIDIA keeps a tidy library of back-releases. But upon installation of the 2.3 SDK, a new problem appeared. Lack of OpenGL Libraries… Unfortunately the machine I’m working on isn’t exactly standard issue so I’ll be asking the maintenance team to check it out on my behalf.
The secondary fix is to force nvcc to to use the older 1_3 capabilities in the makefile of the problematic kernels;
# CUDA source files (compiled with cudacc)
CUFILES_sm_13 := *.cu
There are a variety of these CUFILES_sm_XX clauses for different capabilities. Dig around the ../sdk/C/common/common.mk file for more hints.
PS This is a really old draft I found disgarded in my queue, so excuse me if this is very out of date.
14
Oct 10
Hackathon

On Saturday the 23rd October, the Hackers invade The Space!
In association with QUESTS, Dragonslayers, and IETNI, HackerspaceBelfast will be running a series of events over 24 hours of software, network, and hardware hackery goodness, as well as screening hacker movies, DIY repair, and maybe, just maybe, how to build a laser. Running parallel to Dragonslayers’ 24 hour gaming event, which will incorporate console, PC, and tabletop games, attendees will be able to both play and make games to their hearts content.
If you’re interested in programming, like to take things apart and see what happens if you mess with hardware, or want to know more about some of the the pitfalls of network and computer security (as well as how to prevent them), come along and mess with a group of like minded people.
Admission is £5 to pay for security and utilities. Space is limited so come early, stay late, and you won’t be disappointed. The ball starts rolling at 12 noon on Saturday.
For more information or to register your interest, check out our Facebook Event, Our Wiki, or the Google Group and get involved!
31
May 10
Automagic Kernel Cleaning under Ubuntu
Sick of having dozens of old kernels sitting under your /boot/ dir? Want a simpler boot-life? Well we’ve got the solution for you. Continue reading →
28
Apr 10
SEE, Programming Abstractions, Assignment 1
SEE, or, Stanford Engineering Everywhere, has turned out to be my favourite E-learning resource; I’ve dipped into it a few times over the past few years but in light of my recent investment into a CUDA enabled Graphics Card, I thought that it was coming high time to brush up on my C++ programming, which I’ve basically left stagnant for two years after advancing no further than function pointers, structures, and templates.
So, in the spirit of openness that SEE tries to foster, I’ll be blogging my work through their CS106B course, Programming Abstractions, the second of three programming courses. (I passed on CS106A, Programming Methodology, since I’ve had enough Java shoved down my throat to last a lifetime…).
9
Apr 10
Listing just dot-files
Its a problem that I’ve come across, and I’m not the only one, so heres what works for me to find those pesky files that start with a .
ls -a | egrep -i "^\."
This only works in the current working directory, which is the normal usage.
FYI the reason that this is problematic is that the ‘.’ symbol is a single character wildcard; most people are familiar with the asterisk ’*’ indicating ‘anything, however long’, whereas the ‘.’ means ‘any single character’.
The command works by looking only at the first character of the file (‘^’, thats called a caret) and then removing the special meaning of ‘.’ by escaping it with the slash.
Update:18/4/10
@stevebiscuit correctly pointed out that the -i flag is unnecessary.
-iinstructs egrep to ignore the case of any matches, so that ‘HeLlO’ matches if you egrep -i for ‘hello’. Since there is no case for the ‘.’ symbol, the -i is pointless.
1
Apr 10
Mod_Rewrite in Apache2
Just incase you forget how to fix this the easy way: Enable mod_rewrite for URL voodoo; (Or any module replacing the
rewrite
)
$sudo a2enmod rewrite $sudo service apache2 restart
Remember to fiddle with
/etc/apache2/sites-available.*< \pre> and change "AllowOverride none" to "all" in any places that you're having trouble with rewritten URL's
14
Mar 10
Installing and Configuring NS-3 on a Ubuntu System
NS-3 Appears to have a staggeringly steep learning curve so I hope these posts help out someone else (or me, when i forget all this in a month).
13
Mar 10
Mercurial Quick Start Cheatsheet
I hadn’t used Mercurial before so I thought it might be a good idea to leave a reminder for me and anyone else who comes across it…
For tidyness, I do all of my dev-stuff (Subversion, Mercurial, CVS, Git etc) under ~/src and only take root privileges when its needed; any good makefile should relocate the necessary files for you at the ‘make install’ or equivalent point.
Update:This article was picked up by the guys at DevCheatSheet.com and I’m really honoured to be included in a site that I’ve been dipping into over the years, so if you need any kind of cheat sheet or quick reference, I highly recommend checking them out. Anyway…



14
Jun 10
Ongoing CUDA work, aka, I love this book.
If anyone has any interest in CUDA, or GPU/Parallel programming in general, David B. Kirk and Wen-mei Hwu‘s groundbreaking “Programming Massively Parallel Processors” is a must. Continue reading →