JAVA FOR COMPUTATIONAL SCIENCE AND ENGINEERING


Simulation and Modeling

Geoffrey Fox, Northeast Parallel Architectures Center, Syracuse University

Over the past two years, researchers from eight CRPC institutions have been investigating the use of World Wide Web technology for computing, focusing on the role of Java in science and engineering simulation. The CRPC sponsored a Birds of a Feather session at Supercomputing '96 in November and a workshop at Syracuse University in December to involve other members of the HPCC community in this research.

Java and Web technology can be used in many areas of science and engineering computation, including sophisticated user interfaces and coarse-grain integration of different modules in complex meta-applications. One of the most interesting (and controversial) uses of Java is for coding the computationally intense parts of a scientific code. All of these areas were discussed at the workshop, with promising initial results and studies reported in each case. Again, applications were described both for large-scale event-driven and time-stepped simulations and also to smaller client-side applets aimed at education.

The appeal of Java as a simulation language includes its object oriented characteristics, elegant applet software distribution model, and natural support of graphical user interfaces. Most skepticism about Java for simulation is centered on performance issues. There are two ways of processing Java code. Currently, Java is typically compiled to the "JavaVM - Virtual Machine," which are universal bytecodes downloaded from the server and interpreted on the client. Such invocation of Java applications suffers today from a performance penalty of between 5 (PC Just in Time [JIT] Compiler) and 50 (Unenhanced Interpreter), compared to comparable native compiled C code.

As JIT compilers improve in quality and become generally available, this way of using Java will improve but will always lie some factor of two in performance lower than conventional compiled code. However, native Java compilers can also be built. The workshop discussion indicated that with some restrictions on coding practice, native compiled Java can have a comparable performance to that from state-of-the-art C or Fortran compilers. Note that Java lacks pointers and operator overloading and this aids compiler optimization. Zoran Budimlic from the Fortran Parallel Programming Systems group at Rice pointed out in his presentation that the complex user-defined exception handlers allowed by Java prevent several important optimizations, and their use would need to be restricted in performance to critical parts of compiled Java code.

Java can be an important simulation language in both parallel and sequential environments. There is a rich set of issues in parallel Java that was initially explored by the Advanced Research Projects Agency (ARPA)-funded Parallel Compiler Runtime Consortium (PCRC) activity in the context of evaluating the re-use by parallel Java of runtime libraries designed originally for High Performance Fortran. Applications exhibit many forms of parallelism. Java and its associated Web infrastructure naturally support thread-based concurrency built into the language. This is perhaps not suitable for large-scale data parallelism but can be used for overlap of communication and computation and similar functional parallelism. The Java applet mechanism supports object parallelism as seen in event-driven simulation, while coarser grain metacomputing can be addressed by emerging commercial concepts such as JavaBeans. Java probably has superior support in these aspects of concurrency to other languages. However, data parallelism cannot be expressed directly in Java and its support requires additional runtime and language features that can be expected to resemble the way shared memory and data parallel extensions are added to Fortran (HPF) and C++ (HPC++). Of course, much parallel computing uses message passing, and here Java has excellent intrinsic support.

There will be a follow-up to the December workshop on June 21, 1997 associated with the ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP) in Las Vegas. Again, the group will try to broadly involve the HPCC community in identifying critical issues. Currently, it appears that Java promises the computational scientist programming environments that have both attractive user interfaces and high-performance execution.

The researchers have established an email discussion list and are collecting papers for a special issue of the journal, Concurrency: Practice and Experience. For more information, see http://old-npac.ucs.indiana.edu/projects/javaforcse.


Other Issues of PCR Back to PCR CRPC Home Page