Scientific software frequently demands high performance in order to execute complex models in acceptable time. A major means of obtaining high performance is via parallel execution on multi-processor systems. However, traditional methods of programming for parallel execution can lead to substantial code-tangling where the needs of the mathematical model crosscut with the concern of parallel execution.Aspect-Oriented Programming is an attractive technology for solving the problem of code-tangling in high performance parallel scientific software. The underlying mathematical model and the parallelism can be treated as separate concerns and programmed accordingly. Their elements of code can then be woven together to produce the final application. This paper investigates the extent to which AspectJ technology can be used to achieve the desired separation of concerns in programs from the Java Grande Forum benchmark suite, a set of test applications for evaluation of the performance of Java in the context of numerical computation. The paper analyses three different benchmark programs and classifies the degrees of difficulty in separating concerns within them in a form suitable for AspectJ. This leads to an assessment of the influence of the design of a numerical application on the ability of AspectJ to solve this kind of code-tangling problem. It is concluded that: (1) scientific software is rarely produced in true object-oriented style; and (2) the inherent loop structure of many scientific algorithms is incompatible with the join point philosophy of AspectJ.Since AspectJ cannot intercept the iterations of for-loops (which are at the heart of high-performance computing), various object-oriented models are proposed for describing (embarrassingly parallel) rectangular double-nested forloops that make it possible to use AspectJ for encapsulating parallelisation in an aspect. Finally, a test-case using these models is presented, together with performance results obtained on various Java Virtual Machines.
[1]
Jonathan M. Bull,et al.
A Multithreaded Java Grande Benchmark Suite
,
2001
.
[2]
John R. Gilbert,et al.
Aspect-Oriented Programming of Sparse Matrix Code
,
1997,
ISCOPE.
[3]
L.A. Smith,et al.
A Parallel Java Grande Benchmark Suite
,
2001,
ACM/IEEE SC 2001 Conference (SC'01).
[4]
Scott Oaks,et al.
Java Threads
,
1997
.
[5]
Ian Foster,et al.
Designing and building parallel programs
,
1994
.
[6]
Cristina Videira Lopes,et al.
Aspect-Oriented Programming: An Historical Perspective (What's in a Name?)
,
2002
.
[7]
Mark Kambites,et al.
JOMP—an OpenMP-like interface for Java
,
2000,
JAVA '00.
[8]
Rohit Chandra,et al.
Parallel programming in openMP
,
2000
.
[9]
Lorna Smith,et al.
Benchmarking Java Grande Applications
,
2000
.
[10]
Geoffrey C. Fox,et al.
MPJ: MPI-like message passing for Java
,
2000
.
[11]
Aart J. C. Bik,et al.
javar: A prototype Java restructuring compiler
,
1997
.
[12]
William H. Press,et al.
Numerical recipes in C
,
2002
.
[13]
Aart J. C. Bik,et al.
The automatic generation of sparse primitives
,
1998,
TOMS.
[14]
Geoffrey C. Fox,et al.
MpiJava: A Java Interface to MPI
,
1998
.
[15]
Ian T. Foster,et al.
Designing and building parallel programs - concepts and tools for parallel software engineering
,
1995
.