next up previous contents index
Next: Issues in the language Up: The HPspmd Model and Previous: Java packages for HPspmd

Programming examples

 

   figure318
Figure: Choleski Decomposition

In this section we give two example programs to show the new language features. The first example is Choleski decomposition, see figure gif. Here, remap is used to broadcast one updated column to each process. The function idx gets the global index of location m relative to the parent range x. The second example is Jacobi iteration, see figure gif, In the displayed code there is only one iteration, but it demonstrates how to define range references with ghost areas, to use the writeHalo function, and use of shifted locations as subscripts.

   figure335
Figure: Jacobi Relaxation



Guansong Zhang
Mon Feb 8 16:41:16 EST 1999