XcalableMP Programming Model and Language
7
array element of A(i) located on the node N. If the access is a reference, then
a one-sided communication to read the value from the remote memory (i.e. the
get operation) is issued by the executing node. If the access is a definition, then
a one-sided communication to write the value to the remote memory (i.e. the put
operation) is issued by the executing node.
1.4.4 Mixture of Global View and Local View
In the global-view model, nodes are used to distribute data and works. In the localview model, nodes are used to address remote data in the coarray notation. In
application programs, the programmers should choose an appropriate data model
according to the characteristics of their program. Figure 6 illustrates the global view
and the local view of data.
Data can have both a global view and a local view, and can be accessed in both of
the views. XcalableMP provides a directive to give the local name (alias) to global
data declared in the global-view programming model to enable them to also be
accessed in the local-view programming model. This feature is useful to optimize
a certain part of a program by using explicit remote data access in the local-view
programming model.
1.5 Base Languages
The XcalableMP language specification is defined on the basis of Fortran and C as
the base languages. More specifically, the base language of XcalableMP Fortran is
Fortran 90 or later, and that of XcalableMP C is ISO C90 (ANSI C89) or later with
some extensions (see below).
1.5.1 Array Section in XcalableMP C
In XcalableMP C, the base language C is extended so that a part of an array, that is,
an array section or subarray, can be put in an array assignment statement, which
is described in Sect. 1.5.2, and some XcalableMP constructs. An array section is
built from a subset of the elements of an array, which is specified by a sequence of
square-bracketed integer expressions or triplets, which are in the form of:
[ base ] : [ length ] [ : step ]
When step is positive, the triplet specifies a set of subscripts that is a regularly
spaced integer sequence of length length beginning with base and proceeding in
increments of step up to the largest. The same applies to negative step too.
When base is omitted, it is assumed to be 0. When length is omitted, it is assumed
to be the number of remainder elements of the dimension of the array. When step is
omitted, it is assumed to be 1.
Précédent

- 15/265

Suivant