Given by Bryan Carpenter, Geoffrey Fox, Xinying Li, Yuhong wen, Guansong Zhang at Alliance 98 NCSA Illinois on April 27-29 98. Foils prepared 3 May 98
Outside Index
Summary of Material
Current Status of HPJava and motivation in context of HPspmd |
HPF like but SPMD not High Level Data parallel |
Outside Index Summary of Material
Java binding of the High Level HPspmd model |
Bryan Carpenter, Geoffrey Fox, Xinying Li, Yuhong Wen, Guansong Zhang |
Data parallelism vital in High Performance scientific computing. |
High level HPF programming model attractive, but implementations problematic. |
HPspmd model: Distributed array syntax, plus high-level class library bindings for communication and arithmetic on arrays. |
Explicitly MIMD control flow. |
An instance of the HPspmd language model. |
Adds limited new syntax to Java for describing and accessing distributed arrays. |
Distributed array model is a superset of HPF 1.0 model. |
3 distributed control constructs replace ON HOME and FORALL constructs of HPF. |
In HPspmd model, all communications go through explicit calls to user-level libraries, initially: |
Adlib: regular collective operations |
MPI: low-level message passing |
Later, add interfaces to other libraries, eg |
Global Arrays: 1-sided access to remote data |
CHAOS: irregular collective operations |
HPJava |
Procs p = new Procs1(4) ; |
Range x = new BlockRange(100,p.dim(0)); |
float [[,*]] a = new float [[x, 100]] on p ; |
float [[]] b = new float [[x]] on p ; |
HPF |
!HPF$ PROCESSOR P(4) |
!HPF$ DISTRIBUTE T(BLOCK) ONTO P |
REAL A(100,100) |
!HPF$ ALIGN A(:,*) WITH T(:) |
REAL B(100) |
!HPF$ ALIGN B(:) WITH T(:) |
Explicitly coordinate groups of processes. |
Groups cooperate in loosely synchronous manner. |
Control constructs on, at and overall dispatch control. |
on(p) { |
overall(i = x|:) |
b [i] = 0 ; |
at(j = x [3]) |
b [j] = 23 ; |
overall(i = x|2:99) { |
for(int k = 0 ; k < 50) |
a [i, k] = b [i] + k ; |
} |
} |
Procs p = new Procs2(NP, NP) ; |
on(p) { |
Range x = new BlockRange(N, p.dim(0), 1) ; // ghost width 1 |
Range y = new BlockRange(N, p.dim(1), 1) ; // ... |
float [[,]] u = new float [[x, y]] ; |
for(int parity = 0 ; parity < 2 ; parity++) { |
Adlib.writeHalo(u, widths) ; |
overall(i = x | 1 : N - 2) |
overall(j = y | 1 + (x.idx(i) + parity) % 2 : N - 2 : 2) |
u [i, j] = 0.25 * (u [i - 1, j] + u [i + 1, j] + u [i, j - 1] + u [i, j + 1]) ; |
} |
} |
Hand translated Jacobi iteration (HPJava to Java). |
Compared with sequential Java, C++ and Fortran (-O optimization level). |
JDK 1.2Beta, JNI to Adlib, MPICH, Ultrasparc cluster |
We have outlined a dialect of Fortran following the same HPspmd programming model |
C++ version of the model can be implemented through class libraries and macros alone (but inefficient). |
Collaborators at University of Peking to implement compilers for these languages. |