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

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

Adding compiled files

File size: 2.8 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Alloc_mem 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Alloc_mem \fP \- Allocates a specified memory segment.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Alloc_mem(MPI_Aint \fIsize\fP, MPI_Info \fIinfo\fP, void *\fIbaseptr\fP)
13
14.SH Fortran Syntax (see FORTRAN NOTES)
15.nf
16INCLUDE 'mpif.h'
17MPI_ALLOC_MEM(\fISIZE, INFO, BASEPTR, IERROR\fP)
18        INTEGER \fIINFO, IERROR\fP
19        INTEGER(KIND=MPI_ADDRESS_KIND) \fISIZE, BASEPTR\fP
20
21.SH C++ Syntax
22.nf
23#include <mpi.h>
24void* MPI::Alloc_mem(MPI::Aint \fIsize\fP, const MPI::Info& \fIinfo\fP)
25
26.SH INPUT PARAMETERS
27.ft R
28.TP 1i
29size
30Size of memory segment in bytes (nonnegative integer).
31.ft R
32.TP 1i
33info
34Info argument (handle).
35
36.SH OUTPUT PARAMETERS
37.ft R
38.TP 1i
39baseptr
40Pointer to beginning of memory segment allocated.
41.TP 1i
42IERROR
43Fortran only: Error status (integer).
44
45.SH DESCRIPTION
46.ft R
47MPI_Alloc_mem allocates \fIsize\fP bytes of memory. The starting address
48of this memory is returned in the variable \fIbase\fP.
49.sp
50
51.SH FORTRAN NOTES
52.ft R
53There is no portable FORTRAN 77 syntax for using MPI_Alloc_mem.
54There is no portable Fortran syntax for using pointers returned
55from MPI_Alloc_mem. However, MPI_Alloc_mem can be used with Sun
56Fortran compilers.
57.sp
58From FORTRAN 77, you can use the following non-standard
59declarations for the SIZE and BASEPTR arguments:
60.nf
61           INCLUDE "mpif.h"
62           INTEGER*MPI_ADDRESS_KIND SIZE, BASEPTR
63.fi
64.sp
65From either FORTRAN 77 or Fortran 90, you can use "Cray pointers"
66for the BASEPTR argument. Cray pointers are described further in
67the Fortran User's Guide and are supported by many Fortran compilers. 
68For example,
69.sp
70.nf
71           INCLUDE "mpif.h"
72           REAL*4 A(100,100)
73           POINTER (BASEPTR, A)
74           INTEGER*MPI_ADDRESS_KIND SIZE
75
76           SIZE = 4 * 100 * 100
77           CALL MPI_ALLOC_MEM(SIZE,MPI_INFO_NULL,BASEPTR,IERR)
78
79           ! use A
80
81           CALL MPI_FREE_MEM(A, IERR)
82.fi
83
84.SH ERRORS
85Almost 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.
86.sp
87Before the error value is returned, the current MPI error handler is
88called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler
89may 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. 
90
91.SH SEE ALSO
92.ft R
93.sp
94MPI_Free_mem
Note: See TracBrowser for help on using the repository browser.