Skip navigation.
Home

Cloud Based Parameter Sweeping of a Repast Simulation Model - Batch Mode

1 Introduction

We have already introduced how to use Aneka Design Explorer GUI for Repast Simphony Parameter Sweeping Application Model. It creates each parameter sweeping run as a task, and distributes them to several slave nodes, then gets all the results back in one master node. However, sometimes users may prefer to use batch mode Design Explorer since they maybe have more complicated computing and wish the application running background.

In this paper, we introduce a simple example of writing an interface for Parameter Sweep Model, which uses Aneka Task Execution Model. And then, we introduce how to use the interface we developed for Repast Simphony Parameter Sweeping Application.

2 Preliminary

The user should be familiar with the general concepts of Grid and Cloud Computing, Object Oriented programming and generics, distributed systems, and a good understanding of the .NET framework 2.0 and C#.

The practical part of the tutorial requires a working installation of Aneka. It is also suggested to have Microsoft Visual Studio 2005 (any edition) with C# package installed even if not strictly required.

2.1 Aneka

Aneka is a market oriented Cloud development and management platform with rapid application development and workload distribution capabilities. It allows different kind of applications to be executed on the same grid infrastructure. In order to support such flexibility it provides different abstractions through which it is possible to implement distributed applications. These abstractions map to different execution models. Currently Aneka supports three different execution models:

  • Task Execution Model
  • Thread Execution Model
  • MapReduce Execution Model

Each execution model is composed by four different elements: the WorkUnit, the Scheduler, the Executor, and the Manager. The WorkUnit defines the granularity of the model; in other words, it defines the smallest computational unit that is directly handled by the Aneka infrastructure. Within Aneka, a collection of related work units define an application. The Scheduler is responsible for organizing the execution of work units composing the applications, dispatching them to different nodes, getting back the results, and providing them to the end user. The Executor is responsible for actually executing one or more work units, while the Manager is the client component which interacts with the Aneka system to start an application and collects the results. The key elements of the Aneka Application Model is shown below:

Hence, for the Task Model there will be a specific WorkUnit called AnekaTask, a Task Scheduler, a Task Executor, and a Task Manager. In order to develop an application for Aneka the user does not have to know all these components; Aneka handles a lot of the work by itself without the user contribution. Only few things users are required to know:

  • how to define AnekaTask instances specific to the application that is being defined;
  • how to create a AnekaApplication and use it for task submission;
  • how to control the AnekaApplication and collect the results.

This holds not only for the Task Model but for all execution models supported by the Aneka.

2.2 Task Model

The Task Model defines an application as a collection of tasks. Tasks are independent work units that can be executed in any order by the Scheduler. Within the Task Model a task comprises all the components required for its execution on a grid node.

The task programming model is the most straightforward programming model available with Aneka and can be used as a base on top of which other models can be implemented. For example the parameter sweeping APIs used by the Design Explorer rely on the Task Model APIs to create and submit the tasks that are generated for each of the combinations of parameters that need to be explored. More complex models such as workflows can take advantage of this simple and thin implementation for distributing the execution of tasks.

2.2.1 AnekaApplication Configuration

In order to create run the Task Model we need to create the AnekaApplication instance first. While it is possible to omit the display name of the application, we need to provide a Configuration object which tunes the behavior of the application being created.

An instance of the Configuration can be created programmatically or by reading the application configuration file that comes with any .NET executable application. In case we provide the configuration parameters through the application configuration file it is possible to get the corresponding Configuration instance simply by calling the static method Configuration.GetConfiguration() or by using the overloaded version that allows us to specify the path of the configuration file. These methods expect to find an XML file like the following:

3 Implementation

After the basic introduction, for the ease of the users who have little knowledge of Cloud Computing and Aneka Task Model, we introduce a very simple example of how to implement the interface for REPAST Parameter Sweep Application by using Design Explorer PSM.core.dll, which is built on top of Aneka Task Model.

3.1 Simple Parameter Sweep Model Method

The figure above illustrates the key elements of how to build the simple PSM model. The user defined class named SimplePSMProjectInterface which creates a Aneka.PSM.core.JobManager. The JobManager class has two useful properties:

  • Configuration: used to set AnekaApplication Configuration we have discussed.
  • SubmittedJob: used to set the jobs as PSMJobInfo instance. One can read PSMJobInfo instance from a psm file via .NET XML deserialization.

There are only two steps:

  1. Create a JobManager and set Configuration and SubmittedJob;
  2. Start the JobManager.

3.2 Use the Interface

There are several ways to use this interface; one is to set the client side to use it as a web service. To do this, just follow the Walkthrough: Creating and Using an ASP.NET Web Service in Visual Web Developer.

4 References

[1] The first article.

[2] http://www.manjrasoft.com

[3] http://repast.sourceforge.net/

[4] http://msdn.microsoft.com/en-us/library/8wbhsy70(VS.80).aspx

AttachmentSize
AnekaApplicationModel.jpg101.59 KB
AnekaConfigurationXML.JPG17.23 KB
simplePSMProject_Interaction.png7.36 KB

hii... i need help...

i'm currently doing a final year project on aneka platform, developing the task aneka model on for a distributed app. ive managed to develop the app but the result is unexpected. it was supposed to decrease the time to calculate large number of matrix on a 3 nodes compared to a standalone pc. yet, my result shows the opposite. it increases the time. when i did timespan, it showed that the most time consuming is the assigning the task to aneka instances. can somebody help me out here? thanks alot..

Latest image