Assisting with the ACM ICPC

Last week I had the privilege of being the technical lead on the technical aspects surrounding the contest, specifically, the south african regionals. Whilst this wasn’t all clear sailing and presented numerous challenges (some technical, and some not) it was never the less a very good experience.

From a technical stand point this year included an enhanced challenge. To be best of my knowledge we hosted the first ever cross-timezone contest due to the inclusion of Benin and Nigeria in the contest. A total of 6 servers that had to be synchronized. Fortunately about four years back I started writing software with exactly this purpose in mind, called Abacus (unfortunately the name was already taken on Sourceforge and we had to settle for AbacusCM – Abacus Contest Manager – the PUN on ACM wasn’t entirely intentional).

My thanks goes out again to the likes of Edwin Peer and Malcolm McLean who assisted with the design of this software, as well as Bruce Merry and Carl Hultquist that assisted with some of the most intense programming that I’ve done ever, as well as Leon Lynch who at the time helped with refinement of some ideas. This year has once more shown that TCP is a bad idea, and whilst the udtcp peer messenger in abacus hits a reasonable middle-ground, I’d still prefer to the original udp-only inter-server design, but with some twists (need to add proper peer-to-peer offer, request, supply mechanism, much closer to the bit-torrent model).

Either way. The previous years we’ve had the University of Pretoria, University of Kwazuly Natal, Rhodes University and two years back the University of Kwazuly-Natal got added. This year we bid welcome to Benin and Nigeria. Both of these are in GMT+1. In spite of Abacus being able to handle split-timing we opted to start all sites at 9:15 GMT+2 (Ok, we ended up starting at ~9:40 GMT+2 in the end). We did end up (due to technical problems) offsetting UKZN by 30 minutes. A further problem was that due to power failures at Nigeria and seriously bad connectivity we weren’t able to actually start the server until relatively late into the contest.

There were also some problems with two out of the five marker nodes dying on us on the morning of the contest (and this is exactly why we have five and not merely the required estimate of two).

Once Nigeria server got started Abacus handled the bad connectivity very well and it was only a matter of time before the server was correctly synchronized and running properly. A few things did become apparent during the contest itself:

  • The problems needs to go through a much more stringent evaluation process. In particular, one of the problems caused severe problems due to the phrasing of a single sentence. The test data should have worked either way, but the phrasing caused ambiguity.
  • There are some missing features in abacus – in particular, the contest duration should be configurable, the contest problem names shouldn’t be available before the contest starts, and it should be possible to configure multiple contests beforehand.
  • All servers should be of a single distro, and to this end we’re hoping to ship a livecd with the abacus server software pre-installed for next year, and then have some flash storage take care of persistent variable storage. Whether this will actually happen only time will tell, but if not I will insist on gentoo based servers.
  • There is still some optimizations to be made due to queries to the MySQL back-ends taking too long. This needs to be either in the form of more support modules, improved indexing, or purely improved queries. With 50+ clients per server all issueing the same query up to once or even twice a second the additional support modules (that basically serves as a cache between the database and the clients) seems the most viable.

All in all the contest went reasonably smoothly. I was surprised with the relatively low number of successful submissions overall. The problems were, in my opinion, not that hard, granted, they were not particularly simple either.

My thanks goes to Linda Marshall, Lona Schoeman, Marco Galottha and Prosper Ngimadi who were the primary people who assisted with organization of the contest.

One Response to “Assisting with the ACM ICPC”

  1. Luke Elis says:

    Extraordinary post as expected.