INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
Defines | Functions | Variables
C:/cygwin/home/Javier/insee/src/trace.c File Reference

Tools for trace guided simulation. More...

#include "globals.h"
#include "dimemas.h"
#include <string.h>
Include dependency graph for trace.c:

Defines

#define FILE_TIME   73
 Default delay for accessing a file.
#define FILE_SCALE   3
 Default scale for file accesses based on the size.
#define op_per_cycle   50
 balances the computation time (cpu time/op_per_cycle)==fsin cycles.
#define cpuspeed   1e6
 The cpu speed in Mhz.
#define BUFSIZE   131072
 The size of the buffer,.

Functions

void read_dimemas ()
void read_fsin_trc ()
void read_alog ()
void random_placement ()
void consecutive_placement ()
void shuffle_placement ()
void shift_placement ()
void column_placement ()
void quadrant_placement ()
void diagonal_placement ()
void icube_placement ()
void file_placement ()
void read_trace ()
void run_network_trc ()

Variables

long ** translation
 A matrix containing the simulation nodes for each trace task.

Detailed Description

Tools for trace guided simulation.

In this file are the functions for reading trace files & the trace guided simulation running module. This file is only used when compiling with TRACE_SUPPORT != 0

Author:
Javier Navaridas

FSIN Functional Simulator of Interconnection Networks Copyright (2003-2011) J. Miguel-Alonso, J. Navaridas

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Function Documentation

void column_placement ( )

Places the tasks consecutively in a cube column.

void consecutive_placement ( )

Places the tasks consecutively (node 0 in switch 0 port 0; node 1 in switch 0 port 1, and so on). same as row

void diagonal_placement ( )

Places the tasks in a diagonal. only 1 instance and 2D torus.

void file_placement ( )

Places the tasks as defined in #placefile. The format of this file is very simple: node_id, task_id, instance_id separated by one or more of the following characters: '<spc>' '<tab>' '_' ',' '.' ':' '-' '>'

void icube_placement ( )

Places the tasks in an indirect cube, keeping a submesh attached to each switch.

void quadrant_placement ( )

Places the tasks in quadrants, isolated subtori, half the size in each dimension.

2 q. for 1-D, 4 q. for 2-D and 8 q. for 3-D.

void random_placement ( )

Places the tasks in a random way.

void read_alog ( )

Reads a trace from a file.

Read a trace from an alog file whose name is in global variable trcfile It only consideres events with id '-101'(send) or '-102'(receive). The alog format is as follows: p2p_op process0 task0 process1 task1 timestamp tag size where: p2p_op: is the point to point operation, i.e. '-101'(send) or '-102'(receive) process0 task0: are the identification of the local process and task process1 task1: are the identification of the remote process and task timestamp: is the timestamp where the event occurred, its value will be dropt tag: is the tag of the mpi operation, it will be use to match sends and receptions size: the size of the message in bytes. it will be translated to number of packets

Collective operations are not processed, so extended traces showing the point-2-point communications within the collectives should be used.

void read_dimemas ( )

Reads a trace from a dimemas file.

Read a trace from a dimemas file whose name is in global variable trcfile It only consideres events for CPU and point to point operations. File I/O could be considered as a cpu event if FILEIO is defined.

< The number of nodes is read here.

< Dimemas record separator.

< Separators to get the task info.

< Operation id.

< Global operation id(for collectives), point-to-point type.

< Task id.

< Thread id.

< The other task id. (sender or receiver)

< The communicator id.

< CPU time(in seconds).

< Message size(in bytes).

< Tag of the MPI operation.

< Communicator id.

< Root task in collectives.

< Root thread in collectives.

< Bytes sent in collectives.

< Bytes received in collectives.

< The read event.

Could try to open traces in ALOG or FSIN trc format instead of panic....

These are communication with different semantic values of the MPI. In study...

void read_fsin_trc ( )

Reads a trace from a file.

Read a trace from a fsin trc file whose name is in global variable trcfile This format only takes in account 'c' CPU, 's' SEND, 'r' RECV, events.

void read_trace ( )

The trace reader dispatcher selects the format type and calls to the correct trace read.

The selection reads the first character in the file. This could be: '#' for dimemas, 'c', 's' or 'r' for fsin trc, and '-' for alog (in complete trace the header is "-1", or in filtered trace could be "-101" / "-102"). This is a very naive decision, so we probably have to change this, but for the moment it works.

See also:
read_dimemas
read_fsin_trc
read_alog
void run_network_trc ( )

Runs simulation using a trace file as workload.

In this mode, simulation are running until all the events in the nodes queues are done. It prints partial results each pinterval simulation cycles & calculates global queues states for global congestion control.

See also:
read_trace()
init_functions
run_network
void shift_placement ( )

Places the tasks consecutively but shifting a given number of places (node 0 in switch 0 port 0; node 1 in switch 0 port 1, and so on).

void shuffle_placement ( )

Places the tasks alternatively one in each switch (node 0 in switch 0 port 0; node 1 in switch 1 port 0, and so on). (for tree and indirect cube )