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

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

Adding compiled files

File size: 4.2 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Request_free 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Request_free\fP \- Frees a communication request object.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Request_free(MPI_Request *request)
13
14.SH Fortran Syntax
15.nf
16\s-1INCLUDE\s0 'mpif.h'
17MPI_REQUEST_FREE(REQUEST, IERROR)
18        INTEGER REQUEST, IERROR
19
20.SH C++ Syntax
21.nf
22#include <mpi.h>
23void Request::Free()
24
25.SH INPUT/OUTPUT PARAMETER
26.ft R
27.TP 1i
28request
29      Communication request (handle).
30
31.SH DESCRIPTION
32.ft R
33This operation allows a request object to be deallocated without waiting for the associated communication to complete.
34.sp
35MPI_Request_free marks the request object for deallocation and sets request
36to MPI_REQUEST_NULL. Any ongoing communication that is associated with the request will be allowed to complete. The request will be deallocated only after its completion.
37
38.SH NOTES
39Once a request is freed by a call to MPI_Request_free, it is not possible to check for the successful completion of the associated communication with calls to MPI_Wait or MPI_Test. Also, if an error occurs subsequently during the communication, an error code cannot be returned to the user -- such an error must be treated as fatal. Questions arise as to how one knows when the operations have completed when using MPI_Request_free. Depending on the program logic, there may be other ways in which the program knows that certain operations have completed and this makes usage of MPI_Request_free practical. For example, an active send request could be freed when the logic of the program is such that the receiver sends a reply to the message sent -- the arrival of the reply informs the sender that the send has completed and the send buffer can be reused. An active receive request should never be freed, as the receiver will have no way to verify that the receive has completed and the receive buffer can be reused.
40
41.sp
42\fBExample:\fR
43.sp
44.nf
45    CALL MPI_COMM_RANK(MPI_COMM_WORLD, rank)
46    IF(rank.EQ.0) THEN
47        DO i=1, n
48          CALL MPI_ISEND(outval, 1, MPI_REAL, 1, 0, req, ierr)
49          CALL MPI_REQUEST_FREE(req, ierr)
50          CALL MPI_IRECV(inval, 1, MPI_REAL, 1, 0, req, ierr)
51          CALL MPI_WAIT(req, status, ierr)
52        END DO
53    ELSE    ! rank.EQ.1
54        CALL MPI_IRECV(inval, 1, MPI_REAL, 0, 0, req, ierr)
55        CALL MPI_WAIT(req, status)
56        DO I=1, n-1
57           CALL MPI_ISEND(outval, 1, MPI_REAL, 0, 0, req, ierr)
58           CALL MPI_REQUEST_FREE(req, ierr)
59           CALL MPI_IRECV(inval, 1, MPI_REAL, 0, 0, req, ierr)
60           CALL MPI_WAIT(req, status, ierr)
61        END DO
62        CALL MPI_ISEND(outval, 1, MPI_REAL, 0, 0, req, ierr)
63        CALL MPI_WAIT(req, status)
64    END IF
65.fi
66.sp
67This routine is normally used to free persistent requests created with
68either
69.I MPI_Recv_init
70or
71.I MPI_Send_init
72and friends.  However, it can be
73used to free a request created with
74.I MPI_Irecv
75or
76.I MPI_Isend
77and friends;
78in that case the use can not use the test/wait routines on the request.
79
80It
81.B is
82permitted to free an active request.  However, once freed, you can not
83use the request in a wait or test routine (e.g.,
84.I MPI_Wait
85).
86
87.SH ERRORS
88Almost 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.
89.sp
90Before the error value is returned, the current MPI error handler is
91called. 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. 
92
93.SH SEE ALSO
94MPI_Isend
95.br
96MPI_Irecv
97.br
98MPI_Issend
99.br
100MPI_Ibsend
101.br
102MPI_Irsend
103.br
104MPI_Recv_init
105.br
106MPI_Send_init
107.br
108MPI_Ssend_init
109.br
110MPI_Rsend_init
111.br
112MPI_Test
113.br
114MPI_Wait
115.br
116MPI_Waitall
117.br
118MPI_Waitany
119.br
120MPI_Waitsome
121.br
122MPI_Testall
123.br
124MPI_Testany
125.br
126MPI_Testsome
127
128
129   
Note: See TracBrowser for help on using the repository browser.