java for high performance computing: myth or reality?

58
Motivation Java for High Performance Computing Java HPC Codes Performance Evaluation Conclusions Java for High Performance Computing: Myth or Reality? Guillermo López Taboada Grupo de Arquitectura de Computadores Universidade da Coruña http://gac.udc.es/˜gltaboada [email protected] CIEMAT 4/11/2011 Guillermo López Taboada Java for HPC: Myth or Reality?

Upload: others

Post on 04-Jul-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java for High Performance Computing:Myth or Reality?

Guillermo López Taboada

Grupo de Arquitectura de ComputadoresUniversidade da Coruña

http://gac.udc.es/˜[email protected]

CIEMAT 4/11/2011

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 2: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Outline

1 Motivation

2 Java for High Performance Computing

3 Java HPC Codes

4 Performance Evaluation

5 Conclusions

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 3: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java is an Alternative for HPC in the Multi-core Era

Language popularity:(% skilled developers)

#1 Java (17.9%)#2 C (17.7%)#3 C++ (9.1%)#20 Matlab (0.6%)#29 R (0.4%)#31 Fortran (0.4%)

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 4: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java is an Alternative for HPC in the Multi-core Era

Interesting features:

Built-in networking

Built-in multi-threading

Portable, platformindependent

Object Oriented

Main training language

Many productive parallel/distributedprogramming libs:

Java shared memory programming (highlevel facilities: Concurrency framework)

Java Sockets

Java RMI

Message-Passing in Java (MPJ) libraries

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 5: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Adoption in HPC

HPC developers andusers usually want to useJava in their projects.

Java code is no longerslow (Just-In-Timecompilation)!

But still performancepenalties in Javacommunications:

Pros and Cons:

high programming productivity.

but they are highly concernedabout performance.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 6: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Adoption in HPC

HPC developers andusers usually want to useJava in their projects.

Java code is no longerslow (Just-In-Timecompilation)!

But still performancepenalties in Javacommunications:

JIT Performance:

Like native performance.

Java can even outperform nativelanguages thanks to the dynamiccompilation.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 7: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Adoption in HPC

HPC developers andusers usually want to useJava in their projects.

Java code is no longerslow (Just-In-Timecompilation)!

But still performancepenalties in Javacommunications:

High Java Communications Overhead:

Poor high-speed networks support.

The data copies between the Javaheap and native code through JNI.

Costly data serialization.

The use of communication protocolsunsuitable for HPC.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 8: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental Results on One Core (relative perf.)

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

CG EP FT IS MG SP

Sp

eed

up

Rela

tive t

o M

PI (G

NU

Co

mp

.)

NPB Class B Performance on 1 core (Xeon 5060)

MPI (GNU Comp.)MPI (Intel Comp.)MPJ (F-MPJ)ProActiveJava Threads

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 9: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Emerging Interest in Java for HPC

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 10: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Current State of Java for HPC

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 11: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Java for High Performance Computing

Current options in Java for High Performance Computing:

Java Shared Memory Programming

Java Sockets

Java RMI

Message-Passing in Java (MPJ)

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 12: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Java for HPC

Java Shared Memory Programming:

Java Threads

Concurrency Framework (ThreadPools, Tasks ...)

Parallel Java (PJ)

Java OpenMP (JOMP and JaMP)

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 13: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

JOMP

Listing 1: JOMP example

public s t a t i c void main ( S t r i n g argv [ ] ) {i n t myid ;

/ / omp p a r a l l e l p r i v a t e ( myid ){

myid = OMP. getThreadNum ( ) ;System . out . p r i n t l n ( ‘ ‘ He l lo from ’ ’ + myid ) ;

}

/ / omp p a r a l l e l f o rfor ( i =1; i <n ; i ++) {

b [ i ] = ( a [ i ] + a [ i −1]) ∗ 0 . 5 ;}

}

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 14: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Java Communication Libraries Overview

Java HPC Applications

Java Message-passing libraries

Java RMI / Low-level messaging libraries

Java Sockets libraries

HPC Communications Hardware

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 15: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Java Sockets

Standard and widely extended low-level programming interfacefor networked communications.

Current implementations:

IO sockets

NIO sockets

Ibis sockets

Java Fast Sockets

Pros and Cons:

easy to use.

but only TCP/IP support.

lack non-blocking communication.

lack HPC tailoring.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 16: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Java Sockets

Standard and widely extended low-level programming interfacefor networked communications.

Current implementations:

IO sockets

NIO sockets

Ibis sockets

Java Fast Sockets

Pros and Cons:

provides non-blockingcommunication.

but only TCP/IP support.

lack HPC tailoring.

difficult use.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 17: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Java Sockets

Standard and widely extended low-level programming interfacefor networked communications.

Current implementations:

IO sockets

NIO sockets

Ibis sockets

Java Fast Sockets

Pros and Cons:

easy to use.

with Myrinet support.

but lack non-blocking communication.

lack HPC tailoring.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 18: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Java Sockets

Standard and widely extended low-level programming interfacefor networked communications.

Current implementations:

IO sockets

NIO sockets

Ibis sockets

Java Fast Sockets

Pros and Cons:

easy to use.

efficient high-speed networks support.

efficient shared memory protocol.

with HPC tailoring.

but lack non-blocking support.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 19: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Remote Method Invocation

RMI (Remote Method Invocation)

Widely extended

RMI-based middleware (e.g., ProActive)

RMI Optimizations:

KaRMIMantaIbis RMIOpt RMI

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 20: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Java Message-Passing Libraries

Message-passing is the main HPC programming model.

Implementationapproaches in Javamessage-passinglibraries.

Implementation approachesRMI-based.Wrapping a native library (e.g., MPIlibraries: OpenMPI, MPICH).

Sockets-based.Low-level communication device.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 21: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Listing 2: MPJ exampleimport mpi .∗ ;

public class Hel lo {

public s t a t i c void main ( S t r i n g argv [ ] ) {MPI . I n i t ( args ) ;i n t rank = MPI .COMM_WORLD. Rank ( ) ;

i f ( rank == 0 ) {S t r i n g [ ] msg = new S t r i n g [ 1 ] ;msg [ 0 ] = new S t r i n g ( " He l lo " ) ;MPI .COMM_WORLD. Send (msg, 0 , 1 , MPI .OBJECT, 1 , 13 ) ;

} else i f ( rank == 1) {S t r i n g [ ] message = new S t r i n g [ 1 ] ;MPI .COMM_WORLD. Recv ( message , 0 , 1 , MPI .OBJECT, 0 , 13 ) ;System . out . p r i n t l n ( message [ 0 ] ) ;

}MPI . F i n a l i z e ( ) ;

}}

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 22: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Pur

eJa

vaIm

pl. Socket

impl.High-speed net-work support

API

Java

IO

Java

NIO

Myr

inet

Infin

iBan

d

SC

I

mpi

Java

1.2

JGF

MP

J

Oth

erA

PIs

MPJava X X X

Jcluster X X X

Parallel Java X X X

mpiJava X X X X

P2P-MPI X X X X

MPJ Express X X X X

MPJ/Ibis X X X X

JMPI X X X

F-MPJ X X X X X X X

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 23: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Java Communication Libraries Overview

Java HPC Applications (Develop Efficient Codes)

Java Message-passing libraries (Scalable Algorithms)

Low-level messaging libraries (MPJ Devices)

HPC Hardware

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 24: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

iodev: Low-level Message-Passing Library

The use of pluggable low-level communication devices is widelyextended in message-passing libraries.

Message-passing Low-level Devices:

MPICH/MPICH2 ADI/ADI3 (GM/MX for Myrinet, IBV/VAPIfor InfiniBand, and shared memory).OpenMPI BTL (GM/MX for Myrinet, IBV/VAPI forInfiniBand, and shared memory).MPJ Express xdev (NIO sockets, MX for Myrinet, andshared memory).F-MPJ xxdev (NIO/IO sockets, MX for Myrinet, IBV forInfiniBand, and shared memory).

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 25: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

iodev: Low-level Message-Passing Library

The use of pluggable low-level communication devices is widelyextended in message-passing libraries.

Message-passing Low-level Devices:

MPICH/MPICH2 ADI/ADI3 (GM/MX for Myrinet, IBV/VAPIfor InfiniBand, and shared memory).OpenMPI BTL (GM/MX for Myrinet, IBV/VAPI forInfiniBand, and shared memory).MPJ Express xdev (NIO sockets, MX for Myrinet, andshared memory).F-MPJ xxdev (NIO/IO sockets, MX for Myrinet, IBV forInfiniBand, and shared memory).

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 26: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

iodev: Low-level Message-Passing Library

The use of pluggable low-level communication devices is widelyextended in message-passing libraries.

Message-passing Low-level Devices:

MPICH/MPICH2 ADI/ADI3 (GM/MX for Myrinet, IBV/VAPIfor InfiniBand, and shared memory).OpenMPI BTL (GM/MX for Myrinet, IBV/VAPI forInfiniBand, and shared memory).MPJ Express xdev (NIO sockets, MX for Myrinet, andshared memory).F-MPJ xxdev (NIO/IO sockets, MX for Myrinet, IBV forInfiniBand, and shared memory).

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 27: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

iodev: Low-level Message-Passing Library

The use of pluggable low-level communication devices is widelyextended in message-passing libraries.

Message-passing Low-level Devices:

MPICH/MPICH2 ADI/ADI3 (GM/MX for Myrinet, IBV/VAPIfor InfiniBand, and shared memory).OpenMPI BTL (GM/MX for Myrinet, IBV/VAPI forInfiniBand, and shared memory).MPJ Express xdev (NIO sockets, MX for Myrinet, andshared memory).F-MPJ xxdev (NIO/IO sockets, MX for Myrinet, IBV forInfiniBand, and shared memory).

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 28: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

xxdev API. Public interface of the xxdev .Device class

public abstract class Device {s t a t i c public Device newInstance ( S t r i n g deviceImpl ) ;public i n t [ ] i n i t ( S t r i n g [ ] args ) ;public i n t i d ( ) ;public void f i n i s h ( ) ;

public Request isend ( Object buf , i n t dst , i n t tag ) ;public Request i r e c v ( Object buf , i n t src , i n t tag , Status s t t s ) ;

public void send ( Object buf , i n t dst , i n t tag ) ;public Status recv ( Object buf , i n t src , i n t tag ) ;

public Request issend ( Object buf , i n t dst , i n t tag ) ;public void ssend ( Object buf , i n t dst , i n t tag ) ;

public Status iprobe ( i n t src , i n t tag , i n t contex t ) ;public Status probe ( i n t src , i n t tag , i n t contex t ) ;public Request peek ( ) ;

}

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 29: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

F-MPJ Communication Devices

JVM

native comms

device layer smpdev

Java Threads

Shared Memory

MPJ Applications

ibvdev

TCP/IP

JNI

IBV

omxdev

Open−MX

InfiniBand EthernetMyrinet/Ethernet

Java Sockets

niodev/iodev

F−MPJ Library

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 30: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Java Shared Memory ProgrammingJava Communication DevicesF-MPJ: Fast MPJ

Multi-core aware algorithms for collective operations:

Operation Algorithms

Barrier BT, Gather+Bcast, BTe, Gather+Bcast Optimized

Bcast MST, NBFT, BFT

Scatter/v MST, NBFT

Gather/v MST, NBFT, NB1FT, BFT

Allgather/v NBFT, NBBDE, BBKT, NBBKT, BTe, Gather + Bcast

Alltoall/v NBFT, NB1FT, NB2FT, BFT

Reduce MST, NBFT, BFT

Allreduce NBFT, BBDE, NBBDE, BTe, Reduce + Bcast

Reduce-scatter BBDE, NBBDE, BBKT, NBBKT, Reduce + Scatter

Scan NBFT, OneToOne

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 31: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

HPC KernelsJava HPC in BioinformaticsJava in Cosmology

NPB-MPJ Characteristics (10,000 SLOC (Source LOC))

Name Operation SLOC Communicat.intensiveness

Ker

nel

App

lic.

CG Conjugate Gradient 1000 Medium XEP Embarrassingly Parallel 350 Low XFT Fourier Transformation 1700 High XIS Integer Sort 700 High X

MG Multi-Grid 2000 High XSP Scalar Pentadiagonal 4300 Medium X

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 32: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

HPC KernelsJava HPC in BioinformaticsJava in Cosmology

NAS Parallel Benchmarks NPB-MPJ

NPB-MPJ Optimization:

JVM JIT compilation of heavy and frequent methods withruntime information

Structured programming is the best option

Small frequent methods are better.mapping elements from multidimensional to one-dimensionalarrays (array flattening technique:arr3D[x][y][z]→arr3D[pos3D(lenghtx,lengthy,x,y,z)])

NPB-MPJ code refactored, obtaining significantimprovements (up to 2800% performance increase)

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 33: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

HPC KernelsJava HPC in BioinformaticsJava in Cosmology

ProtTest 3

One of the most popular tools for selectingmodels of protein evolution.

Almost 4,000 registered users.Over 700 citations.

Written in Java.

Intensive in computational needs.

ProtTest 3 designed to take advantage ofparallel processing.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 34: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

HPC KernelsJava HPC in BioinformaticsJava in Cosmology

Shared Memory Implementation

Java concurrence APIImplementation of a thread pool.Dynamic task distribution over the pool.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 35: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

HPC KernelsJava HPC in BioinformaticsJava in Cosmology

Distributed Memory Implementation

Message Passing in Java

Allow both distributions (static and dynamic).Includes a distributor process with a negligible workload.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 36: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

HPC KernelsJava HPC in BioinformaticsJava in Cosmology

Hybrid Shared/Distributed Memory Implementation

MPJ + OpenMP

Scalability is limited by the task-based high level parallelization.

Solution:Two-level parallelism.Combination of message passing with multithread computation oflikelihood.Implementation of a parallel version of PhyML using OpenMP.

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 37: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

HPC KernelsJava HPC in BioinformaticsJava in Cosmology

Gadget Cosmological Simulation Project Webpage

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 38: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

Experimental Configuration:

DAS-4 VU cluster (74 nodes)

2xIntel Xeon 5620 Quad-core CPU (8 cores with hyper-threading per node)

24 GB RAM

InfiniBand Network 32 Gbps (Mellanox MT26428 QDR)

Linux, OpenJDK 1.6, F-MPJ, MPJ Express, IntelMPI

Special shared memory node (node075):4xAMD Opteron 6172 12-core (48 cores) and 128 GB RAM

Departmental x86-64 cluster (16 nodes)

2xIntel Xeon 5620 Quad-core CPU (8 cores with hyper-threading per node)

8 GB RAM

InfiniBand Network 16 Gbps (QLogic QLE7240 DDR)

Linux, Sun JDK 1.6, F-MPJ, MPJ Express, OpenMPI, MVAPICH

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 39: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

HPC Communications Hardware

Performance of current HPC networks (Theoretical/C/Java):

Startup latency Bandwidth(microseconds) (Mbps)

Gig. Ethernet 50/55/60 1000/920/90010G Ethernet 5/10/50 10000/9000/500010G Myrinet 1/2/30 10000/9300/4000InfiniBand 1/2/20 16000/12000/6000

SCI 1.4/3/50 5333/2400/800

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 40: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

Point-to-Point Performance

Message size (bytes)

Point-to-point Performance on InfiniBand (DAS-4)

0

5

10

15

20

25

30

35

40

45

50

55

60

65

4 16 64 256 1K

Lat

ency

(µs

)

1K 4K 16K 64K 256K 1M 2M 4M 0

2

4

6

8

10

12

14

16

18

20

22

24

26

28

Ban

dw

idth

(G

bp

s)

F-MPJ (ibvdev) - IBV MPJE (niodev) - IPoIB IntelMPI 4 - IBV

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 41: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

Point-to-Point Performance

Message size (bytes)

Point-to-point Performance on Shared Memory (DAS-4)

0

5

10

15

20

25

30

35

40

45

4 16 64 256 1K

Lat

ency

(µs

)

1K 4K 16K 64K 256K 1M 2M 4M 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30

Ban

dw

idth

(G

bp

s)

F-MPJ (ibvdev) F-MPJ (smpdev) MPJE (smpdev) IntelMPI 4

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 42: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

Collective Operations Performance

0

200

400

600

800

1000

1200

1400

1600

1800

1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M 2M 4M

Agg

rega

ted

Ban

dwid

th (

Gbp

s)

Message size (bytes)

Broadcast Performance on DAS−4 (512 Processes)

F−MPJ (ibvdev) − IBV Intel MPI 4 − IBV

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 43: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

Collective Operations Performance

0

10

20

30

40

50

60

70

80

1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M 2M 4M

Agg

rega

ted

Ban

dwid

th (

Gbp

s)

Message size (bytes)

Broadcast Performance on DAS−4 (48 Threads)

F−MPJ (smpdev) MPJE (smpdev) IntelMPI 4

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 44: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

NPB-MPJ Performance

0

2000

4000

6000

8000

10000

12000

14000

16000

18000

20000

1 8 16 32 64 128

MO

PS

Number of Cores

CG C Class (x86-64 cluster)

NPB-MPINPB-MPJ (F-MPJ)NPB-MPJ (MPJE)NPB-OMPNPB-JAV

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 45: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

NPB-MPJ Performance

1 8 16 32 64 128 0

4

8

12

16

20

24

28

32

36

40

Sp

eed

up

Number of Cores

CG C Class (x86-64 cluster)

NPB-MPINPB-MPJ (F-MPJ)NPB-MPJ (MPJE)NPB-OMPNPB-JAV

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 46: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

NPB-MPJ Performance

0

5000

10000

15000

20000

25000

30000

35000

40000

45000

50000

1 8 16 32 64 128

MO

PS

Number of Cores

FT C Class (x86-64 cluster)

NPB-MPINPB-MPJ (F-MPJ)NPB-MPJ (MPJE)NPB-OMPNPB-JAV

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 47: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

NPB-MPJ Performance

1 8 16 32 64 128 0

8

16

24

32

40

48

56

Sp

eed

up

Number of Cores

FT C Class (x86-64 cluster)

NPB-MPINPB-MPJ (F-MPJ)NPB-MPJ (MPJE)NPB-OMPNPB-JAV

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 48: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

NPB-MPJ Performance

0

200

400

600

800

1000

1200

1400

1600

1 8 16 32 64 128

MO

PS

Number of Cores

IS C Class (x86-64 cluster)

NPB-MPINPB-MPJ (F-MPJ)NPB-MPJ (MPJE)NPB-OMPNPB-JAV

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 49: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

NPB-MPJ Performance

1 8 16 32 64 128 0

4

8

12

16

20

Sp

eed

up

Number of Cores

IS C Class (x86-64 cluster)

NPB-MPINPB-MPJ (F-MPJ)NPB-MPJ (MPJE)NPB-OMPNPB-JAV

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 50: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

NPB-MPJ Performance

0

10000

20000

30000

40000

50000

60000

70000

80000

90000

100000

1 8 16 32 64 128

MO

PS

Number of Cores

MG C Class (x86-64 cluster)

NPB-MPINPB-MPJ (F-MPJ)NPB-MPJ (MPJE)NPB-OMPNPB-JAV

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 51: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

NPB-MPJ Performance

1 8 16 32 64 128 0

8

16

24

32

40

48

56

64

72

Sp

eed

up

Number of Cores

MG C Class (x86-64 cluster)

NPB-MPINPB-MPJ (F-MPJ)NPB-MPJ (MPJE)NPB-OMPNPB-JAV

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 52: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

ProtTest 3: multithread implementation

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 53: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

ProtTest 3: MPJ implementation

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 54: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

ProtTest 3: Hybrid implementation

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 55: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

Java Gadget Performance

1

10

100

1 8 16 32 64 128

Run

time

(sec

onds

)

Number of Cores

Gadget (x86−64 cluster)

MPIF−MPJMPJE

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 56: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

Experimental ConfigurationF-MPJ PerformanceJava Performance for HPC

Java Gadget Performance

1 8 16 32 64 128 0

8

16

24

32

40

48

Spe

edup

Number of Cores

Gadget (x86−64 cluster)

MPIF−MPJMPJE

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 57: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

SummaryQuestions

Summary

Current state of Java for HPC (interesting/feasible alternative)

Available programming models in Java for HPC:Shared memory programmingDistributed memory programmingDistributed shared memory programming

Active research on Java for HPC (>30 projects)Active work on Java HPC projects (ESA Gaia, Petro-seismicJavaSeis...)...but still not a mainstream language for HPC

Adoption of Java for HPC:It is an alternative for programming multi-core clusters (tradeoffsome performance for appealing features)Performance evaluations are highly importantAnalysis of current projects (promotion of joint efforts)

Guillermo López Taboada Java for HPC: Myth or Reality?

Page 58: Java for High Performance Computing: Myth or Reality?

MotivationJava for High Performance Computing

Java HPC CodesPerformance Evaluation

Conclusions

SummaryQuestions

Questions?

JAVA FOR HIGH PERFORMANCE COMPUTING: MYTH OR REALITY?

CIEMAT 2011

Guillermo López Taboada ([email protected])Computer Architecture Group, University of A Coruña

http://gac.udc.es/˜gltaboada

Guillermo López Taboada Java for HPC: Myth or Reality?