Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Reference Coarray Images

Data on other images is normally referenced by cosubscripts enclosed in square brackets.

For coarray images, each set of cosubscripts maps to an image index, which is an integer between one and the number of images, in the same way as a set of array subscripts maps to a position in array element order.

To find the image index for each image on the current team, specify intrinsic function THIS_IMAGE() with no arguments.

To find the image index for the executing image on an ancestor team, specify intrinsic function THIS_IMAGE (team) where team is a team variable for an ancestor team.

To find the set of cosubscript indices for a coarray z that corresponds to the executing image on the current team, specify THIS_IMAGE(z).

To find the set of cosubscript indices for a coarray z that corresponds to the executing image on an ancestor team described by the team variable team_var, specify THIS_IMAGE(z, team_var).

To find the cosubscript sub for a coarray z that corresponds to the executing image on an ancestor team described by the team variable team_var, specify THIS_IMAGE (coarray, z, team_var).

To find the image index un the current team that corresponds to a set of cosubscript indices sub for a coarray z, specify intrinsic function IMAGE_INDEX(z, sub).

To find the image index on the ancestor team described by team_var that corresponds to a set of cosubscript indices sub for a coarray z, specify intrinsic function IMAGE_INDEX(z, sub, team_var).

To find the image index on the sibling team numbered 4 that corresponds to a set of cosubscript indices sub for a coarray z, specify intrinsic function IMAGE_INDEX(z, sub, 4).

To find the number of images, specify intrinsic function NUM_IMAGES.