# SimGrid


# 51 SimGrid

Many readers of this book will have access to some sort of parallel machine so that they can run simulations, maybe even some realistic scaling studies. However, not many people will have access to more than one cluster type so that they can evaluate the influence of the interconnect . Even then, for didactic purposes one would often wish for interconnect types (fully connected, linear processor array) that are unlikely to be available.

In order to explore architectural issues pertaining to the network, we then resort to a simulation tool, SimGrid .

Installation

Compilation

You write plain MPI files, but compile them with the SimGrid compiler smpicc .

Running

SimGrid has its own version of mpirun : smpirun . You need to supply this with options:

• -np 123456 for the number of (virtual) processors;
• -hostfile simgridhostfile which lists the names of these processors. You can basically make these up, but are defined in:
• -platform arch.xml which defines the connectivity between the processors.

For instance, with a hostfile of 8 hosts, a linearly connected network would be defined as:

<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">

<platform version="4">

<zone id="first zone" routing="Floyd">
<!-- the resources -->
<host id="host1" speed="1Mf"/>
<host id="host2" speed="1Mf"/>
<host id="host3" speed="1Mf"/>
<host id="host4" speed="1Mf"/>
<host id="host5" speed="1Mf"/>
<host id="host6" speed="1Mf"/>
<host id="host7" speed="1Mf"/>
<host id="host8" speed="1Mf"/>
<!-- the routing: specify how the hosts are interconnected -->