Query scope synchronization state¶
ss_scope_synchronized
is a function defined in ssscope.c.
Synopsis:
-
htri_t
ss_scope_synchronized
(ss_scope_t *scope, unsigned tableidx)¶
Formal Arguments:
scope
: A link to the scope whose synchronization state is to be queried.tableidx
: Magic number to define which table to query. Iftableidx
is greater than or equal toSS_NPERSL_CLASSES
then all tables of the specified scope must be in a synchronized state before this function returns true.
Description: As detailed in ss_scope_synchronize, scopes may become out of sync when tasks independently modify table entries. This function will query whether a scope (or some table of the scope) is out of sync without synchronizing the scope. In fact, even when the scope is in a synchronized state, calling this function may be faster than calling ss_scope_synchronize.
Return Value: Returns true (positive) if the scope is in a synchronized state; false if synchronization is necessary; negative on error. It is an error to make this query about a scope which is not open.
Parallel Notes: Collective across a superset of the scope’s communicator. Communication is required within the scope communicator and other tasks will return true (positive) because the scope is not open there.
See Also:
- ss_scope_synchronize: 13.7: Synchronize a scope
- Scopes: Introduction for current chapter