Next: , Previous: , Up: Intrinsic Procedures   [Contents][Index]


8.187 NUM_IMAGES — Function that returns the number of images

Description:

Returns the number of images.

Standard:

Fortran 2008 and later

Class:

Transformational function

Syntax:

RESULT = NUM_IMAGES()

Arguments: None.
Return value:

Scalar default-kind integer.

Example:
INTEGER :: value[*]
INTEGER :: i
value = THIS_IMAGE()
SYNC ALL
IF (THIS_IMAGE() == 1) THEN
  DO i = 1, NUM_IMAGES()
    WRITE(*,'(2(a,i0))') 'value[', i, '] is ', value[i]
  END DO
END IF
See also:

THIS_IMAGE, IMAGE_INDEX