next up previous
Next: Global scalar and data Up: Java language Binding Previous: Structured SPMD programming

Global variables

HPJava is a SPMD programming style language, when a program starts on a group of $n$ processes, there will be $n$ logical control threads, which mapping to utmost $n$ physical processors.

On each control thread, the program can define variables in the same way as Java language. The variables created in this way are local variables, they are replicated names on each process, which will be accessed by each process individually.

Besides local variables, HPJava allows a program to define global variables, which are distributed on a process group. The global variables will be considered a single entity during the execution on each process which creates it.

The language has special syntax for the definition of global data. And the global variables are all obtained by using the new operator from free storage.

When a global variable is created, a data descriptor is also allocated to describe where it is created. We will further introduce this concept.



Subsections

Bryan Carpenter 2002-07-12