high performance communication using mpj express 1 presented by jawad manzoor national university of...
Post on 21-Dec-2015
217 views
TRANSCRIPT
High Performance Communication using MPJ
Express
1
Presented byJawad ManzoorNational University of Sciences and Technology, Pakistan
April 18, 2023
Presentation Outline
2
Introduction•Parallel computing•HPC Platforms•Software programming models
MPJ Express •Design•Communication devices
Performance Evaluation
April 18, 2023
Serial vs Parallel Computing
3
Serial Computing
Parallel Computing
April 18, 2023
HPC Platforms• There are three kind of High
performance computing (HPC) platforms.▫ Distributed Memory
Architecture Massively Parallel Processor
(MPP) ▫ Shared Memory Architecture
Symmetric Multi processor (SMP) , Multicore computers
▫ Hybrid Architecture SMP Clusters
• Most of the modern HPC hardware is based on hybrid models
Distributed Memory
Shared Memory
Hybrid
4
April 18, 2023
Software Programming Models•Shared Memory Models
▫Process has direct access to all memory▫ Pthreads, OpenMP
•Distributed Memory Models▫ No direct access to memory of other processes▫ Message Passing Interface (MPI)
Process
5
April 18, 2023
Message Passing Interface (MPI)• Message Passing Interface is the defacto
standard for writing applications on parallel hardware
• Primarily designed for distributed memory machines but it is also used for shared memory machines
6
April 18, 2023
MPI Implementations• OpenMPI • It is an open source production quality implementation of MPI-2
in C• Existing high performance drivers
• TCP/IP, Shared memory, Myrinet, Quadrics, Infiniband
• MPICH2• It is the implementation of MPI on SMPs, clusters, and
massively parallel processors• POSIX shared memory, SysV shared memory, Windows shared
memory, Myrinet, Quadrics, Infiniband, 10 Gigabit Ethernet
• MPJ Express• Implements the high level functionality of MPI in pure Java • Provides flexibility to update the layers or add new
communication devices• TCP/IP, Myrinet, Threads shared memory, SysV shared memory
7
April 18, 2023
Presentation Outline
8
Introduction•Parallel computing•HPC Platforms•Software programming models
MPJ Express•Design•Communication devices
Performance Evaluation
8
April 18, 2023
9
April 18, 2023
Java NIO Device
•Uses non-blocking I/O functionality, •Implements two communication
protocols:▫Eager-send
For small messages (< 128 Kbytes), May incur additional copying.
▫Rendezvous: Exchange of control messages before the
actual transmission, For long messages ( 128 Kbytes).
10
April 18, 2023
Standard mode with eager send protocol (small messages)
11
time
->
control message to receiveractual data sent
sender receiver
April 18, 2023
Standard mode with rendezvous protocol (large messages)
12
time
->
control message to receiver
actual data sent
acknowledgement
sender receiver
April 18, 2023
• Threads based• MPJ process is represented by a Java thread and data is
communicated using shared data structures.▫ sendQueue and recvQueue
• SysV based• MPJ process is represented by a Unix process and data is
communicated using shared data structures.▫ Java Module -The xdev API implementation for shared
memory communication▫ C Module - Unix SysV Inter Process Communication
methods▫ JNI Module – Bridge between C and Java.
13
Shared Memory Communication Device
April 18, 2023
14
MPI communication using sockets
MPI communication using shared memory
April 18, 2023
Key Implementation aspects
•Critical operations include: ▫Initialize▫Point to point
Send Receive
▫Finalize
15
April 18, 2023
16
Process 0’s shared memory segment
Process 1’s shared memory segment
Process 2’s shared memory segment
Process 3’s shared memory segment
Initialization April 18, 2023
17
Point-to-point communication
Communication between two processes.
Source process sends message to destination process.
Source and destination processes are identified by their rank
April 18, 2023
18
• Blocking Send• Only return from sub
routine call when the operation has completed
• Non Blocking Send• Return straight away
and allow sub program to continue to perform other work.
• At some time later check for the completion of the process
Send Modes April 18, 2023
Sending a message
19
Memory space of each process is divided into sub-sections equal to
the number of processes. Each subsection is used for communication with one process.
April 18, 2023
Receiving a message
20
Destination process attaches itself to the shared memory segment of source process and starts reading messages from the sub-section allocated to it using offset
April 18, 2023
Finalization
21
When the communication is completed, barrier method is called at the end which synchronizes all process.
Then the finalize method is called which destroys the shared memory allocated to the processes.
April 18, 2023
Presentation Outline
22
Introduction•Parallel computing•HPC Platforms•Software programming models
Design and Implementation•Design•Communication devices
Performance Evaluation
22
April 18, 2023
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 20K 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
23
April 18, 2023
Latency on Fast Ethernet
24
April 18, 2023
Throughput on Fast Ethernet
25
April 18, 2023
Latency on Gigabit Ethernet
26
April 18, 2023
Throughput on GigE
27
April 18, 2023
Latency on Myrinet
28
April 18, 2023
Throughput on Myrinet
29
April 18, 2023
Q ?
30
April 18, 2023
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/
April 18, 2023
31