Step-by-step Install Tutorial
This tutorial will explain you, step-by-step how to experiment with OverSwarm and implement a swarm algorithm tutorial. It assumes you are using a Debian/Ubuntu Linux distribution.
OMNet++ / Oversim
Install the required dependencies:
sudo apt-get install build-essential gcc g++ bison flex perl \ tcl-dev tk-dev blt libxml2-dev zlib1g-dev openjdk-6-jre \ doxygen graphviz openmpi-bin libopenmpi-dev libpcap-dev libgmp3-dev
For RHEL/Centos/SL/Fedora the following should work:
yum install flex bison perl tcl-devel tk-devel blt libxml2-devel zlib-devel doxygen graphviz openmpi-devel libpcap-devel gmp-devel gcc java-1.6.0-openjdk java-1.6.0-openjdk-devel gcc-c++ make
Download OMNet++ 4.1 from http://www.omnetpp.org/omnetpp/doc_download/2217-omnet-41-source--ide-tgz to /tmp. We will install omnet under $HOME/sim
mkdir ~/sim cd ~/sim tar xzvf /tmp/omnetpp-4.1-src.tgz
Add the following in your $HOME/.bashrc :
export PATH=~/sim/omnetpp-4.1/bin:$PATH
Then run
source ~/.bashrc
Compile OMNet++
cd ~/sim/omnetpp-4.1 ./configure make
Download the patched INet from http://www.oversim.org/chrome/site/INET-OverSim-20101019.tgz, uncompress and compile it:
cd ~/sim tar xzvf /tmp/INET-OverSim-20101019.tgz cd ~/sim/INET-OverSim-20101019 make
Download OverSim from http://www.oversim.org/chrome/site/OverSim-20101103.tgz, uncompress and compile it:
cd ~/sim tar xzvf /tmp/OverSim-20101103.tgz cd ~/sim/OverSim-20101103 make
OverSwarm
Install the required packages:
sudo apt-get install git-core openjdk-6-jdk
Get the OverSim sources from Gitorious. Two packages are essential for running OverSwarm: the compiler and the library. The compiler repository is at the following address:
git://gitorious.org/overswarm/ovswcompiler.git
The compiler is written in Java. From the ~/sim directory, download the code with:
git clone git://gitorious.org/overswarm/ovswcompiler.git
and compile all source files using javac.
cd ovswcompiler/src for i in `find -name *.java`; do javac $i; done
The library (called OvSwLib) is at the following address:
git://gitorious.org/overswarm/ovswlib.git
and can be similarly downloaded with
cd ~/sim git clone git://gitorious.org/overswarm/ovswlib.git
Compile it with
cd ovswlib/oversim make
Modify the OverSim Makefile (in ~/sim/OverSim-20101103) by adding the following line at the beginning:
OVSWDIR = <your home directory>/sim/ovswlib/oversim
Change “<your home directory>” with the path to your home directory. Then modify the BUILD_OPTIONS line by adding the following directives:
-I$(OVSWDIR) -L$(OVSWDIR)
Furthermore, in change the following line:
BUILD_OPTIONS += -- -lgmp -lovsw
Recompile OverSim from the ~/sim/OverSim-20101103 directory:
make makefiles make
OverSwarm Bundle
Download and uncompress the overswarm-patch-20101103.diff.tar.gz into your OverSim install directory. Uncompress the tar.gz and apply patch:
cd ~/sim/OverSim-20101103 wget http://syscall.org/lib/exe/fetch.php/overswarm-patch-20101103.diff.tar.gz tar xvfz overswarm-patch-20101103.diff.tar.gz patch -p1 < OverSwarm-Patch-20101103.diff