« Return to documentation listing
Table of Contents
#include <mpi.h> MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size) MPI_Win_detach(MPI_Win win, void *base)
USE MPI ! or the older form: INCLUDE ’mpif.h’ MPI_WIN_ATTACH(WIN, BASE, SIZE, IERROR) <type> BASE(*) INTEGER(KIND=MPI_ADDRESS_KIND) SIZE INTEGER WIN, IERROR
USE mpi_f08 MPI_Win_attach(win, base, size, ierror) TYPE(MPI_Win), INTENT(IN) :: win TYPE(*), DIMENSION(..), INTENT(IN) :: base INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN) :: size INTEGER, OPTIONAL, INTENT(OUT) :: ierror
If the base value used by MPI_Win_attach was allocated by MPI_Alloc_mem, the size of the window can be no larger than the value set by the MPI_ALLOC_MEM function.
MPI_Win_detach can be used to detach a previously attached memory region from win. The memory address base and win must match arguments passed to a previous call to MPI_Win_attach.
Before the error value is returned, the current MPI error handler is called. 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.