7.2.3 _gfortran_caf_this_image — Querying the image number

Synopsis:

int _gfortran_caf_this_image (caf_team_t team)

Description:

Return the current image number in the team, or in the current team, if no team is given.

Arguments:
teamintent(in), optional; The team this image’s number is requested for. If null, the image number in the current team is returned.
Notes:

Available since Fortran 2008 without argument; Since Fortran 2018 with optional team argument. Fortran 2008 uses 0 as argument for team, which is permissible, because a team handle is always an opaque pointer, which as a special case can be null here.