source: proiecte/hpl/openmpi_compiled/share/man/man3/MPI_Comm_spawn_multiple.3 @ 97

Last change on this file since 97 was 97, checked in by (none), 14 years ago

Adding compiled files

File size: 7.9 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Comm_spawn_multiple 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Comm_spawn_multiple\fP \- Spawns multiple binaries, or the same binary with multiple sets of arguments.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Comm_spawn_multiple(int \fIcount\fP, char *\fIarray_of_commands\fP[],
13        char **\fIarray_of_argv\fP[], int \fIarray_of_maxprocs\fP[], MPI_Info
14        \fIarray_of_info\fP[], int \fIroot\fP, MPI_Comm \fIcomm\fP, MPI_Comm *\fIintercomm\fP,
15        int \fIarray_of_errcodes\fP[])
16
17.SH Fortran Syntax
18.nf
19INCLUDE 'mpif.h'
20MPI_COMM_SPAWN_MULTIPLE(\fICOUNT, ARRAY_OF_COMMANDS, ARRAY_OF_ARGV,
21        ARRAY_OF_MAXPROCS, ARRAY_OF_INFO, ROOT, COMM, INTERCOMM,
22        ARRAY_OF_ERRCODES, IERROR\fP)
23        INTEGER \fICOUNT, ARRAY_OF_INFO(*), ARRAY_OF_MAXPROCS(*), ROOT,
24                COMM, INTERCOMM, ARRAY_OF_ERRCODES(*), IERROR\fP
25        CHARACTER*(*) \fIARRAY_OF_COMMANDS\fP(*), \fIARRAY_OF_ARGV\fP(\fICOUNT\fP, *)
26
27.SH C++ Syntax
28.nf
29#include <mpi.h>
30MPI::Intercomm MPI::Intracomm::Spawn_multiple(int \fIcount\fP,
31        const char* \fIarray_of_commands\fP[], const char** \fIarray_of_argv\fP[],
32        const int \fIarray_of_maxprocs\fP[], const MPI::Info \fIarray_of_info\fP[],
33        int \fIroot\fP, int \fIarray_of_errcodes\fP[])
34
35MPI::Intercomm MPI::Intracomm::Spawn_multiple(int \fIcount\fP,
36        const char* \fIarray_of_commands\fP[], const char** \fIarray_of_argv\fP[],
37        const int \fIarray_of_maxprocs\fP[], const MPI::Info \fIarray_of_info\fP[],
38        int \fIroot\fP)
39
40.SH INPUT PARAMETERS
41.ft R
42.TP 1i
43count
44Number of commands (positive integer, significant to MPI only at \fIroot\fP -- see NOTES).
45.TP 1i
46array_of_commands
47Programs to be executed (array of strings, significant only at \fIroot\fP).
48.TP 1i
49array_of_argv
50Arguments for \fIcommands\fP (array of array of strings,  significant only at \fIroot\fP).
51.TP 1i
52array_of_maxprocs
53Maximum number of processes to start for each command (array of integers, significant only at \fIroot\fP).
54.TP 1i
55array_of_info
56Info objects telling the runtime system where and how to start processes (array of handles, significant only at \fIroot\fP).
57.TP 1i
58root
59Rank of process in which previous arguments are examined (integer).
60.TP 1i
61comm
62Intracommunicator containing group of spawning processes (handle).
63
64.SH OUTPUT PARAMETERS
65.ft R
66.TP 1i
67intercomm
68Intercommunicator between original group and the newly spawned group (handle).
69.TP 1i
70array_of_errcodes
71One code per process (array of integers).
72.TP 1i
73IERROR
74Fortran only: Error status (integer).
75
76.SH DESCRIPTION
77.ft R
78MPI_Comm_spawn_multiple is identical to MPI_Comm_spawn except that it can specify multiple executables. The first argument, \fIcount\fP, indicates the number of executables. The next three arguments are arrays of the corresponding arguments in MPI_Comm_spawn. The next argument, \fIarray_of_info\fP, is an array of \fIinfo\fP arguments; however, only the first argument in that array is used.  Any subsequent arguments in the array are ignored because an \fIinfo\fP argument applies to the entire job that is spawned, and cannot be different for each executable in the job.  See the INFO ARGUMENTS section for more information.
79.sp
80For the Fortran version of \fIarray_of_argv\fP, the element \fIarray_of_argv\fP(i,j) is the jth argument to command number i.
81.sp
82In any language, an application may use the constant MPI_ARGVS_NULL (which is likely to be (char ***)0 in C) to specify that no arguments should be passed to any commands. The effect of setting individual elements of \fIarray_of_argv\fP to MPI_ARGV_NULL is not defined. To specify arguments for some commands but not others, the commands without arguments should have a corresponding \fIargv\fP whose first element is null ((char *)0 in C and empty string in Fortran).
83.sp
84All of the spawned processes have the same MPI_COMM_WORLD. Their ranks in MPI_COMM_WORLD correspond directly to the order in which the commands are specified in MPI_Comm_spawn_multiple. Assume that m1 processes are generated by the first command, m2 by the second, etc. The processes corresponding to the first command have ranks 0, 1,..., m1-1. The processes in the second command have ranks m1, m1+1, ..., m1+m2-1. The processes in the third have ranks m1+m2, m1+m2+1, ..., m1+m2+m3-1, etc.
85.sp
86The \fIarray_of_errcodes\fP argument is 1-dimensional array of size
87.sp
88.nf
89         _ count
90        \\       n ,
91        /_ i=1   i
92.fi
93.sp
94where i is the ith element of \fIarray_of_maxprocs\fP. Command number \fIi\fP corresponds to the i contiguous slots in this array from element
95.sp
96.nf
97                      _              _
98         _ \fIi\fP-1          |   _ \fIi\fP          |
99        \\       n ,  to |  \\      n      | -1
100        /_ \fIj\fP=1   i      |  /_ \fIj\fP=1  j     |
101                     |_              _|
102.fi
103.sp
104Error codes are treated as for MPI_Comm_spawn.
105
106 
107.SH INFO ARGUMENTS
108The following keys for \fIinfo\fP are recognized in "Open MPI". (The reserved values mentioned in Section 5.3.4 of the MPI-2 standard are not implemented.)
109.sp
110.sp
111.nf
112Key                   Type      Description
113---                   ----      -----------
114
115host                  char *    Host on which the process should be spawned.
116wdir                  char *    Directory where the executable is located.
117ompi_prefix           char *    Same as the --prefix command line argument
118                                to mpirun.
119ompi_non_mpi          bool      If set to true, launching a non-MPI
120                                application; the returned communicator
121                                will be MPI_COMM_NULL.
122.fi
123
124.sp
125\fIbool\fP info keys are actually strings but are evaluated as
126follows: if the string value is a number, it is converted to an
127integer and cast to a boolean (meaning that zero integers are false
128and non-zero values are true).  If the string value is
129(case-insensitive) "yes" or "true", the boolean is true.  If the
130string value is (case-insensitive) "no" or "false", the boolean is
131false.  All other string values are unrecognized, and therefore false.
132
133.sp
134Note that if any of the info handles have \fIompi_non_mpi\fP set to
135true, then all info handles must have it set to true.  If some are set
136to true, but others are set to false (or are unset), MPI_ERR_INFO will
137be returned.
138 
139.sp
140Note that in "Open MPI", the first array location in \fIarray_of_info\fP is applied to all the commands in \fIarray_of_commands\fP.
141
142.SH NOTES
143The argument \fIcount\fP is interpreted by MPI only at the root, as is \fIarray_of_argv\fP. Since the leading dimension of \fIarray_of_argv\fP is \fIcount\fP, a nonpositive value of \fIcount\fP at a nonroot node could theoretically cause a runtime bounds check error, even though \fIarray_of_argv\fP should be ignored by the subroutine. If this happens, you should explicitly supply a reasonable value of \fIcount\fP on the nonroot nodes.
144.sp
145Calling MPI_Comm_spawn many times would create many sets of children with different MPI_COMM_WORLDs, whereas MPI_Comm_spawn_multiple creates children with a single MPI_COMM_WORLD, so the two methods are not completely equivalent. Also  if you need to spawn multiple executables, you may get better performance by using MPI_Comm_spawn_multiple instead of calling MPI_Comm_spawn several times.   
146
147.SH ERRORS
148Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object.
149.sp
150Before the error value is returned, the current MPI error handler is
151called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. 
152
153.SH SEE ALSO
154.ft R
155.sp
156.nf
157MPI_Comm_spawn(3)
158MPI_Comm_get_parent(3)
159mpirun(1)
160
Note: See TracBrowser for help on using the repository browser.