210 likes | 318 Views
MSE Presentation 2. Lakshmikanth Ganti www.cis.ksu.edu/~ganti/mse_pro.htm. Overview. Updates of First phase artifacts Architecture design Formal Requirements Specification Test plan Formal Technical Inspection Prototype Demo. Updates. Vision Document Software requirements Specification
E N D
MSE Presentation 2 Lakshmikanth Ganti www.cis.ksu.edu/~ganti/mse_pro.htm
Overview • Updates of First phase artifacts • Architecture design • Formal Requirements Specification • Test plan • Formal Technical Inspection • Prototype Demo
Updates • Vision Document • Software requirements Specification • Critical Requirements • Absence of Deadlocks • Safety • Absence of violation assertions
Updates • Project Plan • Implementation Plan • User Documentation • Revision of Architecture Design Document • Assessment Evaluation • Project Evaluation • Implementing Individual Classes • Integration
Architecture Design • Algorithm 1. Compute forces. Clear potential and force accumulators V := 0 for i = 1 to Np do Fi: = 0 Accumulate forces for i = 1 to Np – 1 do for 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: = Veliold + (Fi/mi)DT Xinew: = Xiold + VeliDT 3. Update time counter t: = t + DT
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.
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 = 0 for 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; } }
Architecture Design • Parallel Program design • Map Partition to a thread • Bounded Buffer • Communication • 26 neighboring threads • Dimensions • [M][M][M][26]
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 configuration put 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.}
Architecture Design • Class Diagram • Atom • IO_Utils • LineReader • ObjBuf • EnergyWriter • MD_Thread • MD_Par
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
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 put Buffer 3 get PC3 PC2 get Buffer 4 put get put Buffer 1 Buffer 2 put get PC1
Formal Requirements Spec. • Classes • Prod-Consumer • Buffer • Verify • Reference : Java PathFinder User Guide , Klaus Havelund, NASA Ames Research Centre.
Formal Requirements Spec. • Assertions • The 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.
Formal Requirements Spec. • Result • Assertion violations • Deadlocks
Test Plan • Features to be tested • Read Data from files • Assignment of atoms to threads • Formatting values for output • Performance Requirements
Test Plan • Deliverables • Test Plan • Test case and results
Formal Technical Inspection • Document to be Inspected • Architecture Design Document • Inspectors • Two Independent MSE Students • Checklist