Earthquake proof your code!

So, my first PR mentor taught me to start replies with the word ‘So’. This gives you valuable micro-seconds to compile a sophisticated and accurate reply to the daisy-cutter question just lobbed at you by the archetypal British reporter. Typically dressed in an old anorak, barely visible through a nicotine flavoured cloud and smelling of last night’s pub outing. However the British reporter has a mind like an attack sub, you don’t know it’s there until it lands a couple of nukes on your press release, is torpedoing your arguments, and its active pings are Mike Tysoning their way to the secret part of your brain marked ‘roadmaps’.

So, it is with the same extreme caution that I begin this blog about Ct. You see, I am not really a programmer – sure I did some 6800 assembly at uni but who hasn’t? But I think that this is why I am perfectly positioned to explain why Ct is actually a very important step. If I can understand it and explain it – then it must make sense:

So, Intel went to the software industry and we said:

‘Look chaps, sorry about this, but we seem to have hit a thermal wall with our processors. You canny breaks the laws of physics and we are limited in what we can do in the old single core world. Loads of cores is the way to go!’

The software industry was not best pleased. You see, it is a lunar landing type of investment is necessary to create programming languages designed to take advantage of parallel processing hardware, it will be expensive to rewrite all of the world’s software, you would need the content of Fort Knox to retrain the installed base of programmers, and don’t get me started on what is needed to get the crusty old university professors to move syllabuses to many-core nirvana. (my uni refused to acknowledge Windows was anything worth looking at, and this was in ’94).

So with that in mind, here is my analogy: An earthquake is upon us. This earthquake is shaking the foundations of computing, and especially the software cities. The earthquake is many-core. Now there are several ways to protect your buildings (your programs source code) from this earthquake.

• The most expensive and scary method is to raze the landscape and start from scratch creating earthquake resistant code. Brand new programs, all nicely parallelized for the brave new world. Some programming models require such a scorched earth policy.

• For some programs, performance isn’t everything, so programmers will leave their code alone.

• And now we have a new option. To retrofit existing buildings (code) to be earthquake-proof. This is what Ct is.

So, Ct is a way of taking your existing code and doing some comparatively minor alterations to it in order to get quick and easy performance gains. You see Ct is clever that way, even though it is a higher level language (like C# or Python) and it abstracts you from the hardware (the same code will run on Larrabee or Nehalem, or Sandy Bridge), the syntax is standard C++ and so very familiar to one and all. Ct is NOT a competitor to CUDA or OpenCl, those are device-oriented (AKA hardware) abstraction layers. Ct is application oriented and the programming model says nothing about the underlying architecture. (Does this mean it could one day support other or new architectures? Perhaps.)

Retrofitting is usually pretty difficult. Modern software architecture is very complex, components build on each other like floors and subsystems in a building. The path(s) of the program that you want to optimize for multi-core might be spread across these components. Many parallel programming models require that you isolate out these paths and rewrite them, but this is as easy as tearing out different chunks of each floor of a building (think the block stacking game Jenga). The trick to making this easier (or less prone to collapse) is to not to force developer to tear out chunks of code, but rather to augment what is already there. This is essentially what Ct does.

Ct is all about productivity. Much as though I hate to admit this, but quite often in the software world, deadlines trump exquisite coding and performance optimizations, and Ct will address that. It will be an easy way of retro-fitting your existing programs (and writing new programs) to take advantage of the goodness of Intel’s multi- and many-core chips.

For more info on Ct, click here and here.

Want to find out more interesting things? Follow me on Twitter: @IntelNick

Comments are closed.