The AMD OpenCL coding competition seems to be Windows 7 64bit only. So if you are on another version of Windows, OSX or (like me) on Linux, you are left behind. Of course StreamHPC supports software that just works anywhere (seriously, how hard is that nowadays?), so here are the instructions how to enter the competition when you work with Eclipse CDT. The reason why it only works with 64-bit Windows I don’t really get (but I understood it was a hint).
I focused on Linux, so it might not work with Windows XP or OSX rightaway. With little hacking, I’m sure you can change the instructions to work with i.e. Xcode or any other IDE which can import C++-projects with makefiles. Let me know if it works for you and what you changed.
The competition is focused on a heterogeneous processor, so if you have a CPU with dedicated GPU, you have to focus on (non-existing) PCI-timings a lot. The link shows lots of hints with the provided PDFs. If you have an NVidia GPU, you need to hack FE.cpp where it asks for “Advanced Micro Devices, Inc.” – AMD might not like it if somebody wins who has developed on a NVidia GPU, but I think that it convinces a lot of people what it means not to have transfer-times for the PCI-bus. Anyhow, know that GPUs from AMD and NVidia are very different and known working optimisations for NVidia won’t help here.
You can download the altered files here as tar.gz. You still need the files from the code competition, as these are only the changed files. Just copy them over the old ones (after making a backup of course). Then you can import into Eclipse (C++ project with make-file); alternatively you can make a run-configuration with the information from the make-file. Problems with linking? Check if you have your machine set up correctly.
I tested my hacked code with the applet and it just works: I got a perfect, unbelievable 4524.36ms, which made me 26th with totally unoptimised code. The current leader has sped it up to 50ms, so you and I have work to do.
Thanks Bruce Merry (and others) for pointing out that uploading doesn’t work with the Java-tool under Linux, and coming up with a solution: you need to create /temp and /temp/devsquare, and give it user-rights – another option is ‘sudo ln -s /tmp /temp’ and then it uploads correctly.