Skip to content. Skip to navigation

ICTP Portal

Sections
You are here: Home Manuals on-line PGI Compiler pghpf_ref PGHPF Workstation Reference Manual - C HPF_LOCAL_LIBRARY Procedures
Personal tools
Document Actions

PGHPF Workstation Reference Manual - C HPF_LOCAL_LIBRARY Procedures

<< << " border=0> >> > " border=0> Title Contents Index Home Help

C HPF_LOCAL_LIBRARY Procedures


This appendix lists the HPF_LOCAL_LIBRARY procedures. Table B.1 briefly lists the procedures. Refer to the man pages supplied with the pghpf software for further details on these procedures. Refer to Appendix A and B for details on the intrinsics defined in the Fortran 90 Language Specification and for HPF LIBRARY procedures.

For complete descriptions of the HPF_LOCAL_LIBRARY routines, and the current standards for HPF_LOCAL extrinsics, refer to Annex A, "Coding Local Routines in HPF and Fortran 90", in the High Performance Fortran Language Specification (Version 1.1, November 10, 1994, http://www.erc.msstate.edu/hpff/hpf-report/hpf-report/hpf-report.html or http://www.crpc.rice.edu/HPFF/home.html)

Table C.1 HPF_LOCAL_LIBRARY Procedures

Intrinsic

Description
ABSTRACT_TO_PHYSICAL
Returns processor identification for the physical processor associated with a specified abstract processor.
GLOBAL_ALIGNMENT
Returns information about the global HPF array argument.
GLOBAL_DISTRIBUTION
Returns information about the global HPF array argument.
GLOBAL_LBOUND
Returns lower bounds of the actual HPF global array associated with a dummy array.
GLOBAL_SHAPE
Returns the shape of the global HPF actual argument.
GLOBAL_SIZE
Returns the global extent of the specified argument.
GLOBAL_TEMPLATE
Returns template information for the global HPF array argument.
GLOBAL_TO_LOCAL
Converts a set of global coordinates within a global HPF actual argument.
GLOBAL_UBOUND
Returns upper bounds of the actual HPF global array associated with a dummy array.
LOCAL_BLKCNT
Returns the number of blocks of elements in each dimension on a given processor.
LOCAL_LINDEX
Returns the lowest local index of all blocks of an array dummy.
LOCAL_TO_GLOBAL
Converts a set of local coordinates within a local dummy array to an equivalent set of global coordinates.
LOCAL_UINDEX
Returns the highest local index of all blocks of an array dummy argument.
MY_PROCESSOR
Returns the identifying number of the calling physical processor.
PHYSICAL_TO_ABSTRACT
Returns coordinates for an abstract processor, relative to a global actual argument array.

HPF_LOCAL_LIBRARY Procedures


ABSTRACT_TO_PHYSICAL

Subroutine returns processor identification for the physical processor associated with a specified abstract processor relative to a global actual argument array.

Synopsis

ABSTRACT_TO_PHYSICAL(ARRAY, INDEX, PROC)

Arguments

ARRAY may be of any type; it must be a dummy array that is associated with a global HPF array actual argument. It is an INTENT(IN) argument.

INDEX must be a rank-1 integer array containing the coordinates of an abstract processor in the processors arrangement onto which the global HPF array is mapped. It is an INTENT(IN) argument. The size of INDEX must equal the rank of the processors arrangement.

PROC must be scalar and of type integer. It is an INTENT(OUT) argument. It receives the identifying value for the physical processor associated with the abstract processor specified by INDEX.


GLOBAL_ALIGNMENT

This has the same interface and behavior as the HPF inquiry subroutine HPF_ALIGNMENT, but it returns information about the global HPF array actual argument associated with the local dummy argument ARRAY, rather than returning information about the local array.

Synopsis

GLOBAL_ALIGNMENT(ARRAY, ...)

GLOBAL_DISTRIBUTION

This has the same interface and behavior as the HPF inquiry subroutine HPF_DISTRIBUTION, but it returns information about the global HPF array actual argument associated with the local dummy argument ARRAY, rather than returning information about the local array.

Synopsis

GLOBAL_DISTRIBUTION(ARRAY, ...)

GLOBAL_LBOUND

Inquiry function, returns all the lower bounds or a specified lower bound of the actual HPF global array.

Synopsis

GLOBAL_LBOUND(ARRAY, DIM)

Arguments

Optional argument. DIM

ARRAY may be of any type. It must not be a scalar. It must be a dummy array argument of an HPF_LOCAL procedure which is argument associated with a global HPF array actual argument.

DIM (optional) must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.

Return Type

The result is of type default integer. It is scalar if DIM is present; otherwise the result is an array of rank one and size n, where n is the rank of ARRAY.

Return Value

If the actual argument associated with the actual argument associated with ARRAY is an array section or an array expression, other than a whole array or an array structure component, GLOBAL_LBOUND(ARRAY, DIM) has the value 1; otherwise it has a value equal to the lower bound for subscript DIM of the actual argument associated with the actual argument associated with ARRAY.

GLOBAL_LBOUND(ARRAY) has a value whose i th component is equal to GLOBAL_LBOUND(ARRAY, i ), for i = 1,2,...n where n is the rank of ARRAY.


GLOBAL_SHAPE

Returns the shape of the global HPF actual argument associated with an array or scalar dummy argument of an HPF_LOCAL procedure.

Synopsis

GLOBAL_SHAPE(SOURCE)

Argument

SOURCE may be of any type. It may be array valued or a scalar. It must be a dummy argument of an HPF_LOCAL procedure which is argument associated with a global HPF actual argument.

Return Type

The result is a default integer array of rank one whose size is equal to the rank of SOURCE.

Return Value

The value of the result is the shape of the global actual argument associated with the actual argument associated with SOURCE.


GLOBAL_SIZE

Inquiry function returns the extent along a specified dimension of the global HPF actual array argument associated with a dummy array argument of an HPF_LOCAL procedure.

Synopsis

GLOBAL_SIZE(ARRAY, DIM)

Arguments

ARRAY may be of any type. It must not be a scalar. It must be a dummy argument of an HPF_LOCAL procedure which is argument associated with a global HPF actual argument.

DIM (optional) must be scalar and of type integer with a value in the range 1<= DIM <= n, where n is the rank of ARRAY.

Return Type

Default integer scalar.

Return Value

The result has a value equal to the extent of dimension DIM of the actual argument associated with the actual argument associated with ARRAY or, if DIM is absent, the total number of elements in the actual argument associated with the actual argument associated with ARRAY.


GLOBAL_TEMPLATE

This has the same interface and behavior as the HPF inquiry subroutine HPF_TEMPLATE, but it returns information about the global HPF array actual argument associated with the local dummy argument ARRAY, rather than returning information about the local array.

Synopsis

GLOBAL_TEMPLATE(ARRAY, ...)

Arguments

Refer to HPF_TEMPLATE.


GLOBAL_TO_LOCAL

Subroutine converts a set of global coordinates within a global HPF actual argument array to an equivalent set of local coordinates within the associated local dummy array.

Synopsis

GLOBAL_TO_LOCAL(ARRAY, G_INDEX, L_INDEX, LOCAL, 
NCOPIES, PROCS)

Arguments

ARRAY may be of any type; it must be a dummy array that is associated with a global HPF array actual argument. It is an INTENT(IN) argument.

G_INDEX must be a rank-1 integer array whose size is equal to the rank of ARRAY. It is an INTENT(IN) argument. It contains the coordinates of an element within the global HPF array actual argument associated with the local dummy array ARRAY.

L_INDEX (optional) must be a rank-1 integer array whose size is equal to the rank of ARRAY. It is an INTENT(OUT) argument. It receives the coordinates within a local dummy array of the element identified within the global actual argument array by G_INDEX. (These coordinates are identical on any processor that holds a copy of the identified global array element.)

LOCAL (optional) must be scalar and of type LOGICAL. It is an INTENT(OUT) argument. It is set to .TRUE. if the local array contains a copy of the global array element and to .FALSE. otherwise.

NCOPIES (optional) must be scalar and of type integer. It is an INTENT(OUT) argument. It is set to the number of processors that hold a copy of the identified element of the global actual array.

PROCS (optional) must be a rank-1 integer array whose size is a least the number of processors that hold copies of the identified element of the global actual array. The identifying numbers of those processors are placed in PROCS. The order in which they appear is implementation dependent.


GLOBAL_UBOUND

Inquiry function returns all the upper bounds or a specified upper bound of the actual HPF global array argument associated with an HPF_LOCAL dummy array argument.

Synopsis

GLOBAL_UBOUND(ARRAY, DIM)

Arguments

Optional argument. DIM

ARRAY may be of any type. It must not be a scalar. It must be a dummy array argument of an HPF_LOCAL procedure which is argument associated with a global HPF array actual argument.

DIM (optional) must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.

Return Type

The result is of type default integer. It is scalar if DIM is present; otherwise the result is an array of rank one and size n, where n is the rank of ARRAY.

Return Value

If the actual argument associated with the actual argument associated with ARRAY is an array section or an array expression, other than a whole array or an array structure component, GLOBAL_UBOUND(ARRAY, DIM) has a value equal to the number of elements in the given dimension; otherwise it has a value equal to the upper bound for subscript DIM of the actual argument associated with the actual argument associated with ARRAY, if dimension DIM does not have size zero and has the value zero if dimension DIM has size zero.

GLOBAL_UBOUND(ARRAY) has a value whose i th component is equal to GLOBAL_UBOUND(ARRAY, i ), for i = 1,2,...n where n is the rank of ARRAY.


LOCAL_BLKCNT

Pure function returns the number of blocks of elements in each dimension, or of a specific dimension of the array on a given processor.

Synopsis

LOCAL_BLKCNT(ARRAY, DIM, PROC)

Arguments

Optional arguments. DIM, PROC.

ARRAY may be of any type; it must be a dummy array that is associated with a global HPF array actual argument.

DIM (optional) must be scalar and of type integer with a value in the range 1<= DIM <= n where n is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.

PROC (optional) must be scalar and of type integer. It must be a valid processor number.

Return Type

The result is of type default integer. It is scalar if DIM is present; otherwise the result is an array of rank one and size n, where n is the rank of ARRAY.

Return Value

The value of LOCAL_BLKCNT(ARRAY, DIM, PROC) is the number of blocks of the ultimate align target of ARRAY in dimension DIM that are mapped to processor PROC and which have at least one element of ARRAY aligned to them.

LOCAL_BLKCNT(ARRAY, DIM) returns the same value as LOCAL_BLKCNT(ARRAY, DIM, PROC=MY_PROCESSOR()).

LOCAL_BLKCNT(ARRAY) has a value whose i th component is equal to LOCAL_BLKCNT(ARRAY, i ), for i = 1,...,n, where n is the rank of ARRAY.


LOCAL_LINDEX

Pure function returns the lowest local index of all blocks of an array dummy argument in a given dimension on a processor.

Synopsis

LOCAL_LINDEX(ARRAY, DIM, PROC)

Arguments

Optional argument. PROC.

ARRAY may be of any type; it must be a dummy array that is associated with a global HPF array actual argument.

DIM must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY.

PROC (optional) must be scalar and of type integer. It must be a valid processor number.

Return Type

The result is a rank-one array of type default integer and size 1<= DIM <= n, where n is the value returned by LOCAL_BLKCNT(ARRAY, DIM [, PROC]).

Return Value

The value of LOCAL_LINDEX(ARRAY, DIM, PROC) has a value whose i th component is the local index of the first element of the i th block in dimension DIM of ARRAY on processor PROC.

LOCAL_LINDEX(ARRAY, DIM) returns the same value as LOCAL_LINDEX(ARRAY, DIM, PROC=MY_PROCESSOR()).


LOCAL_TO_GLOBAL

Subroutine converts a set of local coordinates within a local dummy array to an equivalent set of global coordinates within the associated global HPF actual argument array.

Synopsis

LOCAL_TO_GLOBAL(ARRAY, L_INDEX, G_INDEX)

Arguments

ARRAY may be of any type; it must be a dummy array that is associated with a global HPF array actual argument. It is an INTENT(IN) argument.

L_INDEX must be a rank-1 integer array whose size is equal to the rank of ARRAY. It is an INTENT(IN) argument. It contains the coordinates of an element within the local dummy array ARRAY.

G_INDEX must be a rank-1 integer array whose size is equal to the rank of ARRAY. It is an INTENT(OUT) argument. It receives the coordinates within the global HPF array actual argument of the element identified within the local array by L_INDEX.


LOCAL_UINDEX

Pure function returns the highest local index of all blocks of an array dummy argument in a given dimension on a processor.

Synopsis

LOCAL_UINDEX(ARRAY, DIM, PROC)

Arguments

Optional argument. PROC.

ARRAY may be of any type; it must be a dummy array that is associated with a global HPF array actual argument.

DIM must be scalar and of type integer with a value in the range 1 <= DIM <= n, where n is the rank of ARRAY.

PROC (optional) must be scalar and of type integer. It must be a valid processor number.

Return Type

The result is a rank-one array of type default integer and size b , where b is the value returned by LOCAL_BLKCNT(ARRAY, DIM [, PROC])

Return Value

The value of LOCAL_UINDEX(ARRAY, DIM, PROC) has a value whose i th component is the local index of the last element of the i th block in dimension DIM of ARRAY on processor PROC.

LOCAL_UINDEX(ARRAY, DIM) returns the same value as LOCAL_UINDEX(ARRAY, DIM, PROC=MY_PROCESSOR()).


MY_PROCESSOR

Pure function returns the identifying number of the calling physical processor.

Synopsis

MY_PROCESSOR()

Return Type

The result is scalar and of type default integer.

Return Value

Returns the identifying number of the physical processor from which the call is made. This value is in the range where is the value returned by NUMBER_OF_PROCESSORS().


PHYSICAL_TO_ABSTRACT

Subroutine returns coordinates for an abstract processor, relative to a global actual argument array, corresponding to a specified physical processor. This procedure can be used only on systems where there is a one-to-one correspondence between abstract processors and physical processors. On systems where this correspondence is one-to-many an equivalent, system-dependent procedure should be provided.

Synopsis

PHYSICAL_TO_ABSTRACT(ARRAY, PROC, INDEX)

Arguments

ARRAY may be of any type; it must be a dummy array that is associated with a global HPF array actual argument. It is an INTENT(IN) argument.

PROC must be scalar and of type default integer. It is an INTENT(IN) argument. It contains an identifying value for a physical processor.

INDEX must be a rank-1 integer array. It is an INTENT(OUT) argument. The size of INDEX must equal the rank of the processor arrangement onto which the global HPF array is mapped. INDEX receives the coordinates within this processors arrangement of the abstract processor associated with the physical processor specified by PROC.


<< << " border=0> >> > " border=0> Title Contents Index Home Help
Weather
No information available
 

Powered by Plone This site conforms to the following standards: