SyncTeam

Waits until every image of a team reaches this point.

Declaration

Syntax

SyncTeam(expr team, expr? stat, expr? errmsg)

Arguments

Argument

Description

team

the team to synchronise.

stat

a variable receiving the status.

errmsg

a character variable receiving the error message.

Return values

None.

Description

sync team is SyncAll restricted to the images of one team, so teams formed by FormTeam can synchronise independently of each other.

Examples

(SyncTeam
  :team (Var
    :v (SymbolRef 1 "team")
  )
  :stat (Var
    :v (SymbolRef 1 "stat")
  )
  :errmsg nil
)

It comes from this complete ASR text document:

(TranslationUnit
  :symtab (SymbolTable
    :id 0
    :symbols {
      "main" (Program
        :symtab (SymbolTable
          :id 1
          :symbols {
            "n" (Variable
              :parent_symtab 1
              :name "n"
              :dependencies []
              :intent :Local
              :symbolic_value nil
              :value nil
              :storage :Default
              :type (Integer
                :kind 4
              )
              :type_declaration nil
              :abi :Source
              :access :Public
              :presence :Required
              :value_attr false
              :target_attr false
              :contiguous_attr false
              :bindc_name nil
              :is_volatile false
              :is_protected false
              :pass_attr :NotMethod
              :self_argument nil
              :codims []
            )
            "stat" (Variable
              :parent_symtab 1
              :name "stat"
              :dependencies []
              :intent :Local
              :symbolic_value nil
              :value nil
              :storage :Default
              :type (Integer
                :kind 4
              )
              :type_declaration nil
              :abi :Source
              :access :Public
              :presence :Required
              :value_attr false
              :target_attr false
              :contiguous_attr false
              :bindc_name nil
              :is_volatile false
              :is_protected false
              :pass_attr :NotMethod
              :self_argument nil
              :codims []
            )
            "team" (Variable
              :parent_symtab 1
              :name "team"
              :dependencies []
              :intent :Local
              :symbolic_value nil
              :value nil
              :storage :Default
              :type (Integer
                :kind 4
              )
              :type_declaration nil
              :abi :Source
              :access :Public
              :presence :Required
              :value_attr false
              :target_attr false
              :contiguous_attr false
              :bindc_name nil
              :is_volatile false
              :is_protected false
              :pass_attr :NotMethod
              :self_argument nil
              :codims []
            )
          }
        )
        :name "main"
        :dependencies []
        :body [
          (SyncAll
            :stat (Var
              :v (SymbolRef 1 "stat")
            )
            :errmsg nil
          )
          (SyncImages
            :image_set (Var
              :v (SymbolRef 1 "n")
            )
            :stat (Var
              :v (SymbolRef 1 "stat")
            )
            :errmsg nil
          )
          (SyncMemory
            :stat (Var
              :v (SymbolRef 1 "stat")
            )
            :errmsg nil
          )
          (FormTeam
            :team_number (IntegerConstant
              :n 1
              :type (Integer
                :kind 4
              )
              :intboz_type :Decimal
            )
            :team (Var
              :v (SymbolRef 1 "team")
            )
            :new_index (Var
              :v (SymbolRef 1 "n")
            )
            :stat nil
            :errmsg nil
          )
          (SyncTeam
            :team (Var
              :v (SymbolRef 1 "team")
            )
            :stat (Var
              :v (SymbolRef 1 "stat")
            )
            :errmsg nil
          )
          (ChangeTeam
            :team (Var
              :v (SymbolRef 1 "team")
            )
            :stat nil
            :errmsg nil
            :body [
              (Assignment
                :target (Var
                  :v (SymbolRef 1 "n")
                )
                :value (IntegerConstant
                  :n 0
                  :type (Integer
                    :kind 4
                  )
                  :intboz_type :Decimal
                )
                :overloaded nil
                :realloc_lhs false
                :move_allocation false
              )
            ]
            :end_stat nil
            :end_errmsg nil
          )
        ]
      )
    }
  )
  :items []
)

See Also

FormTeam, ChangeTeam, SyncAll