In debugging a message-passing program, you may often want to look in turn at each process within a pset--for example, to see what the problem is for each process in the error pset. The cycle pset provides you with a convenient way of doing this.
You create a cycle pset out of an existing pset. If the existing pset is dynamic, the cycle pset is statically fixed when you create it. You can then cycle through each process in this pset to examine it in turn.
By default, the cycle pset is equivalent to the current pset. You can set it to some other pset via the define pset command, as described in " Defining Psets". For example,
(prism all) define pset cycle foo
copies foo into the cycle pset.
You can cycle through the processes in the cycle pset as follows:
From the Psets window - Use the Cycle arrows at the top left of the window to cycle through the members of the cycle set. Click on the right arrow to cycle up through the members of the set; click on the left arrow to cycle down through the members.
Clicking on a Cycle arrow does this:
It advances the current process in the cycle pset to be the next member in the set.
It makes the current pset consist of only this process.
From the command line - Use the cycle command. This has the same effect as clicking on the right cycle arrow in the Psets window. For example, this Prism session defines a pset, makes it the current set, and then cycles through its members:
(prism all) define pset foo 0:3 (prism all) pset foo (prism foo) cycle (prism 1) cycle (prism 2) cycle (prism 3) cycle (prism 0)
Note that changing the cycle pset erases any previous cycling information. For example, if you do the following:
Make foo the current set and cycle partway through it.
Make bar the current set.
Once again make foo the current set.
Then you start at the beginning again when you cycle through the members of foo.
From the source-window pop-up menu - Choose Cycle from this menu to advance to the next member of the cycle pset.
MP Prism includes a Cycle window type for visualizing data. When you print a variable's value to the Cycle window, the value changes to that of the variable in the new process whenever you cycle through the members of the cycle pset. For more information, see " Visualizing Multiple Processes in MP Prism".