Posts Tagged ‘rant’

On the use of the mean to determine the correct average value for speedup

Tuesday, April 27th, 2010

I am attending the CGO 2010 conference in Toronto at this moment. I have seen at least 10 papers pass by that are reporting speedup values over a number of benchmarks. Nothing wrong there, except for the tiny — nay, extremely — annoying fact that the authors are using the geometric mean to report average speedup across the benchmark suite.

Let me show with a simple example that this is fubar before giving the actual reason why it is wrong — even though the values are not necessarily off by much, but that is besides the point.

Consider three applications A, B and C, with respective original execution times 3, 2 and 4 (in a unit of time of your choice). After a fancy optimisation or whatever, the execution times become 1,1 and 2, respectively. So, the individual speedup values are (original / new execution time) and this yields 3, 2 and 2, respectively. Now, if we were to execute the programs A, B and C one after the other, the total execution time for the original programs is equal to 3 + 2 + 4, i.e., 9 and the total execution time for the fancy optimised versions is 4. Hence, the speedup for all the applications is 9/4, which is thus the average speedup.

So which of the three means would yield this value? Let’s take a look, shall we? The arithmetic mean of the individual speedup values yields 7/3. The geometric mean yields 12^(1/3), which equals (at four significant digits) 2.289. The harmonic mean, finally, yields 3 / (1/3 + 1/2 + 1/2) or 9/4. Well well. What an amazing coincidence! So, clearly, the geometric mean is not yielding the correct value of 2.25.

The reason for this is simple. First of all, the aggregate speedup is not the product of the individual speedups, so the geometric mean is not applicable. The arithmetic mean also is not applicable, since the reference value is found in the denominator.

So, dear CGO authors, the geometric mean is not the right mean to use. Think on it.

Strike!

Friday, October 3rd, 2008

It will be clear to everyone who followed the news media the last few weeks that a major troublesome issue has risen in the financial world. Next to the fact that the economy seems to be grinding to a halt, idiots have been gambling with the money people have trust into their care. The Belgian government – insofar as we can call it one – has invested large amounts of money – or at least the promise to pay those amounts – into two large banks: Fortis and Dexia.

Traditionally, the fall marks the start of talks between unions, employers and the government, to decide if the wages should be adapted, i.e., if people should be given a raise, and under which conditions this should happen. It is usually a time when tough language is used, threats are outed and knives are sharpened – if not literally, then certainly as a manner of speech. Given that the purchasing power supposedly is on the way down – and looking at the piece of month I have left at the end of my paycheck, I must agree – the unions want a raise, such that employees can increase their purchase power. This seems reasonable, up to a certain point. But this year, the unions have announced preemptive actions (thank you Mr. Bush, to convey that notion). They do not call it a strike day, but actions will be held. If you can read between the lines, it obviously is meant as a national strike day. Even though I fully agree with the right to go on strike when all other options are exhausted, I still wonder what the rationale is behind this action.

It is clear that the economy will take another hit. The public transportation sector will most certainly join the strikers (they are well known for their solidarity in this aspect). So, a lot of people who do not have the luxury, or the common sense to have two cars per household will be barred for going to work, or at least from getting there on some reasonable time – let alone getting home before midnight (they are expected to show up the next day though – so much for rewarding people who are willing to work). But, the education unions have now also called for their members to join the action. This means, that people with kids, i.e., me, will not be able to go to work, even if I would have had a second car (which I don’t). So, will I get paid for the vacation day I will be obliged to take? I could of course sign up and join a union and get paid by them because I am on strike, but I find that to be immoral given my position, wage and freedom at work. So, next Monday, I’ll be home with two kids.

Idiots. Or am I the idiot?

LHC news

Thursday, September 11th, 2008

I am getting really sick of all the bullshit that is being said by journalists about the LHC. For one, they are not deliberately trying to create a black hole. The question why people are ‘afraid’ is just as much crap. If the journalists would not make so much noise, nobody would be afraid of anything.

I had expected a bit more from the VRT journalists, even though the program (Terzake) deteriorated since last year. I also hate how they interrupt the interviewed person.

Protection FAIL

Tuesday, May 13th, 2008

Oh joy. After installing a bunch of sun protection screens on the building windows, they decided to turn the power breaker off. So, during what is probably going to be one of the warmer weeks this year, the entire installation is quite useless. So much for good planning.

Technicum renovation

Wednesday, April 9th, 2008

All south-facing windows in the building where I work, have been equipped with sun screens. That is, against the outer wall, technicians have installed electrical sun screens. The idea is that by keeping the sun out during the summer (it can get really warm in here) we would somehow be saving energy. Yet the only air-conditioning devices are located in the server rooms. And they lie next to a cool hallway. I wonder how long it will take before the screens are attached to power: the wire is there, I can see it hanging from the window (through which they drilled a hole), but nobody came by to (i) clean up the dirt, or (ii) connect the screen to power. Sigh.

If the university wanted to do something about the poor state of the building, we would have received new, double-glass windows, with high-insulating gas between the glass layers. But oh no … better we have sun screens.

I sometimes fail to grasp the decisions people at the upper echelons take. No, make that most of the time.

Ghent University has a new web application

Friday, April 4th, 2008

So, Ghent University has a new portal site for employees where they can get information regarding their paycheck, vacation, etc. So far, so good. The downside is the way the portal is advertised. First of all, UGent offers access to Windows applications via the Athena portal, where selecting an app in the browser launches e.g., a Citrix client to connect to the Windows server. Now, access to the new portal should go through Athena, so naturally I expected to meet a Windows application. And lo! I saw a Windows application starting. And it was … the Internet Exploder (IE6).

Give me a frakking break. (FYI, yeah, I admit being hooked on BG.)

Why would you want your users to go through the motions of logging in to the application portal (Athena), and from there start a browser which logs you in to a — right — web application?!!!?!?! The reason soon becomes apparent. You cannot do anything with it, unless you use IE. At least, neither Safari, nor Firefox or Camino seen to be able to show me anything I can use.

I am flabbergasted. Really. We claim to teach people good IT practices? I wonder where I can give feedback on this borked app.

VRT website goes back in time

Monday, January 7th, 2008

Disclaimer: I am no designer. But when I take a look at the restyled VRT news site, I start to shudder. This is the initial look:

Picture 1

So, a few things that particularly bother me. The banner with the presenter’s faces is far too large. I know what these people look like and it add no value to the page whatsoever. The video selection row is too intrusive, and should be placed on a sub-page, or at least somewhere below. The first thing I like to do is choose a main topic, not watch videos. And the bar is just ugly. The headlines are centered in the page, but they take up too much space. It seems like they want a picture for everything. The main topic selection box is located on the wrong place: too low and on the right. In this country, we read from left to right, top to bottom.

And then there is this (this link might be illegal according to their terms of use ;-) :

As far as I know, you cannot disallow people to link to a page.

The AFS saga continues

Friday, December 14th, 2007

In the previous post, I mentioned that AFS denies access to your files when you do not have a token. This is still true, but apparently, you are able to launch both at and cron jobs using keytabs. This is a file, residing outside of the AFS realm, containing the password in some processed form (so the password is not available in clear text). Keytabs are created by the system administrator. More information is available here (ELIS internal use only). This seems like the best way forward, and also the most secure approach.

There is, hoewever, a far less secure alternative. You can provide your password in a file, or interactively, to the kinit process which will then obtain a token on behalf of the application you wish to execute, by doing

kinit --password-file=filename application

Saving the password in a file (especially outside of AFS) seems like a major security issue, but that’s probably me.

AFS does not like screen

Thursday, December 13th, 2007

People at our department are often running jobs that take multiple days to complete. A good way to keep a job going is to use the screen tool. This allows one to keep running a shell even when not connected to the machine for a while, and to reconnect to that session when you login on the machine once more. Simple, lean and mean.

Suppose you wish to run a job, and save its output to a file that resides on your home directory, which is, incidentally, and AFS mount. You log in, get a token (as per the manual method described here, fire up screen, start your job, leave screen (using the nice ctrl-a-d keystroke), and log out because you like to take your laptop home (which sounds almost like the purpose of having a laptop in the first place). The next day you arrive at the office, turn on the laptop, connect it to the omnipresent ethernet, and log into the machine (yes, you request a token again) and you check the output of you job … Not a good idea if you have a faint heart, or that data was really, really due, like yesterday.
Why, the innocent reader now asks? Well, clearly, because the output has not made its way to the file as you would have liked it to do. To cut short the story: the moment you logged out, your AFS token was revokes, or became invalid, or whatever, and the file that was greedily accepting your bits suddenly was inaccessible to your process. For example,

#!/bin/bash

i=0;
while(true); do
        echo "hup $i"
        sleep 1;
        echo "pup $i";
        i=`expr $i + 1`;
done;

woud yield this:

hup 0
pup 0
hup 1
pup 1
hup 2
pup 2
hup 3
pup 3
hup 4
hup 17
pup 17
hup 18
pup 18
hup 19
pup 19
hup 20
pup 20
hup 21
pup 21
hup 22

if you had logged out after 4 seconds and logged back in (and acquired a token) about 13 seconds later.

Boooooo! Eat that.

Of course, a simple workaround exists: save the data temporarily to a local file on the machine, e.g., in /tmp (and pray that the tmp dir is not wiped nightly). But that does kind of defeat the purpose of having a secure filesystem on which to store your data, does it not?

Numbers thinks for you

Friday, October 12th, 2007

As pleased as I am with the iWork’08 suite, the new kid on the block, i.e., Numbers, does lack some things I like, or better, that I need. Performance issues aside, Numbers is quite a nitfy tool, provided you let it do the thinking for you. Especially with respect to charts.

Consider the following problem. Given a set of data, containing a few outlying values, create a chart that zooms in on the majority of the data, leaving the outliers off the plot. Cannot do. The Numbers Help has this to say on the matter:

To format the value axis:

  1. Select a chart.
  2. Click Inspector in the toolbar, click the Chart Inspector button, and then click Axis.
  3. To set the value at the chart origin, type a number in the Minimum field (under Value Axis Format).
    The Minimum value cannot be higher than the minimum value of your entire data set.

  4. To set the highest number displayed on the value axis, type a number in the Maximum field.
    The Maximum value cannot be lower than the maximum value of your entire data set.

  5. To specify the number of axis markings between the minimum and maximum values, specify a number in the Steps field.

Eh?! So you man that I cannot limit the Y-value range to the rang I find interesting? You got to be shitting me!