NUM_IMAGES — Function that returns the number of imagesRESULT = NUM_IMAGES(DISTANCE, FAILED)
| DISTANCE | (optional, intent(in)) Nonnegative scalar integer
|
| FAILED | (optional, intent(in)) Scalar logical expression
|
.TRUE.,
the number of failed images is returned, otherwise, the number of images which
do have not the failed status.
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