File: send_f08_desc.f90

package info (click to toggle)
openmpi 2.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 99,912 kB
  • ctags: 55,589
  • sloc: ansic: 525,999; f90: 18,307; makefile: 12,062; sh: 6,583; java: 6,278; asm: 3,515; cpp: 2,227; perl: 2,136; python: 1,350; lex: 734; fortran: 52; tcl: 12
file content (73 lines) | stat: -rw-r--r-- 2,508 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc.  All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
!               All Rights reserved.
! $COPYRIGHT$

   ! This wrapper mimics how the MPI_Send_wrapper will eventually work.
   ! Eventually buf will be typed, TYPE(*), DIMENSION(..)
   ! Now can only mimic with explicit type and rank for assumed-shape dummy
   ! arguments.
   !
   subroutine MPI_Send_f08_desc_int_2d(buf, count, datatype, dest, tag, comm, ierror)
      use OMPI_Fortran_binding
      implicit none
      integer,            intent(in), target :: buf(:,:)
      integer,            intent(in) :: count, dest, tag
      type(MPI_Datatype), intent(in) :: datatype
      type(MPI_Comm),     intent(in) :: comm
      integer, optional,  intent(out) :: ierror

      integer :: err
      type(CFI_cdesc_t) :: buf_desc

      call make_desc_f(buf, buf_desc)
      !call print_desc(buf_desc)

      call ompi_send_f08_desc_f(buf_desc, count, datatype%MPI_VAL, dest, tag, comm%MPI_VAL, err)

      if (present(ierror)) ierror = err

   end subroutine MPI_Send_f08_desc_int_2d


! WARNING, not yet implemented, stub used to test MPI_SUBARRAYS_SUPPORTED usage
!
   subroutine MPI_Send_f08_desc_dbl_1d(buf, count, datatype, dest, tag, comm, ierror)
      use OMPI_Fortran_binding
      implicit none
      double precision,   intent(in), target :: buf(:)
      integer,            intent(in) :: count, dest, tag
      type(MPI_Datatype), intent(in) :: datatype
      type(MPI_Comm),     intent(in) :: comm
      integer, optional,  intent(out) :: ierror

      integer :: err

      print *, "WARNING, testing of double precision arrays not yet supported with subarrays"
      err = 1

      if (present(ierror)) ierror = err

   end subroutine MPI_Send_f08_desc_dbl_1d

! WARNING, not yet implemented, stub used to test MPI_SUBARRAYS_SUPPORTED usage
!
   subroutine MPI_Send_f08_desc_dbl_0d(buf, count, datatype, dest, tag, comm, ierror)
      use OMPI_Fortran_binding
      implicit none
      double precision,   intent(in), target :: buf
      integer,            intent(in) :: count, dest, tag
      type(MPI_Datatype), intent(in) :: datatype
      type(MPI_Comm),     intent(in) :: comm
      integer, optional,  intent(out) :: ierror

      integer :: err

      print *, "WARNING, testing of double precision arrays not yet supported with subarrays"
      err = 1

      if (present(ierror)) ierror = err

   end subroutine MPI_Send_f08_desc_dbl_0d