Setting up Contest Management System

By Yihang Ho

I spent the weekend trying to set up the Contest Management System (CMS) used during IOI 2012 and 2013 for the coming Malaysia Computing Olympiad (MCO). After some tinkering, I manage to get the CMS to work, and we plan to have a trial soon.

I am using v1.0.1 of CMS (get a copy here) on Ubuntu 12.04 LTS. Take note that if you are using v1.0.1, then you must use the 32-bit version of Ubuntu (or any other OS). The documentation is very complete, but there are some tiny problems that I have to figure out myself.

  1. After setting up the database, before running the CMS, you need to create a contest first. A really easy way to do this will be to just import the sample contest.
    • $ git clone
    • $ cmsYamlImporter con_test
    • and you're done.
  2. According to the documentation for the importer, the importer currently uses quite a lot of Italian terms. As a result, you will have to constantly refer to the documentation to design your own contest.
  3. As of v1.0.1, there are some weird behavior with the importer. First of all, for all tasks that are using the GroupMin (and possibly GroupMul also), the total score across all subtasks must be 100. If you need to configure your task such that the total score is not 100, you can remove line 301 of cmscontrib/
  4. Also, somehow token_gen_time for individual task is not reflected.
  5. The documentation for "Running CMS" is somewhat incomplete. Before running cmsResourceService -a, you need to run cmsRankingWebServer &, or nohup cmsRankingWebServer & on actual production server.


  1. If, after running cmsResourceService -a, all the child processes restart over and over again, as mentioned here, kill the cmsResourceService, then run ps aux and look for the entry for cmsLogService. Take note how the how line looks like. Most likely, it is something like /usr/bin/python2 /usr/local/bin/cmsLogService. Now check your cms.conf around line 143, make sure each component matches what you see in ps aux. Most likely you will have to change /usr/bin/python to /usr/bin/python2.
  2. If, after submitting a solution to any task, and somehow all the solutions cannot be compiled, just like what is described in this issue, well, the solution is right there.