User’s Guide

Basic Implementation

The starting point for launching a simulation is to instantiate the hpc_simulator class. It must receive as arguments at least a workload description – such as a file path in SWF format, a system configuration file path in JSON format, and a dispatcher instance, with which the synthetic system is generated and loaded with all the default features.

A minimal simulator instantiation is presented below.

Minimal implementation
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
from accasim.base.simulator_class import hpc_simulator
from accasim.base.scheduler_class import fifo_sched
from accasim.base.allocator_class import ff_alloc

workload = 'workloads/HPC2N-2002-2.2.1-cln.swf'
sys_cfg = 'config/HPC2N.config'

allocator = ff_alloc()
dispatcher = fifo_sched(allocator)
simulator = hpc_simulator(workload, sys_cfg, dispatcher, RESULTS_FOLDER_NAME='results')
simulator.start_simulation(system_utilization=False, system_status=False, debug=False)

The workload descrition is a public workload trace collected from the Seth cluster belonging the High Performance Computing Center North (HPC2N) of the Swedish National Infrastructure for Computing. The workload trace file includes 200,735 jobs spanning through 4 years, from July 2002 to January 2006, and is available on-line in the SWF format.

Seth was built in 2001 and is already retired by now. It ranked 59th in Top500 listfootnote{https://www.top500.org/}, the world’s 500 fastest computers. It was composed of 120 nodes, each node with two AMD Athlon MP2000+ dual core processors with 1.667 GHz and 1 GB of RAM. Because multiple jobs can co-exist on the same node, we consider a better representation of the system, made of cores instead of processors. Besides, it is required to define the start time of the workload, because the first job belongs to 0. To perform the change between processors and cores, the member equivalence is defined. It contains the actual name, the new one and the equivalence for a single unit. Therefore, we define the synthetic system in the configuration file with 120 nodes each with 4 cores and 1 GB of RAM, as depicted below:

Content of sys_config
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
	"system_name": "Seth - HPC2N",
	"start_time": 1027839845,
	"equivalence": {
		"processor": {
			"core": 2
		}
	},
	"groups": {
		"g0": {
			"core": 4,
			"mem": 1048576
		}
	},
	"resources": {
		"g0": 120
	}
}

The dispatcher instance is composed by implementations of the abstract SchedulerBase and AllocatorBase classes. In this illustrative instantiation of the Simulator class, FirstInFirstOut implements SchedulerBase using FIFO, whereas FirstFit implements AllocatorBase using First Fit allocation policy, and both FirstInFirstOut and FirstFit classes are available in the library for importing, as done in lines 2-3 of the example. AccaSim can be customized in its dispatching method by implementing the abstract SchedulerBase and AllocatorBase classes as desired.

Experimentation

This class renders the automation of complex experiments. After configuring the simulator with a workload dataset, a system to simulate, and a set of dispatchers, the experiment class performs a simulation for each dispatcher and then produces comparative plots through the results visualization.

Download the experimentation-example.py script.