<STOPPED_IMAGES Example Program>

Program stopped_images_example
  Use Iso_Fortran_Env
  Implicit None
  Integer i,istat
  If (Num_Images()<3) Error Stop 'Not enough images'
  If (This_Image()==3) Stop
  Sync All(Stat=istat)
  If (istat==Stat_Stopped_Image) Then
    If (This_Image()==1) Print *,'Stopped images:',Stopped_Images()
    Sync Images( [ 1,2,(i,i=4,Num_Images()) ] )
  End If
End Program

■ Execution Results

 Stopped images: 3