Jul 11, 2010

Installing Swarm in Ubuntu

I've been hoping to use this software called Swarm, which is a modelling framework used for multiple-agent simulations. Unfortunately the code they have easily available on their site doesn't work on my 64-bit Ubuntu machine, and their Ubuntu instructions are a bit outdated! However, Paul Johnson of the University of Kansas has created some debs available to use. To install, just use this code:
sudo apt-get install libhdf4-dev libhdf5-serial-dev gobjc libobjc2
mkdir swarm-install
cd swarm-install
wget http://pj.freefaculty.org/Ubuntu/10.04/amd64/blt/blt_2.4z-5_amd64.deb
wget http://pj.freefaculty.org/Ubuntu/10.04/amd64/blt/blt-dev_2.4z-5_amd64.deb
wget http://pj.freefaculty.org/Ubuntu/10.04/amd64/swarm/libswarm0_2.4.0-1_amd64.deb
wget http://pj.freefaculty.org/Ubuntu/10.04/amd64/swarm/libswarm-dev_2.4.0-1_amd64.deb
sudo dpkg -i blt_2.4z-5_amd64.deb
sudo dpkg -i blt-dev_2.4z-5_amd64.deb
sudo dpkg -i libswarm0_2.4.0-1_amd64.deb
sudo dpkg -i libswarm-dev_2.4.0-1_amd64.deb
This will install Swarm. You can grab some sample apps here. One issue though, when compiling the apps they expect a basic Makefile to be installed at /usr/etc/swarm, which is not a folder. To fix this you need to tweak the Makefile. Open the Makefile for the project you want to build and change the line that looks like this:
include $(SWARMHOME)/etc/swarm/Makefile.appl
to this:
include /etc/swarm/Makefile.appl
After that the apps should compile just fine, provided your system can compile Objective-C apps (I included gobjc there in the list, it should work just fine).

No comments: