National Aeronautics and Space Administration Jet Propulsion Laboratory March 31, 2009 CSCI 578...
-
Upload
hilary-lorena-peters -
Category
Documents
-
view
212 -
download
0
Transcript of National Aeronautics and Space Administration Jet Propulsion Laboratory March 31, 2009 CSCI 578...
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
CSCI 578 Course Project: Rearchitecting Scientific Code
March 31, 2009March 31, 2009
David WoollardNASA Jet Propulsion Lab
4800 Oak Grove DrivePasadena, CA 91108
Dept. of Computer ScienceUniversity of Southern California
Los Angeles, CA 90089
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Agenda For Today• Introduction
– Scientific Computing Domain
– Workflows & Grid Computing
– Research Challenge
• Project Goals
• Project Details– Extracting Kernels
– Executable Creation
– Workflow Specification
– SWSA – A Domain Specific Software Architecture
• Timeline
CSCI 578 Course Project - March 31, 2009. 2
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Computational Sciences Today
CSCI 578 Course Project - March 31, 2009. 3
Real science is now being conducted via computational experimentation – or “in silico” computing
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
“in silico” Computing
CSCI 578 Course Project - March 31, 2009. 4
• Discovery is a phase is which a scientist rapidly prototypes, tests hypotheses, and develops a methodology
Discovery Production
Distribution
Theory
Practice
Development
Execution
Lone Researcher[Kepner 03]
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
“in silico” Computing
CSCI 578 Course Project - March 31, 2009. 5
• Production is the engineeringengineering of replicating an experiment on large volumes of data.
Discovery Production
Distribution
We will focus on Production SystemsProduction Systems in this research.
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
“in silico” Computing
CSCI 578 Course Project - March 31, 2009. 6
• Distribution is a phase in which data is dispersed to peers for review and further experimentation including:PapersPapersFederated DataFederated DataDigital LibrariesDigital Libraries
Discovery Production
Distribution
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Validating Computational Science
• Computational science, like all science, requires validation
• Validation comes in two forms:– Scaling (in data and computation)– Independent replication
• Both forms require significant computational resources– Grid is a promising resource
CSCI 578 Course Project - March 31, 2009. 7
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Vision of the Grid
CSCI 578 Course Project - March 31, 2009. 8
Like the power grid, the computational Grid should scale to the demands of
individual users.
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
• Workflows orchestrate processes on the Grid• Workflows are a processing model that incorporate
tasks, data, and rulestasks, data, and rules.• Workflow management systems execute taskstasks on
the Grid using datadata once the task’s dependencies are satisfied based on rulesrules.
Workflow-Based Specification
CSCI 578 Course Project - March 31, 2009. 9
Task 1
Task 2
Task 3
Task 4
Task 5
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
A Plethora of Workflow Languages
CSCI 578 Course Project - March 31, 2009. 10
• Yu & Buyya presented a taxonomy [Yu & Buyya 05]
– Based on workflow properties like model representation and scheduling policy
– Illustration of divergence in the field
• Considered a Grand Challenge [Gil, et al. 07]
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Scaling the Experiment
CSCI 578 Course Project - March 31, 2009. 11
Laboratory Institution Co-laboratory
@Home@Home
OtherOtherInstitutionsInstitutions
Task 1
Task 2
Task 3
Task 4
Task 5
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Independent Replication
CSCI 578 Course Project - March 31, 2009. 12
Collaborator 3rd Party
Task 1
Task 2
Task 3
Task 4
Task 5
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Heterogeneous Environments
CSCI 578 Course Project - March 31, 2009. 13
Laboratory Institution Co-laboratory
Task 1
Task 2
Task 3
Task 4
Task 5
Task 1
Task 2
Task 3
Task 4
Task 5
Task 1
Task 2
Task 3
Task 4
Task 5
Workflow Engine 1
Grid Infrastructure 1
Workflow Engine 1
Grid Infrastructure 2
Workflow Engine 2
Grid Infrastructure 2
Collaborator 3rd Party
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Research Challenge• Scientific validation requires:
– Scaling– Replication
• Existing technologies exhibit three challenges:– Require scientists to become engineers or vice versa– Existing workflow specifications entwine scientific and
engineering concerns– Existing workflow specifications are not portable
CSCI 578 Course Project - March 31, 2009. 14
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Agenda• Introduction
– Scientific Computing Domain
– Workflows & Grid Computing
– Research Challenge
• Project Goals
• Project Details– Extracting Kernels
– Executable Creation
– Workflow Specification
– SWSA – A Domain Specific Software Architecture
• Timeline
CSCI 578 Course Project - March 31, 2009. 15
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Project Goals
CSCI 578 Course Project - March 31, 2009. 16
What do you get out of it? • Experience as a software architect in an unfamiliar domain• Experience refactoring / applying architectural recovery• Exposure to popular Grid technologies• Experience implementing distributed software systems with architectural middleware• A grade
What do I get out of it? • Data on kernel extraction for a canonical set of scientific applications• Performance impacts of architected code• Feedback on methodologies
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Agenda• Introduction
– Scientific Computing Domain
– Workflows & Grid Computing
– Research Challenge
• Project Goals
• Project Details– Extracting Kernels
– Executable Creation
– Workflow Specification
– SWSA – A Domain Specific Software Architecture
• Timeline
CSCI 578 Course Project - March 31, 2009. 17
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Scientific Software Packages (1/3)
CSCI 578 Course Project - March 31, 2009. 18
Search The search benchmark solves a game of connect-4 on a 6 x 7 board using a alpha-beta pruning technique. The problem size is determined by the initial position from which the game in analyzed.
Euler The Euler benchmark solves the time-dependent Euler equations for flow in a channel with a "bump" on one of the walls. A structured, irregular, N x 4N mesh is employed, and the solution method is a finite volume scheme using a fourth order Runge-Kutta method with both second and fourth order damping.
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Scientific Software Packages (2/3)
CSCI 578 Course Project - March 31, 2009. 19
MolDyn MolDyn is an N-body code modeling particles interacting under a Lennard-Jones potential in a cubic spatial volume with periodic boundary conditions.
Monte Carlo A financial simulation, using Monte Carlo techniques to price products derived from the price of an underlying asset. The code generates N sample time series with the same mean and fluctuation as a series of historical data.
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Scientific Software Packages (3/3)
CSCI 578 Course Project - March 31, 2009. 20
Ray tracer This benchmark measures the performance of a 3D ray tracer. The scene rendered contains 64 spheres, and is rendered at a resolution of NxN pixels.
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
What is Kernel Decomposition?• Decomposition is a process in which scientific kernelsscientific kernels are
identified and control/data flow is determined.• Scientific kernels are like functionsfunctions - they have internal scope
and a single entry and exit point. In graph theoretic terms, the call dominancy tree for the basic blocks in the module only have one source and one sink.
• Scientific kernels reify a scientific conceptscientific concept.
CSCI 578 Course Project - March 31, 2009. 21
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Decomposition Process1. Analyze the code for blocks that you can summarize as a step
in the high-level process. Candidates include:– functions/methods that the original programmer(s) abstracted
– Sequences of code that processes linearly
2. Draw the call graph between these blocks
3. Design data structures to pass requisite data between these kernels
4. Iterate, balancing between the complexity of the data to be passed and the unity of code captured in your kernels
CSCI 578 Course Project - March 31, 2009. 22
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Executable Creation
For Each Kernel:• Design data/file formats to capture your input and
output data structures• Write marshalling & unmarshalling code• Implement kernel as a run() method• Watch for scoping issues (you might not have fully
decomposed your system)• Command-line interface:
java <KernelName> <input file path> <output file path>
CSCI 578 Course Project - March 31, 2009. 23
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Workflow Implementation
CSCI 578 Course Project - March 31, 2009. 24
YAWL:Yet Another Workflow Language
http://www.yawl-system.com/
Java-based ImplementationWindows, Linux, OS-X
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Workflow Implementation
CSCI 578 Course Project - March 31, 2009. 25
Taverna:
http://taverna.sourceforge.net/
Java-based ImplementationWindows, Linux, OS-X
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Orchestrate the Executables• Once you have finalized your executables:
1. Implement the control flow you have captured via a workflow specification
2. Incorporate data dependencies
3. Validate the correctness of the resulting orchestration
4. Compare timing and memory usage for the original implementation and the workflow-based system – valgrind, JMX are possible tools
CSCI 578 Course Project - March 31, 2009. 26
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Agenda• Introduction
– Scientific Computing Domain
– Workflows & Grid Computing
– Research Challenge
• Project Goals
• Project Details– Extracting Kernels
– Executable Creation
– Workflow Specification
– SWSA – A Domain Specific Software Architecture
• Timeline
CSCI 578 Course Project - March 31, 2009. 27
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Making Decisions in Design Space
• Existing workflow languages violate separation of concerns– Scientists should work in languages applicable to the design
space, not the solution space– Engineers should not have to become scientists to be able
to scale workflow-based systems
• If workflow languages become the realm of the scientist, how does the software engineer effect change?
CSCI 578 Course Project - March 31, 2009. 28
Manipulation of the system at the architectural level
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
A Model-Driven Approach
CSCI 578 Course Project - March 31, 2009. 29
ComputationIndependent Model
ImplementationIndependent Model
Implementation
Workflow Model
Domain-SpecificSoftware Architecture
Deployment
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Workflow Control Elements
• Sequence: Do A then B
• Conditional: Do A or B
• Loop: Do A n times
• Branch: Do A and B together
• Bound: Do C after completing A and B
CSCI 578 Course Project - March 31, 2009. 30
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Orchestration Through Connectors
• Lau, et al., have proposed exogenous connectors [Lau, et al. 06].
– encapsulate both control and data flow in a software system
– can be hierarchically composed to simulate control flow
• Control can be managed through several constructs:
– Sequence
– Conditional
– Branch & Bound
CSCI 578 Course Project - March 31, 2009. 31
A B
A B
C
A B
A B
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Implementation
• Prism-MW, an architecturally-aware middleware
– Components, Connectors, Topologies and Architecture are reified as first class elements
• Exogenous connectors, invoking connectors, and component wrappers around tasks are build with Prism
CSCI 578 Course Project - March 31, 2009. 32
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
SWSA: A Domain Architecture
CSCI 578 Course Project - March 31, 2009. 33
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Putting it Together• After you have implemented your workflow
orchestration:1. Modify your executables to be prism components: replace
marshalling & unmarshalling code with prism event handling code
2. Develop prism-based connectors with custom event handlers that implement orchestration logic
3. Compare this implementation to the original code and the workflow system for computation time and memory footprint
CSCI 578 Course Project - March 31, 2009. 34
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
Timeline• Monday, March 30: Email [email protected] and
[email protected] with the names, email addresses and student ID numbers of each team member. One email per team please.
• Thursday, April 9: Status report 1 due. One per team. Details and format will be sent to the teams by April 2.
• Thursday, April 23: Status report 2 due. One per team. Details and format will be sent to the teams by April 16.
• Friday, May 1: Project materials due (project report, workflow-based system, and SWSA system).
CSCI 578 Course Project - March 31, 2009. 35
National Aeronautics andSpace Administration
Jet Propulsion Laboratory
References/Further ReadingReferences of workflow systems:
[Yu & Buyya 05] Yu, J. and Buyya, R. A Taxonomy of Workflow Management Systems for Grid Computing. Journal of Grid Computing 3(3-4): pp. 171-200. 2005.
[Gil, et. al. 07] Gil, Y., et. al. Examining the Challenges of Scientific Workflows. IEEE Computer 40(12): pp. 24-32. 2007.
References of exogenous connectors:
[Lau, et. al. 06] Lau, K., et. al. A Software Component Model and its Preliminary Formalisation. In F.S. de Boer et al., editors, Proceedings of Fourth International Symposium on Formal Methods for Components and Objects, Lecture Notes in Computer Science 4111(1-21). 2006.
References on SWSA:
[Woollard 08] Woollard, D. Supporting the Engineering Aspects of e-Science Through Workflow Services. Proceedings of the First Brazilian e-Science Workshop, Campinas, Brazil, 2008.
[Woollard, et. al. 09] Woollard, D. et. al. Injecting Software Architectural Constraints into Legacy Scientific Applications. To appear in Proceedings of the ICSE 2009 Workshop on Software Engineering for Computational Science and Engineering. Vancouver, Canada, 2009.
CSCI 578 Course Project - March 31, 2009. 36