#!/bin/bash

###########################################################################################
#	run_noip-mpi
#		version: 	1.0	12/12/13
#
#		original author:	Michele Bracuto		<bracuto@cs.unibo.it>
#		modified by:		Gabriele D'Angelo	<g.dangelo@unibo.it>
#
#	description:
#		called by the "run" wrapper. Standard parallel execution using MPI
#		and WITHOUT the SImulation Manager (SIMA)
#
###########################################################################################

###########################################################################################

HOST="localhost"
NLP=$1
SLP=$2
TOT_IA=$3

###########################################################################################

echo "INTERACTING AGENTS noIP mpi batch..."

# Partitioning the #SMH among the available LPs
IA=$((TOT_IA/NLP))

echo "Starting the >>>mig-agents<<< instances..."

# Lanching the LPs, all on this host
mpirun -np $NLP ./mig-agents $NLP $IA
