Debian Codegraph @

test/mpi/f77/rma/c2f2cwinf.f

raw
1 C
2 C Copyright (C) by Argonne National Laboratory
3 C See COPYRIGHT in top-level directory
4 C
5
6 program main
7 implicit none
8 include 'mpif.h'
9 integer errs, toterrs, ierr
10 integer wrank, wsize
11 integer wgroup, info, req, win
12 integer result
13 integer c2fwin
14 C The integer asize must be of ADDRESS_KIND size
15 include 'addsize.h'
16 errs = 0
17
18 call mtest_init( ierr )
19
20 C
21 C Test passing a Fortran MPI object to C
22 call mpi_comm_rank( MPI_COMM_WORLD, wrank, ierr )
23 asize = 0
24 call mpi_win_create( 0, asize, 1, MPI_INFO_NULL,
25 $ MPI_COMM_WORLD, win, ierr )
26 errs = errs + c2fwin( win )
27 call mpi_win_free( win, ierr )
28
29 C
30 C Test using a C routine to provide the Fortran handle
31 call f2cwin( win )
32 C no info, in comm world, created with no memory (base address 0,
33 C displacement unit 1
34 call mpi_win_free( win, ierr )
35
36 C
37 C Summarize the errors
38 C
39 call mtest_finalize( errs )
40
41 end
42