Numeric and Performance Issues of Java Roldan Pozo Leader, Mathematical Software Group National Institute of Standards and Technology.

Slides:



Advertisements
Similar presentations
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
MPJava : High-Performance Message Passing in Java using Java.nio Bill Pugh Jaime Spacco University of Maryland, College Park.
What iS RMI? Remote Method Invocation. It is an approach where a method on a remote machine invokes another method on another machine to perform some computation.
The road to reliable, autonomous distributed systems
The Java Language. Topics of this Course  Introduction to Java  The Java Language  Object Oriented Programming in Java  Exceptions Handling  Threads.
CIS 101: Computer Programming and Problem Solving Lecture 8 Usman Roshan Department of Computer Science NJIT.
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
NetCDF An Effective Way to Store and Retrieve Scientific Datasets Jianwei Li 02/11/2002.
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
MPJava : High-Performance Message Passing in Java using Java.nio Bill Pugh Jaime Spacco University of Maryland, College Park.
JVM-1 Introduction to Java Virtual Machine. JVM-2 Outline Java Language, Java Virtual Machine and Java Platform Organization of Java Virtual Machine Garbage.
1 Java Grande Introduction  Grande Application: a GA is any application, scientific or industrial, that requires a large number of computing resources(CPUs,
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001.
Java Introduction 劉登榮 Deng-Rung Liu 87/7/15. Outline 4 History 4 Why Java? 4 Java Concept 4 Java in Real World 4 Language Overview 4 Java Performance!?
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
JavaGrande Forum: An Overview Vladimir Getov University of Westminster.
CS 350 Operating Systems & Programming Languages Ethan Race Oren Rasekh Christopher Roberts Christopher Rogers Anthony Simon Benjamin Ramos.
Performance evaluation of Java for numerical computing Roldan Pozo Leader, Mathematical Software Group National Institute of Standards and Technology.
SPL: A Language and Compiler for DSP Algorithms Jianxin Xiong 1, Jeremy Johnson 2 Robert Johnson 3, David Padua 1 1 Computer Science, University of Illinois.
1 Developing Native Device for MPJ Express Advisor: Dr. Aamir Shafi Co-advisor: Ms Samin Khaliq.
111 © 2002, Cisco Systems, Inc. All rights reserved.
Implementation of Parallel Processing Techniques on Graphical Processing Units Brad Baker, Wayne Haney, Dr. Charles Choi.
Compiler BE Panel IDC HPC User Forum April 2009 Don Kretsch Director, Sun Developer Tools Sun Microsystems.
Lecture 10 : Introduction to Java Virtual Machine
MathCore Engineering AB Experts in Modeling & Simulation WTC.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
SUMA: A Scientific Metacomputer Cardinale, Yudith Figueira, Carlos Hernández, Emilio Baquero, Eduardo Berbín, Luis Bouza, Roberto Gamess, Eric García,
On the Performance of Parametric Polymorphism in Maple Laurentiu DraganStephen M. Watt Ontario Research Centre for Computer Algebra University of Western.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
PDCS 2007 November 20, 2007 Accelerating the Complex Hessenberg QR Algorithm with the CSX600 Floating-Point Coprocessor Yusaku Yamamoto 1 Takafumi Miyata.
Performance Analysis Of Generics In Scientific Computing Laurentiu Dragan Stephen M. Watt Ontario Research Centre for Computer Algebra University of Western.
Atlas Graphics Group MeetingDec, 1 The Colt Distribution - Open Source Libraries for High Performance Scientific and Technical.
1CPSD Software Infrastructure for Application Development Laxmikant Kale David Padua Computer Science Department.
JAVA AND MATRIX COMPUTATION
PROGRAMMING LANGUAGES FOR WHEN USING QUANT ANALYSIS FOR HIGH FREQUENCY TRADING.
Java: An Overview John R Durrett Texas Tech University.
Linear Algebra Libraries: BLAS, LAPACK, ScaLAPACK, PLASMA, MAGMA
 Programming - the process of creating computer programs.
CSE 598c – Virtual Machines Survey Proposal: Improving Performance for the JVM Sandra Rueda.
Introduction Why are virtual machines interesting?
Satisfying Requirements BPF for DRA shall address: –DAQ Environment (Eclipse RCP): Gumtree ISEE workbench integration; –Design Composing and Configurability,
1 HPJAVA I.K.UJJWAL 07M11A1217 Dept. of Information Technology B.S.I.T.
Parallel Programming & Cluster Computing Linear Algebra Henry Neeman, University of Oklahoma Paul Gray, University of Northern Iowa SC08 Education Program’s.
Linear Algebra Libraries: BLAS, LAPACK, ScaLAPACK, PLASMA, MAGMA Shirley Moore CPS5401 Fall 2013 svmoore.pbworks.com November 12, 2012.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
Memory Management in Java Mr. Gerb Computer Science 4.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Optimizing the Performance of Sparse Matrix-Vector Multiplication
Object Oriented Programming in
What Do Computers Do? A computer system is
Introduction Enosis Learning.
Introduction Enosis Learning.
Mark Claypool and Jonathan Tanner Computer Science Department
CMSC 611: Advanced Computer Architecture
The Arabica Project A distributed scientific computing project based on a cluster computer and Java technologies. Daniel D. Warner Dept. of Mathematical.
(Computer fundamental Lab)
CMSC 611: Advanced Computer Architecture
Introduction to Virtual Machines
Introduction to Virtual Machines
Presentation transcript:

Numeric and Performance Issues of Java Roldan Pozo Leader, Mathematical Software Group National Institute of Standards and Technology

Numeric and Performance Issues of Java for Grid Computing! Roldan Pozo Leader, Mathematical Software Group National Institute of Standards and Technology

Background: Where we are coming from... National Institute of Standards and Technology –US Department of Commerce –NIST (3,000 employees, mainly scientists and engineers) Many areas of responsibility –building & fire research –low-temperature physics –materials science –metrology / combinatorial experiments –bio-informatics

Mathematical & Computational Sciences Division Originally established to work with NIST scientists Transfer of research software/algorithm technologies to US Industry Applications: Fortran, C, C++, Matlab, Mathematica, GAUSS, Perl, Expect, Tcl/TK,... middle to large-scale computing domain (single workstation to clusters)

Why Java? Portability of the Java Virtual Machine (JVM) Safe, minimize memory leaks and pointer errors Security model Network-aware environment Parallel and Distributed computing: threads, RMI standard interfaces for graphics, GUIs, databases, etc. Widely adopted

Portability Binary portability is Java’s greatest strength –several million JDK downloads –Java developers for intranet applications greater than C, C++, and Basic combined JVM bytecodes are the key many languages can generate Java bytecodes Issue: –can performance be obtained at bytecode level?

Why not Java? Performance –interpreters too slow –poor optimizing compilers –virtual machine

Why not Java? lack of scientific software –computational libraries –numerical issues/interfaces –major effort to port from f77/C

Issues performance library/application support numeric concerns language features/limitations

Performance

What are we really measuring? language vs. virtual machine (VM) Java -> bytecode translator bytecode execution (VM) –interpreted –just-in-time compilation (JIT) –adaptive compilers (HotSpot) underlying hardware

Matrix multiply optimized (100% Pure Java) * Pentium II I 500Mhz; java JDK 1.2 (Win98) 2-level blocking: 40x40, 8x8

Java Benchmarking Efforts Caffine Mark SPECjvm98 Java Linpack Java Grande Forum Benchmarks SciMark Image/J benchmark BenchBeans VolanoMark Plasma benchmark RMI benchmark JMark JavaWorld benchmark...

SciMark Benchmark Numerical benchmark for Java, C/C++ composite results for five kernels: –FFT (complex, 1D) –Successive Over-relaxation –Monte Carlo integration –Sparse matrix multiply –dense LU factorization results in Mflops two sizes: small, large

SciMark results over 200 platforms (OS/CPU/JVM) deployed from one mouse click –numerical libraries –instrumentation/analysis –optional database collection impossible to do in Fortran/C/C++

SciMark 2.0 results

JVMs have improved over time SciMark : 333 MHz Sun Ultra 10

SciMark: Java vs. C (Sun UltraSPARC 60) * Sun JDK 1.3 (HotSpot), javac -0; Sun cc -0; SunOS 5.7

SciMark: Java vs. C (Intel PIII 500MHz, Linux) * RH Linux 6.2, gcc (v ) -06, IBM JDK 1.3, javac -O

Current JVMs aren’t so bad... Scimark high score: 323 Mflops * –FFT: 271 Mflops –Jacobi: 353 Mflops –Monte Carlo: 60 Mflops –Sparse matmult: 308 –LU factorization: 621 Mflops * 1.5 GHz AMD Athlon, IBM 1.3.1, OS/2

Making Java fast(er) Native methods (JNI) stand-alone compliers (.java ->.exe) modified JVMs –(fused mult-adds, bypass array bounds checking) aggressive bytecode optimization –JITs, HotSpot, etc. bytecode transformers concurrency: threads, RMI

Numerical Software (Libraries)

Scientific Java Libraries Matrix library (JAMA) –NIST/Mathworks –LU, QR, SVD, eigenvalue solvers Java Numerical Toolkit (JNT) –special functions –quadrature –random numbers –BLAS subset IBM –Array class package Univ. of Maryland –Linear Algebra library JLAPACK –port of LAPACK COLT Visual Numerics –LINPACK –Complex

Java Numerics Group industry-wide consortium to establish tools, APIs, and libraries –IBM, Intel, Compaq/Digital/HP, Sun, MathWorks, VNI, NAG –NIST, Inria –Berkeley, UCSB, Austin, MIT, Indiana component of Java Grande Forum –Concurrency group

Scientific Java Resources Java Numerics Group – Java Grande Forum – SciMark Benchmark –

Java Numerics Issues Virtual Machine –reproducability: IEEE floating point model –multidimensonal arrays –complex data types –lightweight objects Language –operator overloading –generic typing (templates)

Floating point model binary reproducability hard for numerics floating point model based on Sun architecture... –IEEE 754 standard, no extended formats –on other platforms (Intel, IBM, Alpha) must round down: up to 10x performance hit –solved by relaxing JVM model: extended exponents OK, use strictfp otherwise.

Floating Point Model (cont’d) Elementary functions – loose definition based on Sun C lib –e.g. on x86: hardware sin(x) = x for x>2^64 –solved by allowing results to vary in 1 ulp –use StrictMath library otherwise Fused Multiply-Adds (FMAs) –available on many platforms, 50% hit –discussed, but not yet resolved

Java Arrays 1-d array size limited to 2^32 elements multi-arrays ala C: A[i][j] need Fortran-like arrays for best optimization –no aliasing of subsections –map to 1-d vector proposed ‘row-major’ contiguous array class – use A.get(i,j): ugly & slow?

Java vs. Fortran Performance *IBM RS/ MHz POWER2 (266 Mflops peak) AIX Fortran, HPJC

Complex numbers / Lightweight Objects class has wrong semantics (x = = y) can’t return/pass by value temporaries can clog garbage collection solutions: –add complex native type to JVM (?) –allow lightweight objects (C structs) general solution for intervals, multiprecision, etc. requires new category of variables in JVM –use preprocessor to unroll complex operations

Java Language Issues operator overloading –numeric community makes best case –unlikely to be introduced into the language –can be solved by external preprocessors templates (generics) –proposal for Generic Java (GJ) passed through standardization process Is Java a language issue at all...?

Conclusions Java’s biggest strength for scientific computing: binary portability, dynamic distribution Java numerics performance can be competitive –can achieve efficiency of optimized C/Fortran –will it, depends on economics -- not technology best Java performance on commodity platforms improving Java numerics: –integrate true array and complex into Java standard –more libraries and numerical software support