User`s guide
Cray XMT™ Programming Environment User’s Guide
The xmt-tools module contains the tools that you use to run and monitor a
program. To run a program, use the mtarun command. For more information, see
Launching the Application on page 91 or the mtarun(1) man page. To monitor the
program, use the mtatop or dash command. For more information, see
Cray XMT
System Management or the mtatop(1) man page.
The mta-man module contains the man pages for all the utilities, tools, and
functions that you find in the XMT-PE.
3.2 Overview of Cray XMT Generic and Intrinsic Functions
The Cray XMT Programming Environment (XMT-PE) supports a number of
Cray XMT functions. For a list of these functions, see the generics(1) and
mta_intrinsics(3) man pages. You can refer to the man page for each function
for details about how to use that function. Man pages for functions list the names of
the header files you must include in your program when using that function.
3.2.1 Generic Functions
The Cray XMT compiler provides a number of generic functions that operate
atomically on scalar variables (variables that hold a single value). The generic
functions perform read and write, purge, touch, and int_fetch_add
operations on variables. The most common use of the generic functions is to
manipulate sync and future variables, but you can also use all of the generic
functions, except for the touch function, on other types of variables.
Generic functions frequently affect, or have behavior that is dependent upon, the
full-empty state of the variable. Because of this, you must know the initial full-empty
state of the variable before you allocate it. For sync variables, this state is full if
you initialize the variable in the declaration, and empty if you do not initialize the
variable. For future variables, the initial state is full. For all other variables, the initial
state is full if you initialize the variable in the declaration and undefined if you do
not initialize the variable.
You should avoid using generic functions on a variable (other than a sync or future
variable) that is less than a word in length. Each 8-byte word of memory is associated
with only one full-empty bit. If two or more variables share the same word, they share
a single full-empty bit; using a generic function to modify the full-empty state of one
of the variables also changes the state of the other variable(s).
You must be careful when using multiword scalars. When you use ordinary language
constructs, a read or write operation of a sync or future multiword variable occurs
as if the multiple words are fused and have a single full-empty bit, even when there
are other read or write operations that use the same variable.
20 S–2479–20