170 likes | 334 Views
Developing Native Device for MPJ Express Advisor: Dr. Aamir Shafi Co-advisor: Ms Samin Khaliq. Agenda. Introduction to Parallel Computing Introduction to Parallel Architectures Introduction to Parallel Programming Literature Review MPJ Express mpiJava MPICH and MPICH-2
E N D
Developing Native Device for MPJ Express Advisor: Dr. Aamir Shafi Co-advisor: Ms Samin Khaliq
Agenda Introduction to Parallel Computing Introduction to Parallel Architectures Introduction to Parallel Programming Literature Review MPJ Express mpiJava MPICH and MPICH-2 Problem Statement Deliverables Questions
Parallel Computing • There are three ways to do any thing faster • Work harder • Work smarter • Get help • In Computers • Work harder => increase the processor speed • Work smarter =>use a better algorithm • Get help => use parallel processing • Why use Parallel Computing • Save time • Solve large and complex problems • Provide concurrency
Parallel Architectures • There are two types of parallel systems • Massively Parallel Processors (MPP) • Symmetric Multi Processors (SMP) • Commodity Clusters (Poor man’s Super Computer ! ) • MPP • Each Processor has its own memory and cache. Nothing is shared • SMP • Each Processor share the same memory • Commodity Clusters • Made from Commodity-Off-The-Shelf components
Parallel Programming • Message Passing libraries are available in C, C++, Fortran, Java • Two types of Message Passing systems are available • PVM (Parallel Virtual Machine) • MPI (Message Passing Interface) • Java has become a popular programming language because of its features like portability, type safety, built in support for threads and rich set of API’s • Various Java based messaging systems have been developed which have followed one of the following three approaches for communication • Java Native Interface (JNI) • Remote Method Invocation (RMI) • Low level communication (Sockets)
Literature Review and Related Work • MPJ Express • Java based messaging system that implements the high-level MPI functionality using lower level sockets. • Layered design • Thread safe • Layered design allows the developer to swap the layers in and out as needed • Thread safety allows multiple threads to be started in one process without any restriction.
Literature Review and Related Work… Cont’d • mpiJava • Java based messaging system that uses JNI to communicate with Native MPI library • Popular in terms of uptake by the HPC community • Used as a teaching tool and for the development of performance measurement and analysis tool • Current API is in version 1.2.5 released in 2003 • MPICH and MPICH-2 • C implementation of MPI • For the first release of the Native device, we intend to add support for MPICH and MPICH-2 to be used as the underlying Native MPI libraries.
mpiJava vs MPJ Express • mpiJava uses JNI to communicate with the Native MPI library. This is against Java‘s philosophy of write once and run any ware • The absence of buffering layer in mpiJava poses JNI data copying overheads • Runs on most of the high speed interconnects by using Native MPI library that supports the particular interconnect • Has been very popular in HPC community • MPJ Express exploits Java NIO package • Unlike mpiJava, it is thread safe • MPJ Express has its own runtime • MPJ Express has introduced an efficient buffering layer in order to avoid JNI overheads.
Problem Statement To develop a Native MPI device based on mpiJava for MPJ Express software. Analyze, evaluate and optimize its performance against other Java messaging systems
Motivation • mpiJava was a very popular messaging system but is no more maintained • The performance of Native device (which will be based on mpiJava) can be improved using direct ByteBuffers that have been introduced in Java NIO package • MPJ Express is thread safe and already has support for communication on Myrinet, shared memory along with having a pure Java implementation • James Gosling, one of the founders of Java called MPJ Express one of his favorite MPI like library • We intend to release Native device as part of the MPJ Express software. The users would download just one software and wont have to switch software for different tasks
Challenges • Its not simple copy and paste! • mpiJava doesn’t have any buffering layer whereas MPJ Express using a buffering layer. How the messages will be written and read ? • We have to introduce a Native Buffer (currently NIO Buffer is used for pure Java communications) for the Native device. • Will the runtime of MPJ Express be compatible with mpiJava ? • Can we start Java processes from MPJ Express rather Native MPI? • The MPJ Express software has got a layered design. The mpjdev level of the software needs to be redesigned to accommodate the Native device
This Project is done as part of our Project approved by British Council
Deliverables • Literature review • Understanding the architecture of MPJ Express, mpiJava, MPICH and MPICH-2 • Modify the design of MPJ Express (particularly mpjdev API) • Test MPJ Express with the modified design • Integrate Native device into MPJ Express • JNI code of Native device and Native buffer • Code Testing • Performance Evaluation against mpiJava and other MPI devices • Code optimization • Documentation
References • Nested Parallelism for Multi-core Systems Using Java, by Aamir Shafi • mpiJava as a teaching tool http://users.cs.cf.ac.uk/David.W.Walker/CM0323/code.html • Lab: Parallel programming using java (ppj) http://www.sc.rwthaachen.de/Teaching/Labs/PPJ05 • MPI Meets Multicore, http://blogs.sun.com/roller/page/jag?entry=mpi meets multicore