This is an old revision of the document!
Table of Contents
ARTÌS & GAIA HOWTO
The goal of this document is to provide a basic installation and usage guide for the ARTÌS/GAIA software.
Prerequisites
- GNU/Linux: operating system usage
- Bash shell: command line usage
Assumptions
- UBUNTU Linux 10.04.1: desktop version, fully updated
Basic Installation
Download
The last version of the ARTÌS/GAIA software can be freely downloaded from the downloads page.
<fc #ff6600>EXAMPLE:</fc>
wget http://pads.cs.unibo.it/download/artis/ARTIS-2.0.0-LUNES-0.0.1.tar.bz2
Untar the downloaded file in the chosen directory.
<fc #ff6600>EXAMPLE:</fc>
tar xvfz ARTIS-2.0.0-LUNES-0.0.1.tar.bz2
<fc #ff0000>MISSING LIBRARIES:</fc> the standard installation of Ubuntu 10.04.1 is missing some libraries that are needed by ARTÌS/GAIA. The following libraries have to be installed using the command line interface (as shown in the following) or the graphical tools provided in Ubuntu.
name | description |
---|---|
libgcrypt11 | cryptographic functions |
libgcrypt-dev | cryptographic functions, development files |
libglib2.0-0 | library with useful C routines |
libglib2.0-dev | library with useful C routines, development files |
<fc #ff6600>EXAMPLE:</fc>
sudo apt-get install libgcrypt11 libgcrypt-dev libglib2.0-0 libglib2.0-dev
Now we are ready for testing our ARTÌS/GAIA installation. In the main directory of the software (e.g. the ARTIS-2.0.0 directory) there is the STRUCTURE.TXT file that describes the whole software structure including EXAMPLES and MODELS. We will start from the WIRELESS example that is contained in the EXAMPLES directory. In this simple model there is a set of wireless devices moving in a toroidal 2D space. The interactions among them are based on proximity.
<fc #ff6600>EXAMPLE:</fc>
cd ARTIS-2.0.0/EXAMPLES/WIRELESS
All the models and examples are provided as source code and therefore need to be compiled before usage, in all cases a Makefile is provided.
<fc #ff6600>EXAMPLE:</fc>
make
If the compilation is successful then the sima and the wireless binaries have been created in the current directory. A couple of shell scripts are provided for running the example, in this case we will use the run script. Running the script with no parameters generates an error and shows the syntax to be used.
<fc #ff6600>EXAMPLE:</fc>
./run Incorrect syntax... USAGE: ./run #LP #SMH
The first parameter (#LP) is the number of Logical Processes used in the simulation and the second one (#SMH) is the number of objects to simulate.
<fc #ff6600>EXAMPLE:</fc>
./run 2 100
In this case we have run a simulation composed of 2 LPs and a total number of 100 simulated objects (i.e. 50 in each LP).
Both the LPs have completed the execution, the elapsed amount of time is shown in the output. The execution has produced one log file for each LP in which is reported a step-by-step evolution of simulated model. The log files are named 0.out and 1.out.
<fc #ff6600>EXAMPLE:</fc>
gedit 0.out
The first lines in the file (that is the logfile of the LP 0) show some configuration options of ARTÌS/GAIA. In the following is shown step-by-step the position (i.e. coordinates) of each object in the simulated area.
The tail of the file reports the number of simulated steps (Clock), the “Elapsed Time”, the total number of “Processed events” and the “Events per second”.
Now we can proceed with a much more complex simulated model.
<fc #ff6600>EXAMPLE:</fc>
cd.. cd.. cd MODELS/MIGRATION-AGENTS
Also in this case it is necessary to compile the simulated model using the provided Makefile.
<fc #ff6600>EXAMPLE:</fc>
make
If the compilation is successful then the sima and the mig-agents binaries have been created in the current directory. As usual a shell script (i.e. run) can be executed to start the simulation. Running the script with no parameters generates an error and shows the syntax to be used.
<fc #ff6600>EXAMPLE:</fc>
./run Incorrect syntax... USAGE: ./run [#TOT_LP] [#LP] [#IA]
The first parameter (#TOT_LP) is the total number of Logical Processes used in the simulation, the second one (#LP) is the amount of LPs to be run on this computer and, finally, (#IA) is the number of objects to simulate.
<fc #ff6600>EXAMPLE:</fc>
./run 2 2 100
In this case we have run a simulation composed of 2 LPs (both in the local PC) and a total number of 100 simulated objects (i.e. 50 in each LP).
The simulation has run smoothly and two log files have been produced: 0.out and 1.out.
<fc #ff6600>EXAMPLE:</fc>
gedit 1.out