1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
4
<LANGUAGE>eng</LANGUAGE>
5
<TITLE>pvm_barrier</TITLE>
6
<TYPE>Scilab function</TYPE>
8
<SHORT_DESCRIPTION name="pvm_barrier"> blocks the calling process until all processes in a group have called it. </SHORT_DESCRIPTION>
10
<CALLING_SEQUENCE_ITEM>[info] = pvm_barrier(group,count) </CALLING_SEQUENCE_ITEM>
15
<PARAM_NAME>type</PARAM_NAME>
17
<SP>: string, name of an existing group.</SP>
21
<PARAM_NAME>count</PARAM_NAME>
23
<SP>: integer, specifying the number of group members that must call pvm_barrier before they are all released.</SP>
27
<PARAM_NAME>info</PARAM_NAME>
29
<SP>: integer, status code returned by the routine.</SP>
35
<P><VERB>pvm_barrier</VERB> blocks the calling process until <VERB>count</VERB>
36
members of the <VERB>group</VERB> have called <VERB>pvm_barrier</VERB>.
37
The <VERB>count</VERB> argument is required because processes could be
38
joining the given group after other processes have called
39
<VERB>pvm_barrier</VERB>. Thus PVM doesn't know how many group members
40
to wait for at any given instant. Although <VERB>count</VERB> can be set less,
41
it is typically the total number of members of the group.
42
So the logical function of the <VERB>pvm_barrier</VERB> call
43
is to provide a group synchronization.
44
During any given barrier call all participating group members
45
must call barrier with the same count value.
46
Once a given barrier has been successfully passed,
47
<VERB>pvm_barrier</VERB> can be called again by the same group using the same
50
The returned value <VERB>info</VERB>will be zero if
51
<VERB>pvm_barrier</VERB> is successful and will be
52
will be < 0 if some error occurs.</P>
56
info = pvm_barrier( "worker", pvm_gsize("worker") )
61
<LINK>pvm_joingroup</LINK>