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

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

Adding compiled files

File size: 3.2 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Dims_create 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Dims_create \fP \- Creates a division of processors in a Cartesian grid.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Dims_create(int \fInnodes\fP, int\fI ndims\fP, int\fI *dims\fP)
13
14.SH Fortran Syntax
15.nf
16INCLUDE 'mpif.h'
17MPI_DIMS_CREATE(\fINNODES, NDIMS, DIMS, IERROR\fP)
18        INTEGER \fINNODES, NDIMS, DIMS(*), IERROR\fP
19
20.SH C++ Syntax
21.nf
22#include <mpi.h>
23void Compute_dims(int \fInnodes\fP, int \fIndims\fP, int \fIdims\fP[])
24
25.SH INPUT PARAMETERS
26.ft R
27.TP 1i
28nnodes
29Number of nodes in a grid (integer).
30.TP 1i
31ndims
32Number of Cartesian dimensions (integer).
33
34.SH IN/OUT PARAMETER
35.TP 1i
36dims
37Integer array of size ndims specifying the number of nodes in each dimension.
38
39.SH OUTPUT PARAMETER
40.ft R
41.TP 1i
42IERROR
43Fortran only: Error status (integer).
44
45.SH DESCRIPTION
46.ft R
47For Cartesian topologies, the function MPI_Dims_create helps the user select a balanced distribution of processes per coordinate direction, depending on the number of processes in the group to be balanced and optional constraints that can be specified by the user. One use is to partition all the processes (the size of MPI_COMM_WORLD's group) into an n-dimensional topology.
48.sp
49The entries in the array \fIdims\fP are set to describe a Cartesian grid with \fIndims\fP dimensions and a total of \fInnodes\fP nodes. The dimensions are set to be as close to each other as possible, using an appropriate divisibility algorithm. The caller may further constrain the operation of this routine by specifying elements of array dims. If dims[i] is set to a positive number, the routine will not modify the number of nodes in dimension i; only those entries where  dims[i] = 0 are modified by the call.   
50.sp
51Negative input values of dims[i] are erroneous. An error will occur if
52nnodes is not a multiple of ((pi) over (i, dims[i] != 0)) dims[i].   
53.sp
54For dims[i] set by the call, dims[i] will be ordered in nonincreasing order. Array dims is suitable for use as input to routine MPI_Cart_create. MPI_Dims_create is local.
55.sp
56\fBExample:\fP
57.nf
58
59dims
60before                                  dims
61call            function call           on return
62-----------------------------------------------------
63(0,0)   MPI_Dims_create(6, 2, dims)     (3,2)
64(0,0)   MPI_Dims_create(7, 2, dims)     (7,1)
65(0,3,0) MPI_Dims_create(6, 3, dims)     (2,3,1)
66(0,3,0) MPI_Dims_create(7, 3, dims)     erroneous call
67------------------------------------------------------
68
69.SH ERRORS
70Almost 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.
71.sp
72Before the error value is returned, the current MPI error handler is
73called. 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. 
74
Note: See TracBrowser for help on using the repository browser.