1 ! This file created from test/mpi/f77/rma/c2f2cwinf.f with f77tof90
2 ! -*- Mode: Fortran; -*-
4 ! (C) 2003 by Argonne National Laboratory.
5 ! See COPYRIGHT in top-level directory.
11 integer errs, toterrs, ierr
13 integer wgroup, info, req, win
16 ! The integer asize must be of ADDRESS_KIND size
17 integer (kind=MPI_ADDRESS_KIND) asize
24 ! Test passing a Fortran MPI object to C
25 call mpi_comm_rank( MPI_COMM_WORLD, wrank, ierr )
27 call mpi_win_create( 0, asize, 1, MPI_INFO_NULL, &
28 & MPI_COMM_WORLD, win, ierr )
29 errs = errs + c2fwin( win )
30 call mpi_win_free( win, ierr )
33 ! Test using a C routine to provide the Fortran handle
35 ! no info, in comm world, created with no memory (base address 0,
37 call mpi_win_free( win, ierr )
40 ! Summarize the errors
42 call mpi_allreduce( errs, toterrs, 1, MPI_INTEGER, MPI_SUM, &
43 & MPI_COMM_WORLD, ierr )
44 if (wrank .eq. 0) then
45 if (toterrs .eq. 0) then
48 print *, ' Found ', toterrs, ' errors'
52 call mpi_finalize( ierr )