User Tools

Site Tools


pads:artisinst

This is an old revision of the document!


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

Missing libraries

<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

A simple example

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. Furthermore, two extra log files for runtime errors and low level diagnostic are produced: 0.err 1.err.

<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 please take some time for reading the source code of this simple example: wireless.c. This model is based only on the APIs provided by the ARTÌS runtime. For an example that is based on the GAIA framework please see the next section.

A more complex model

Now we can proceed with a much more complex simulated model in which are used the features offered by the GAIA framework.

<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, as usual two log files (0.out, 1.out) and two error files have been produced.

<fc #ff6600>EXAMPLE:</fc>

gedit 1.out

pads/artisinst.1350377634.txt.gz · Last modified: 2012/10/16 08:53 by gdangelo

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki