mse presentation 2 lakshmikanth ganti ganti/mse_pro.htm

21
MSE Presentation 2 Lakshmikanth Ganti www.cis.ksu.edu/~ganti/ mse_pro.htm

Upload: melinda-malone

Post on 01-Jan-2016

254 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

MSE Presentation 2

Lakshmikanth Ganti

www.cis.ksu.edu/~ganti/mse_pro.htm

Page 2: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Overview

Updates of First phase artifacts Architecture design Formal Requirements Specification Test plan Formal Technical Inspection Prototype Demo

Page 3: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Updates

Vision Document Software requirements Specification

Critical Requirements Absence of Deadlocks Safety Absence of violation assertions

Page 4: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Updates

Project Plan Implementation Plan

User Documentation Revision of Architecture Design Document Assessment Evaluation Project Evaluation Implementing Individual Classes Integration

Page 5: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Architecture Design Algorithm1. Compute forces.

Clear potential and force accumulatorsV := 0for i = 1 to Np do

Fi: = 0Accumulate forcesfor i = 1 to Np – 1 dofor j = i + 1 to Np do Find force Fij of particle j on particle I Fi: = Fi + Fij Fj: = Fj - Fij Find the potential energy contribution

V = V + Vij

2. Integrate equations of motion for i = 1 to Np do

Velinew: = Veli

old + (Fi/mi)DTXi

new: = Xiold + VeliDT

3. Update time counter t: = t + DT

Page 6: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Architecture Design

Page 7: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Architecture Design

and are the specific Lennard--Jones parameters, different for different interacting particles.

r is the distance between the interacting particles.

For water, the values of these parameters are: = 0.316555 nanometers and = 0.6501696 KJ/mole.

Page 8: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Architecture Design Design Modified algorithm Initialize forces and potential energy

for partition1 = 1 to n for partition2 = 1 to n { check if the partitions are neighbors

{ for i = 1 to number of atoms in the partition1 {

initialize force accumulators: sfx = 0, sfy = 0, sfz = 0for j = 1 to number of atoms in the partition2 { check if atom number in partition1 > atom number in partition2 {check if distance between the atoms < cut-off distance {

pot = pot + vlj; fxj = fxj + fx; fyj = fyj + fy; fzj = fzj + fz; sfx = sfx + fjx; sfy = sfy + fjy; sfz = sfz + fjz; } }

} fxi = fxi – sfx; fyi = fyi – sfy; fzi = fzi = fzi – sfz;}

}

Page 9: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Architecture Design

Parallel Program designMap Partition to a threadBounded BufferCommunication

26 neighboring threads

Dimensions [M][M][M][26]

Page 10: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Architecture Design Mapping Buffers Shadows Pseudo code

For time step = 1 to number of iterations{

assign the atoms that belong o this thread depending on their spatial configurationput the atoms in all the shadows.collect the atoms from all the buffers.calculate forces.increment velocities and calculate displacements.calculate energies due to the contribution of this thread’s atoms and

send them to energy writer class.

}

Page 11: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Architecture Design

Class DiagramAtom IO_UtilsLineReaderObjBufEnergyWriterMD_ThreadMD_Par

Page 12: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Architecture Design Use Cases

Read data from input files Assign atoms to threads Transfer atoms to all neighboring threads Get atoms from all the neighboring threads Calculate forces on atoms Increment velocities and displace atoms Calculate Energies Write energies to the file

Page 13: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Formal Requirements Spec.

Java Path Finder : Checks for deadlocks, assertion violations and uncaught exceptions by checking the entire state

space of the parallel program. Model

PC2 PC3

PC1

Buffer 1

Buffer 4

Buffer 3

Buffer 2

put

putput

put

get

get

get

get

Page 14: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Formal Requirements Spec.

ClassesProd-ConsumerBufferVerify

Reference : Java PathFinder User Guide , Klaus Havelund, NASA Ames Research Centre.

Page 15: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Formal Requirements Spec.

AssertionsThe number of objects put into a buffer

by a producer are the same as the number of objects got by a consumer .

The Consumer gets the same objects that are put in the buffer by a producer.

Page 16: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Formal Requirements Spec.

Result

Assertion violations

Deadlocks

Page 17: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Test Plan

Features to be testedRead Data from filesAssignment of atoms to threadsFormatting values for outputPerformance Requirements

Page 18: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Test Plan

DeliverablesTest PlanTest case and results

Page 19: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Formal Technical Inspection

Document to be InspectedArchitecture Design Document

InspectorsTwo Independent MSE Students

Checklist

Page 20: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Demonstration

Page 21: MSE Presentation 2 Lakshmikanth Ganti ganti/mse_pro.htm

Questions