Presentation is loading. Please wait.

Presentation is loading. Please wait.

Threads based shared memory communication device for MPJ Express 1 Presented by Jawad Manzoor National University of Sciences and Technology, Pakistan.

Similar presentations


Presentation on theme: "Threads based shared memory communication device for MPJ Express 1 Presented by Jawad Manzoor National University of Sciences and Technology, Pakistan."— Presentation transcript:

1 Threads based shared memory communication device for MPJ Express 1 Presented by Jawad Manzoor National University of Sciences and Technology, Pakistan 1 May 2015

2 Presentation Outline 2 Introduction Design Changes Performance Evaluation 2 1 May 2015

3 3

4 4 MPI communication using sockets MPI communication using shared memory 1 May 2015

5 CustomClassLoader Load mpi, mpjdev, user application classes through custom class loader Load xdev, smpdev, mpjbuf through system class loader 1 May 2015 5

6 Casting issue b/w smpdev & xdev public abstract class Device { public static Device newInstance(String dev) throws XDevException { Device device = null; if (dev.equals("niodev")) { device = new xdev.niodev.NIODevice(); } else if(dev.equals("mxdev")) { device = new xdev.mxdev.MXDevice(); } else if(dev.equals("smpdev")) { device = new xdev.smpdev.SMPDevice(); } else { throw new XDevException("No matching device found for "); } return device; } } 1 May 2015 6

7 Solution xdev.Device has been changed from abstract class into an interface newInstance() factory method has been shifted from xdev.Device to mpjdev.MPJDev.init() method 1 May 2015 7

8 Build file Build file has been modified to generate the following JAR files mpi.jar, mpjbuf.jar, mpjdev.jar, xdev.jar, niodev.jar, mxdev.jar, smpdev.jar 1 May 2015 8

9 Casting issue b/w xdev & mpjdev In mpjdev.Comm class: mpjdev.Request req = new mpjdev.Request[mySize] ; req[i] = device.isend(wBuffer, ids[i], calContextTag+i, context) ; | | v v (loaded by custom class loader) (loaded by system class loader) 1 May 2015 9

10 Solution 1 May 2015 10 Introduction of xdev.Request interface `mpjdev.Request‘ is now a wrapper object, containing a reference to an instance of `xdev.Request', and methods from the new interface are now dispatched to the wrapped instance. Calls like `isend' on the device are wrapped thus: new mpjdev.Request(device.isend(...)) Introduction od xdev.Status class

11 Solution public abstract mpjdev.Status iwait(); public abstract Status itest(); public abstract void free(); public abstract boolean isnull(); public abstract boolean cancel(); 1 May 2015 11 These abstract methods have been moved from mpjdev.Request class to xdev.Request interface and xdev.RequestAbstractImpl class and are implemented in xdev.smpdev.SMPRequest class

12 Solution From public void complete(mpjdev.Status status); public void addCompletionHandler(mpjdev.CompletionHandler handler); To public void complete(xdev.Status status); public void addCompletionHandler(xdev.CompletionHandler handler); 1 May 2015 12 These methods have been moved from mpjdev.Request class to xdev.RequestAbstractImpl class

13 Design changes 1 May 2015 13 Request Status SMPRequestNIORequestMXRequestSMPSendRequestSMPRecvRequest xdev mpjdev CompletionHandler Device (abstract class)

14 Design changes 1 May 2015 14 Request Status Request Interface RequestAbstractImpl SMPRequestNIORequestMXRequestSMPSendRequestSMPRecvRequest xdev mpjdev Status CompletionHandler public xdev.Request xreq; public xdev.Status xstatus; Device (interface)

15 1 May 2015 15 srcruntime mpi mpjbuf mpjdevxdevsmpdevniodevmxdev Source Packages

16 1 May 2015 16 P Source Packages JVM P P P TTTT

17 Design changes mpjdev.Request request; request.addCompletionHandler(new mpjdev.CompletionHandler() is now request.xreq.addCompletionHandler(new xdev.CompletionHandler() 1 May 2015 17 In mpi.Comm and mpjdev.Comm

18 Design changes In NIORecvRequest, NIOSendRequest, MXRecvRequest, MXSendRequest, SMPRequest complete(new mpjdev.Status(status)) is now complete(xdev.status) 1 May 2015 18

19 Performance Evaluation A ping pong program was written in which two processes repeatedly pass a message back and forth. ▫ Timing calls to measure the time taken for one message. ▫ We used a warm up loop of 10K iterations and the average time was calculated for 10K iterations after warm up. We present latency and throughput graphs ▫ Latency is the delay between the initiation of a network transmission by a sender and the receipt of that transmission by a receiver ▫ Throughput is the amount of data that passes through a network connection over time as measured in bits per second. We have plotted the latency graph from message size of 1 byte up to 2KB and bandwidth graph from 2KB to 16MB 19 1 May 2015

20 Latency 1 May 2015 20

21 Throughput 1 May 2015 21

22 Q ? 22 1 May 2015

23 Further Reading Parallel Computing https://computing.llnl.gov/tutorials/parallel_comp/ MPI www.mcs.anl.gov/mpi MPJ Express http://mpj-express.org/ MPICH2 http://www.mcs.anl.gov/research/projects/mpich2/ OpenMPI http://www.open-mpi.org/ 1 May 2015 23


Download ppt "Threads based shared memory communication device for MPJ Express 1 Presented by Jawad Manzoor National University of Sciences and Technology, Pakistan."

Similar presentations


Ads by Google