###############################################################################
Advanced RTI System, ARTÌS			http://pads.cs.unibo.it
###############################################################################

©Copyright 2002-2017                      Gabriele D'Angelo, Michele Bracuto

University of Bologna	      Department of Computer Science and Engineering

http://pads.cs.unibo.it                                 <g.dangelo@unibo.it>

----------------------------------------------------------------------------
			Migration Wireless (wireless) - DISTRIBUTED EXECUTION
----------------------------------------------------------------------------
PREREQUISITES:

1)	TCP/IP connected cluster, no firewall between the hosts
2)	SSH login without password in the whole cluster
	For example: https://www.ssh.com/ssh/copy-id
3)	A copy of the ARTÌS distribution (included the simulation model to run)
	in all the nodes of the cluster

-------------------------------------------------------------------------------
CONFIGURATION:

The structure of the distributed cluster and the host running the SImulation 
MAnager (SIMA) are described in the "hosts-distributed.txt" configuration file.

"hosts-distributed.txt" structure:
-	FIRST LINE:
		field 1:	host (domain name) running the SIMA
		field 2:	port used by the SIMA
		field 3:	not used
		field 4:	path in which the SIMA executable is stored
-	OTHER LINES:
		field 1:	host (domain name) running one or more Logical Proceses (LPs)
		field 2:	not used
		field 3:	number of LPs that must be run by such host
					(default=1 that is one LP per host)
		field 4:	path in which the simulation model executable is stored

Some parameters of the simulation model are controlled by the "wireless-base.ini"
configuration file but, in this case, it is not necessary to include the SIMA
directives given that they are automatically derived by "hosts-distributed.txt".

-------------------------------------------------------------------------------
USAGE:

A single main script is provided for the simulator's execution 
(run-distributed.sh). The script executes a single run of the simulation and it 
blocks until all LPs have finished.

-------------------------------------------------------------------------------
OUTPUT:

- A file called sima-$SIMA_HOSTNAME.log in which there is the SIMA log.
- A file called *-result.log in which is reported the log of the first LP
	(that is the one that contains the runtime statistics).
- On each host are stored the *.out and *.err output files produced by
	the wireless simulation model.
-------------------------------------------------------------------------------
