1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
4
<LANGUAGE>eng</LANGUAGE>
5
<TITLE>pvm_spawn_independent</TITLE>
6
<TYPE>Scilab function</TYPE>
7
<DATE>January 1998</DATE>
8
<SHORT_DESCRIPTION name="pvm_spawn_independent"> Starts new PVM processes. </SHORT_DESCRIPTION>
10
<CALLING_SEQUENCE_ITEM>[tids, numt] = pvm_spawn_independent(task, ntask, [where]) </CALLING_SEQUENCE_ITEM>
15
<PARAM_NAME>task: </PARAM_NAME>
17
<SP>string, which is the executable file name of the PVM process to be started. The executable must already reside on the host on which it is to be started. The name may be a file in the PVM search path or an absolute path. The default PVM search path is $HOME/pvm3/bin/$PVM_ARCH/ .</SP>
21
<PARAM_NAME>ntask: </PARAM_NAME>
23
<SP>integer, specifying the number of copies of the executable file to start.</SP>
27
<PARAM_NAME>where: </PARAM_NAME>
29
<SP>string (optional), can be a host name such as ``tequila.ens-lyon.fr'' or a PVM architecture class such as ``SUN4''.</SP>
33
<PARAM_NAME>numt: </PARAM_NAME>
35
<SP>integer, the actual number of tasks started. Values less than zero indicate a system error.</SP>
39
<PARAM_NAME>tids</PARAM_NAME>
41
<SP>row of integers, array of the tids of the PVM processes started by this pvm_spawn_independent call.</SP>
47
<P><VERB>pvm_spawn_independent</VERB>
48
starts <VERB>ntask</VERB> copies of the executable named
49
<VERB>task</VERB>.</P>
51
On systems that support environment variables,
52
<VERB>pvm_spawn_independent</VERB> passes selected variables
53
from parent environment to children tasks. If set, the envar
54
<VERB>PVM_EXPORT</VERB> is passed. If <VERB>PVM_EXPORT</VERB> contains other names
55
(separated by ':') they will be passed too. This is useful for e.g.:</P>
58
setenv DISPLAY myworkstation:0.0
60
setenv PVM_EXPORT DISPLAY:MYSTERYVAR
64
The hosts on which the PVM processes are started are determined by the
65
<VERB>where</VERB> arguments. On return the array
66
<VERB>tids</VERB> contains the PVM task identifiers for each process started.
67
If <VERB>pvm_spawn_independent</VERB> starts one or more tasks,
69
will be the actual number of tasks started. If a system error occurs
70
then <VERB>numt</VERB> will be < 0.
71
If <VERB>numt</VERB> is les than <VERB>ntask</VERB>
72
then some executables have failed to start.
73
The last locations in the <VERB>tids</VERB> array
74
will contain error codes (see below for meaning). Note that the
75
first tids in the array are always valid.</P>
77
When the argument <VERB>where</VERB>
78
is omitted an heuristic (round-robin assignment) is used to
79
distribute the <VERB>ntask</VERB>
80
processes across the virtual machine.</P>
82
In the special case where a multiprocessor is specified by
84
<VERB>pvm_spawn_independent</VERB> will start all
85
copies on this single machine using the vendor's underlying routines.</P>
89
[tids, numt] = pvm_spawn_independent("a.out",2)
97
<LINK>pvm_spawn</LINK>