Module3-Cc-Chapter 7
Module3-Cc-Chapter 7
(MPI)
• Message Passing Interface (MPI) is a
specification for developing parallel programs
that communicate by exchanging messages.
• Compared to earlier models, MPI introduces
the constraint of communication
• create common ground from the several
distributed shared memory and message-
passing infrastructures available for
distributed computing
MPI provides developers with a set of routines that:
• Manage the distributed environment where
MPI programs are executed
• Provide facilities for point-to-point
communication
• Provide facilities for group
communication
• Provide support for data structure definition
and memory allocation
• Provide basic support for synchronization with
blocking calls
MPI reference scenario
Workflow applications with task dependencies
• Workflow applications are characterized by a
collection of tasks that exhibit dependencies
among them.
• Such dependencies, which are mostly data
dependencies (i.e., the output of one task is
a prerequisite of another task),
What is a
workflow?
• Documents, information, or tasks are passed
from one participant (a resource; human or
machine) to another for action
• Example: Sample Montage workflow
• Montage is a toolkit for assembling
images into mosaics;
Workflow technologies
• Business-oriented computing workflows are defined as compositions
of services, and there are specific languages and standards for the
definition of workflows, such as Business Process Execution
Language (BPEL)
• scientific computing there is no common ground for defining
workflows, but several solutions and workflow languages coexist
• normally stored in the form of an XML documents
Some of the most relevant technologies for
designing and executing workflow-based
applications are
• Kepler,
• DAGMan,
• Cloudbus Workflow Management
System,
• Offspring.
Cloudbus Workflow Management System (WfMS) is a middleware platform built for
managing large application workflows on distributed computing platforms. It comprises
s/w tools that help end users compose, schedule, execute, and monitor workflow
applications through a Webbased portal. To execute workflows, WfMS relies on the
Gridbus Broker, a grid/cloud resource broker, it uses proprietary XML language for the
specification of workflows
Offspring, offers a programming-based approach to develop workflows.
Users can develop strategies and plug them into the environment.
Advantage- ability to define dynamic workflows. It provides a native
integration with Aneka and supports a simulated distribution engine for
testing strategies.
Aneka task-based programming
• Aneka provides support for all the flavors of
task-based programming
• bag-of-tasks application
• Aneka.Tasks.ITask
• parameter sweep applications and workflows
have been integrated into the framework
Task programming model
Developing applications with the task model
• Defining classes implementing the
interfac ITask
e a properly configured
• AnekaApplication
Creating instance
• Creating ITask instances and wrapping
them into AnekaTask instances
• Executing the application and waiting for
its completion
ITask and
AnekaTask
• Aneka.Tasks namespace (Aneka.Tasks.dll)
• ITask interface
• ITask interface provides a programming approach for
developing native tasks
• .NET framework
• Visual Basic, C#, C++, Python, COBOL, Jscript, Eiffel, Java, Haskell, Pascal, ML, Ada, APL, C, C++, Perl, SmallTalk, Oberon,
Scheme, Mercury, Oz, RPG, Objective Camlto name some of them
• need to be serializable
• Example: computes the Gaussian distribution for a given point x
• ITask provides minimum restrictions on how to implement a
task class
• It is required for managing tasks within Aneka
• Aneka.Entity.WorkUnit
• facilities for specifying input and output files for the task
Controlling task execution
• Task classes and AnekaTask define the computation logic of a
task-based application
• implementing the coordination logic of the application.
• AnekaApplication<AnekaTask, TaskManager>
• Static and dynamic task submission
• Application state and task state monitoring
• Event-based notification of task completion or failure
• Static submission is a very common pattern in the case
of task-based applications, and it involves the creation of
all the tasks that need to be executed in one loop and
their submission as a single bag
• Dynamic submission of tasks is a more efficient technique and
involves the submission of tasks as a result of the event-
based notification mechanism implemented in the
AnekaApplication class
• a new task for the computation of an intermediate
value of the distribution is submitted.
• WorkUnitFailed and WorkUnitFinished
File management
• files may constitute input data for tasks
• may contain the result of a computation
• may represent executable code or library dependencies
• support for file transfers
• Aneka provides built-in capabilities for file management in a
distributed infrastructure
• WorkUnit and ApplicationBase classes
• ApplicationBase.SharedFiles
• WorkUnit.InputFiles
• WorkUnit.OutputFiles
• A fundamental component for the
management of files is the FileData class
• Aneka.Data.Entity namespace (Aneka.
Data.dll).
A FileData instance provides information about
a file:
•Its nature: whether it is a shared file, an input file, or an output
file
• Its path both in the local and in the remote file system,
including a different name
•A collection of attributes that provides other information (such
as the final destination of the file or whether the file is transient
or not, etc.)
Task
libraries
• Aneka provides a set of ready-to-use tasks for performing the
most basic operations for remote file management
• Aneka.Tasks.dll library
• File copy, Legacy application execution, Substitute
operation, File deletion, Timed delay, Task composition
Web services integration
• Local file copy on the remote node
• File deletion
• Legacy application execution through the common shell
services
• Parameter substitution
Developing a Parameter sweep application
• Aneka integrates for
support sweeping parameter- top
applications on model of the task
• Programming APIs or graphical user interfaces
(GUIs).
• The set of abstractions and tools supporting
the development of parameter sweep
applications
• Parameter Sweep Model (PSM) - Aneka.PSM
The PSM is organized into several namespaces under the
common root Aneka.PSM. More precisely:
• Aneka.PSM.Core (Aneka.PSM.Core.dll)
•Aneka.PSM.Workbench
(Aneka.PSM.Workbench.exe) and
Aneka.PSM.Wizard (Aneka.PSM. Wizard.dll)
• Aneka.PSM.Console
(Aneka.PSM.Console.exe)
Object model
(Aneka.PSM.Core.PSMJobInfo), which
identifies a parameter sweep application
• PSMJobInfo
• PSMFileInfo
five different types of parameters:
• Constant parameter (PSMSingleParameterInfo).
• Range parameter (PSMRangeParameterInfo).
• Random parameter (PSMRandomParameterInfo)
• Enumeration parameter
(PSMEnumParameterInfo).
• System parameter
(PSMSystemParameterInfo
).
Special parameters
• (PSMContext) that is responsible for providing
default and runtime values
• collection of commands (PSMCommandInfo)
The available commands for composing the task
template perform the following operations:
•Local file copy on the remote node
(PSMCopyCommandInfo)
• Remote file deletion
(PSMDeleteCommandInfo)
•Execution of programs through the shell
(PSMExecuteCommandInfo)
•Environment variable setting on the remote node
(PSMEnvironmentCommandInfo)
•String pattern replacement within files
(PSMSubstituteCommandInfo)
Development and monitoring tools
• The core libraries allow developers to directly
program parameter sweep applications and
embed them into other applications
• Additional tools simplify design and development
of parameter sweep applications by providing
support for visual design of the applications and
interactive and noninteractive application
execution.
• Aneka Design Explorer and the Aneka PSM
Console.
Managing
workflows
• Support for workflow in Aneka is not native
but is obtained with plug-ins that allow client-
based workflow managers to submit tasks to
Aneka.
• two different workflow managers can leverage
Aneka for task execution: the Workflow
Engine and Offspring