Go to the first, previous, next, last section, table of contents.


GA array-manipulation functions

Note that Global Arrays contains approximately 70 functions in toto. The following are merely a few representative examples. See http://www.emsl.pnl.gov:2080/docs/global/GAapi.html for the complete list of Global Arrays functions.

Distributed arrays are created and destroyed with the following functions:

Fortran function: LOGICAL FUNCTION GA_create (type, dim1, dim2, array_name, chunk1, chunk2, g_a)
INTEGER type, dim1, dim2, chunk1, chunk2, g_a
CHARACTER*(*) array_name

C function: logical GA_create (Integer *type, Interger *dim1, Integer *dim2, char *array_name, Integer *chunk1, Integer *chunk2, Integer *g_a)
Create a dim1-by-dim2 distributed array of MA datatype type (see section Initialization and Termination Functions) blocked into chunk sizes of at least chunk1 by chunk2 and uniquely identified by the string array_name. GA_create() returns a handle to the array, g_a, for use by other Global Arrays functions. GA_create() is a collective operation.

Fortran function: LOGICAL FUNCTION GA_destroy (g_a)
INTEGER g_a

C function: logical GA_destroy (Integer *g_a)
Deallocate a distributed array and reclaim its resources. This is a collective operation.

Some of the more basic array-manipulation functions include:

Fortran subroutine: SUBROUTINE GA_get (g_a, ilo, ihi, jlo, jhi, buf, ld)
INTEGER g_a
INTEGER ilo, ihi, jlo, jhi
some_type buf
INTEGER ld

where some_type is either DOUBLE PRECISION, COMPLEX, or INTEGER.

C function: void GA_get (Integer *g_a, Integer *ilo, Integer *ihi, Integer *jlo, Integer *jhi, Void *buf, Integer *ld)
Get the patch of data from distributed array g_a bounded by (ilo:ihi, jlo:jhi) into the local 2-D array buf, which contains ld columns (Fortran) or rows (C). This is an individual operation.

Fortran subroutine: SUBROUTINE GA_put (g_a, ilo, ihi, jlo, jhi, buf, ld)
INTEGER g_a
INTEGER ilo, ihi, jlo, jhi
some_type buf
INTEGER ld

where some_type is either DOUBLE PRECISION, COMPLEX, or INTEGER.

C function: void GA_put (Integer *g_a, Integer *ilo, Integer *ihi, Integer *jlo, Integer *jhi, Void *buf, Integer *ld)
Put the local 2-D array buf, which contains ld columns (Fortran) or rows (C), into the patch of the distributed array g_a bounded by (ilo:ihi, jlo:jhi). This is an individual operation.


Go to the first, previous, next, last section, table of contents.