+ All Categories
Transcript
Page 1: High Performance Communication  using  MPJ Express

High Performance Communication using MPJ

Express

1

Presented byJawad ManzoorNational University of Sciences and Technology, Pakistan

April 22, 2023

Page 2: High Performance Communication  using  MPJ Express

Presentation Outline

2

Introduction•Parallel computing•HPC Platforms•Software programming models

MPJ Express •Design•Communication devices

Performance Evaluation

April 22, 2023

Page 3: High Performance Communication  using  MPJ Express

Serial vs Parallel Computing

3

Serial Computing

Parallel Computing

April 22, 2023

Page 4: High Performance Communication  using  MPJ Express

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 22, 2023

Page 5: High Performance Communication  using  MPJ Express

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 22, 2023

Page 6: High Performance Communication  using  MPJ Express

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 22, 2023

Page 7: High Performance Communication  using  MPJ Express

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 22, 2023

Page 8: High Performance Communication  using  MPJ Express

Presentation Outline

8

Introduction•Parallel computing•HPC Platforms•Software programming models

MPJ Express•Design•Communication devices

Performance Evaluation

8

April 22, 2023

Page 9: High Performance Communication  using  MPJ Express

9

April 22, 2023

Page 10: High Performance Communication  using  MPJ Express

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 22, 2023

Page 11: High Performance Communication  using  MPJ Express

Standard mode with eager send protocol (small messages)

11

time

->

control message to receiveractual data sent

sender receiver

April 22, 2023

Page 12: High Performance Communication  using  MPJ Express

Standard mode with rendezvous protocol (large messages)

12

time

->

control message to receiver

actual data sent

acknowledgement

sender receiver

April 22, 2023

Page 13: High Performance Communication  using  MPJ Express

• 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 22, 2023

Page 14: High Performance Communication  using  MPJ Express

14

MPI communication using sockets

MPI communication using shared memory

April 22, 2023

Page 15: High Performance Communication  using  MPJ Express

Key Implementation aspects

•Critical operations include: ▫Initialize▫Point to point

Send Receive

▫Finalize

15

April 22, 2023

Page 16: High Performance Communication  using  MPJ Express

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 22, 2023

Page 17: High Performance Communication  using  MPJ Express

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 22, 2023

Page 18: High Performance Communication  using  MPJ Express

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 22, 2023

Page 19: High Performance Communication  using  MPJ Express

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 22, 2023

Page 20: High Performance Communication  using  MPJ Express

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 22, 2023

Page 21: High Performance Communication  using  MPJ Express

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 22, 2023

Page 22: High Performance Communication  using  MPJ Express

Presentation Outline

22

Introduction•Parallel computing•HPC Platforms•Software programming models

Design and Implementation•Design•Communication devices

Performance Evaluation

22

April 22, 2023

Page 23: High Performance Communication  using  MPJ Express

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 22, 2023

Page 24: High Performance Communication  using  MPJ Express

Latency on Fast Ethernet

24

April 22, 2023

Page 25: High Performance Communication  using  MPJ Express

Throughput on Fast Ethernet

25

April 22, 2023

Page 26: High Performance Communication  using  MPJ Express

Latency on Gigabit Ethernet

26

April 22, 2023

Page 27: High Performance Communication  using  MPJ Express

Throughput on GigE

27

April 22, 2023

Page 28: High Performance Communication  using  MPJ Express

Latency on Myrinet

28

April 22, 2023

Page 29: High Performance Communication  using  MPJ Express

Throughput on Myrinet

29

April 22, 2023

Page 30: High Performance Communication  using  MPJ Express

Q ?

30

April 22, 2023

Page 31: High Performance Communication  using  MPJ Express

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 22, 2023

31


Top Related