Blame test/mpi/f90/rma/c2f2cwinf90.f90

Packit Service c5cf8c
! This file created from f77/rma/c2f2cwinf.f with f77tof90
Packit Service c5cf8c
! -*- Mode: Fortran; -*- 
Packit Service c5cf8c
!
Packit Service c5cf8c
!  (C) 2003 by Argonne National Laboratory.
Packit Service c5cf8c
!      See COPYRIGHT in top-level directory.
Packit Service c5cf8c
!   
Packit Service c5cf8c
! Test just MPI-RMA
Packit Service c5cf8c
!
Packit Service c5cf8c
      program main
Packit Service c5cf8c
      use mpi
Packit Service c5cf8c
      integer errs, toterrs, ierr
Packit Service c5cf8c
      integer wrank, wsize
Packit Service c5cf8c
      integer wgroup, info, req, win
Packit Service c5cf8c
      integer result
Packit Service c5cf8c
      integer c2fwin
Packit Service c5cf8c
! The integer asize must be of ADDRESS_KIND size
Packit Service c5cf8c
      integer (kind=MPI_ADDRESS_KIND) asize
Packit Service c5cf8c
Packit Service c5cf8c
      errs = 0
Packit Service c5cf8c
Packit Service c5cf8c
      call mpi_init( ierr )
Packit Service c5cf8c
Packit Service c5cf8c
!
Packit Service c5cf8c
! Test passing a Fortran MPI object to C
Packit Service c5cf8c
      call mpi_comm_rank( MPI_COMM_WORLD, wrank, ierr )
Packit Service c5cf8c
      asize = 0
Packit Service c5cf8c
      call mpi_win_create( 0, asize, 1, MPI_INFO_NULL,  &
Packit Service c5cf8c
      &     MPI_COMM_WORLD, win, ierr )
Packit Service c5cf8c
      errs = errs + c2fwin( win )
Packit Service c5cf8c
      call mpi_win_free( win, ierr )
Packit Service c5cf8c
Packit Service c5cf8c
!
Packit Service c5cf8c
! Test using a C routine to provide the Fortran handle
Packit Service c5cf8c
      call f2cwin( win )
Packit Service c5cf8c
!     no info, in comm world, created with no memory (base address 0,
Packit Service c5cf8c
!     displacement unit 1
Packit Service c5cf8c
      call mpi_win_free( win, ierr )
Packit Service c5cf8c
      
Packit Service c5cf8c
!
Packit Service c5cf8c
! Summarize the errors
Packit Service c5cf8c
!
Packit Service c5cf8c
      call mtest_finalize( errs )
Packit Service c5cf8c
Packit Service c5cf8c
      end
Packit Service c5cf8c