Download - MOPL - Matrix Operation Parallelism Language
MOPL
MOPLMatrix Operation Parallelism Language
Designed and implemented by:Fengwei Zhang,Maoliang Huang,Thomas Ricatte,Jorge Portal,Seoho Lee
April 29th
MOPLIntroduction
Motivation
Explosion of multiprocessor technology in modern timesSoftware designers should (and will be required to soon, if notalready) take advantage of this technology
Stay competitiveBetter quality of softwareHigher user satisfaction
Researchers can definitely benefit from exploiting thistechnology as well
Less time-consuming modeling and experimentation comparedto uniprocessorAccess to a relative abundance of computational resources
Generally clunky, confusing, and difficult to engineer softwarethat
MOPLIntroduction
Motivation
What about a programming language that resolves aroundexploiting this technology, while making the job of dividing softwareinto multiple processors almost invisible to the programmers ?
Enter MOPL
MOPLIntroduction
MOPL at a glance
MOPL is the Matrix Operation Parallelism Language.MOPL is designed to perform lightning-fast, safe, andmultithreaded operations, focusing its power primarily in thedomain of matrices.
Matrix addition, matrix multiplication, etc.
Multiprocessor programming is invisible to the programmer inMOPL. MOPL uses an internal system to decide how to dividesegments of operations into threads and how many.MOPL utilizes a "divide-and-conquer" approach to matrixoperations, delegating responsibility for submatrices of theoperations to the threads it creates, so they execute in parallel.Result : highly scalable and rapid matrix operations to suit theend-users’ needs, whether it is a corporation, researcher, orconsumer.
MOPLArchitecture
Architecture
MOPLArchitecture
Architecture
MOPLArchitecture
Architecture
MOPLArchitecture
Architecture
MOPLExamples
A simple program
main ( ){
s c a l a r i ;// d e c l a r e a 3x3 squa r e mat r i xcon s t mat r i x b (3 , 3 ) = {2 , 3 , 7 : 9 , 2 , 3 : 3 , 4 , 2 } ;
// d e c l a r e an a r r a y o f mat r i x .// The s i z e o f the a r r a y i s 3// and each mat r i x i s a 3x3 squa r e mat r i x .ma t r i x [ 3 ] c ( 3 , 3 ) ;
f o r ( i =0; i <3; i++) {c [ i ] = {1 , 0 , 0 : 0 , 1 , 0 : 0 , 0 , 1 } ;
}
c [ 0 ] = c [ 0 ] ∗ b ;i = 10 ;c [ 1 ] = i ∗ b ;c [ 2 ] = c [ 0 ] − c [ 1 ] ;
}
MOPLTools and environment
Tools
SVN repository, Wiki, . . .
Awesome IDE for PLT projects
JVM, javacc, jjtree
Used for the internal mailing-list
MOPLParallelism
Parallelism features
Parallelism is user-invisibleExternal Matrix Operation LibraryParallel matrix addition, subtraction, multiplication functionsin the library
ImplementationUsing multi-threads running simultaneously do matrixoperations
MOPLParallelism
Threads Testing Experiment
MOPLParallelism
Experiment analysis
Beyond certain threads, there is no gain at all because the processoris saturated with work.
Adding another thread will only give it another task to do that itstill has to be scheduled.
On our Core 2 laptop, there is a big difference between liner runningand two threads running
Slight changes if we add more threads
MOPLParallelism
Matrix multiplication algorithm
Divide and Conquer algorithm
Divide the matrix into 4 sub matrices
Do recursion
Until : sub-matrices size < block size
MOPLTests
Test plan
Correctness, completeness, and efficiency.MOPL should run every input correctly.MOPL should check on every grammarMOPL should effectively implement parallelism, and take theadvantage of multi-threading for faster computation
MOPLTests
Test plan
Test 1 : Phase to assess our algorithm before final version.White box testing each on our Java ClassEffectiveness of our threadingRegression testing to find software regressions.
Test 2 :Testing after our final program to assess our languageBlack box testingTest Suites to cover simple test model which test our efficiencyand advanced model to test our correctness
MOPLConclusion
Conclusion
ParallelismMultithreading is difficult to implementFinding Effective Matrix computation.JavaCCMOPL is a simple and fast program that computes Matrixfaster than any other language