Events in both MP Prism and scalar Prism can take action clauses. For example, in MP Prism the following action clause prints x for the pset foo when the members of foo are stopped at line 10:
stop at 10 {print x} pset foo
Associating an action with an event forces a global synchronization at the breakpoint or tracepoint. In the example above, every process in pset foo must stop at line 10 before x can be printed. If a member does not stop at line 10, the action never takes place. In a trace event, all processes in the pset must stop at the specified place and synchronize; the action then takes place, and the processes automatically continue execution.
You can include an eval pset command as an event action. For example,
stop in send {eval pset sending}
evaluates the pset sending when all the members of the current pset are stopped in send. You receive error messages if it is impossible to evaluate membership in a pset (for example, because a variable in the set definition is not active).
Note these limitations in using event actions: i:
I n MP Prism, you cannot include a pset qualifier in the action. The command in the action clause takes its pset from the pset of the event.
In both MP Prism and scalar Prism, you cannot include commands that affect program execution, specifically:
In both MP Prism and scalar Prism, you cannot include the load, reload, return, and core commands.