-
Notifications
You must be signed in to change notification settings - Fork 0
/
add_explain.tex
117 lines (93 loc) · 3.95 KB
/
add_explain.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
\documentclass[12pt]{article}
\usepackage{fullpage}
\usepackage{color}
\usepackage{alltt}
\usepackage{underscore}
\usepackage{environ}
\usepackage{graphicx}
\include{preamble}
\include{otype}
\begin{document}
\section{Additional Explanations}
Global arrays are distributed array objects supported in a message-passing program through the GA library calls. They can be created, destroyed, and manipulated using a set of GA operations.
\subsection{Attributes of GA Operations}
Global arrays can have the following attributes.
\begin{itemize}
\item One-sided/independent - references shared or remote data without remote process cooperation (unlike send/receive pair)
\item Collective - requires all processes to make the call
\item Local - operation is local to each process and does not require communication
\item Atomic - operation has mutual exclusion built in
\item Non-blocking - Nonblocking operations initiate a communication call and then return control to the application. A return from a nonblocking operation call indicates a mere initiation of the data transfer process and the operation can be completed locally by making a call to the wait (e.g., nga_nbwait) routine.
\end{itemize}
\subsection{Language Interoperability}
GA provides C and Fortran interfaces to the same array objects in the same (mixed-language) program.
\subsection{Higher-dimensional Array API}
All releases of GA less than 3.0 supported only 2-dimensional arrays. Starting with the release of 3.0, GA arrays can be be essentially of arbitrary dimensions but the package as compiled supports up to 7 dimensions (Fortran limit for multidimensional arrays).
The 2-D API for backward compatibility with older versions of the toolkit remained unchanged. For some GA operations, two versions of the API are available. They are identified with a ``GA" or ``NGA" prefix that correspond to either the old 2-dimensional or the new arbitrary(N)-dimensional version, respectively.
\section{Python}
This section describes using Global Arrays with Python.
\subsection{Module ga}
The Global Arrays (GA) Python interface.
This module exports the GA C API, with a few enhancements. The notable exceptions include supporting Pythonic ranges. The ranges here are half-open e.g., [0,n) instead of in the C API where they are closed e.g., [0,n]. This follows the Python convention.
\subsection{Variables}
\begin{codeseg}
C_CHAR = 1000
C_DBL = 1004
C_DCPL = 1007
C_FLT = 1003
C_INT = 1001
C_LDBL = 1005
C_LDCPL = 1008
C_LONG = 1002
C_LONGLONG = 1016
C_SCPL = 1006
F_BYTE = 1009
F_DBL = 1013
F_DCPL = 1015
F_INT = 1010
F_LOG = 1011
F_REAL = 1012
F_SCPL = 1014
TYPE_BASE = 1000
WORLD_PROC_GROUP = -1
__package__ = None
__test__ = \{u'_acc_common (line 249)': '_acc_common(int g_a, b...
_to_dtype = \{1000: <type 'numpy.int8'>, 1001: <type 'numpy.int...
_to_typenum = \{1000: 1, 1001: 5, 1002: 7, 1003: 11, 1004: 12, ...
\end{codeseg}
\subsection{Variables Details}
The following are detailed examples of Python variables.
\begin{codeseg}
_test_
Value:
\{u'_acc_common (line 249)': '''_acc_common(int g_a, buffer, lo=None, h\
i=None, alpha=None, nb=False, periodic=False, skip=None)
Combines data from buffer with data in the global array patch.
The buffer array is assumed to be have the same number of
dimensions as the global array. If the buffer is not contiguous, \ a
contiguous copy will be made.
...
_to_dtype
Value:
\{1000: <type 'numpy.int8'>,
1001: <type 'numpy.int32'>,
1002: <type 'long'>,
1003: <type 'numpy.float32'>,
1004: <type 'numpy.float64'>,
1005: <type 'numpy.float128'>,
1006: <type 'numpy.complex64'>,
1007: <type 'numpy.complex128'>,
...
_to_typenum
Value:
\{1000: 1,
1001: 5,
1002: 7,
1003: 11,
1004: 12,
1005: 13,
1006: 14,
1007: 15,
...
\end{codeseg}
\end{document}