Commits

Anonymous committed ff5d8ce

Added kinds to interfaces and MPI_Barrier

Comments (0)

Files changed (1)

ompi/mpi/f03/mpi3.f90.in

 
   subroutine MPI_Init_wrapper(err)
     implicit none
-    integer, optional, intent(out) :: err
+    integer(MPI_INT_KIND), optional, intent(out) :: err
     integer(C_INT) :: cargc, cerr
     type(C_PTR)    :: cargv
     cargc = 0
   
   subroutine MPI_Finalize_wrapper(err)
     implicit none
-    integer, optional, intent(out) :: err
+    integer(MPI_INT_KIND), optional, intent(out) :: err
     integer(C_INT) :: cerr
     cerr = MPI_Finalize_c()
     if (present(err)) err = cerr
   
   subroutine MPI_Comm_rank_wrapper(comm, rank, err)
     implicit none
-    type(MPI_COMM),    intent(in)  :: comm
-    integer,           intent(out) :: rank
-    integer, optional, intent(out) :: err
+    type(MPI_COMM),        intent(in)  :: comm
+    integer(MPI_INT_KIND), intent(out) :: rank
+    integer(MPI_INT_KIND), optional, intent(out) :: err
     integer(C_INT) :: cerr, crank
     
     cerr = MPI_Comm_rank_c(comm, crank)
   
   subroutine MPI_Comm_size_wrapper(comm, size, err)
     implicit none
-    type(MPI_Comm),    intent(in)  :: comm
-    integer,           intent(out) :: size
-    integer, optional, intent(out) :: err
+    type(MPI_Comm),        intent(in)  :: comm
+    integer(MPI_INT_KIND), intent(out) :: size
+    integer(MPI_INT_KIND), optional, intent(out) :: err
     integer(C_INT) :: cerr, csize
     
     cerr = MPI_Comm_size_c(comm, csize)
     if (present(err)) err = cerr
   end subroutine MPI_Comm_size_wrapper
   
+  subroutine MPI_Barrier_wrapper(comm, err)
+    implicit none
+    type(MPI_Comm), intent(in) :: comm
+    integer(MPI_INT_KIND), optional, intent(out) :: err
+    integer(C_INT) :: cerr
+    
+    cerr = MPI_Barrier_c(comm)
+    if (present(err)) err = cerr
+  end subroutine MPI_Barrier_wrapper
+  
   subroutine MPI_Get_processor_name_wrapper(name, resultlen, err)
     implicit none
-    character(kind=C_CHAR, len=*), intent(out) :: name
-    integer,           intent(inout) :: resultlen
-    integer, optional, intent(out)   :: err
+    character(kind=MPI_CHAR_KIND, len=*), intent(out)   :: name
+    integer(MPI_INT_KIND),                intent(inout) :: resultlen
+    integer(MPI_INT_KIND),      optional, intent(out)   :: err
     integer(C_INT) :: cerr, cresultlen
     
     cerr = MPI_Get_processor_name_c(name, cresultlen)
     OMPI_F03_IGNORE_TKR_PREDECL buf
     OMPI_F03_IGNORE_TKR_TYPE, intent(inout), OMPI_F03_ASYNCHRONOUS, target :: buf
     integer(MPI_COUNT_KIND),  intent(in)  :: count
-    type(MPI_Datatype), intent(in)  :: datatype
-    integer,            intent(in)  :: source
-    integer,            intent(in)  :: tag
-    type(MPI_Comm),     intent(in)  :: comm
-    type(MPI_Request),  intent(out) :: request
-    integer, optional,  intent(out) :: err                             
+    type(MPI_Datatype),       intent(in)  :: datatype
+    integer(MPI_INT_KIND),    intent(in)  :: source
+    integer(MPI_INT_KIND),    intent(in)  :: tag
+    type(MPI_Comm),           intent(in)  :: comm
+    type(MPI_Request),        intent(out) :: request
+    integer(MPI_INT_KIND), optional, intent(out) :: err                             
     
     integer(C_INT) :: cerr, ccount, csource, ctag
     
     OMPI_F03_IGNORE_TKR_PREDECL buf
     OMPI_F03_IGNORE_TKR_TYPE, intent(inout), volatile, target :: buf
     integer(MPI_COUNT_KIND),  intent(in)  :: count
-    type(MPI_Datatype), intent(in)  :: datatype
-    integer,            intent(in)  :: dest
-    integer,            intent(in)  :: tag
-    type(MPI_Comm),     intent(in)  :: comm
-    type(MPI_Request),  intent(out) :: request
-    integer, optional,  intent(out) :: err
+    type(MPI_Datatype),       intent(in)  :: datatype
+    integer(MPI_INT_KIND),    intent(in)  :: dest
+    integer(MPI_INT_KIND),    intent(in)  :: tag
+    type(MPI_Comm),           intent(in)  :: comm
+    type(MPI_Request),        intent(out) :: request
+    integer(MPI_INT_KIND), optional, intent(out) :: err
     
     integer(C_INT) :: cerr, ccount, cdest, ctag
     
     OMPI_F03_IGNORE_TKR_PREDECL buf
     OMPI_F03_IGNORE_TKR_TYPE, intent(inout), target :: buf
     integer(MPI_COUNT_KIND),  intent(in)    :: count
-    type(MPI_Datatype), intent(in)    :: datatype
-    integer,            intent(in)    :: source
-    integer,            intent(in)    :: tag
-    type(MPI_Comm),     intent(in)    :: comm
-    type(MPI_Status),   intent(inout) :: status
-    integer, optional,  intent(out)   :: err                             
+    type(MPI_Datatype),       intent(in)    :: datatype
+    integer(MPI_INT_KIND),    intent(in)    :: source
+    integer(MPI_INT_KIND),    intent(in)    :: tag
+    type(MPI_Comm),           intent(in)    :: comm
+    type(MPI_Status),         intent(inout) :: status
+    integer(MPI_INT_KIND), optional, intent(out) :: err
     
     integer(C_INT) :: cerr, ccount, csource, ctag
     
     implicit none
     OMPI_F03_IGNORE_TKR_PREDECL buf
     OMPI_F03_IGNORE_TKR_TYPE, intent(in), target :: buf
-    integer,            intent(in)  :: count
-    type(MPI_Datatype), intent(in)  :: datatype
-    integer,            intent(in)  :: dest
-    integer,            intent(in)  :: tag
-    type(MPI_Comm),     intent(in)  :: comm
-    integer, optional,  intent(out) :: err
+    integer(MPI_COUNT_KIND),  intent(in) :: count
+    type(MPI_Datatype),       intent(in) :: datatype
+    integer(MPI_INT_KIND),    intent(in) :: dest
+    integer(MPI_INT_KIND),    intent(in) :: tag
+    type(MPI_Comm),           intent(in) :: comm
+    integer(MPI_INT_KIND), optional, intent(out) :: err
 
     integer(C_INT) :: cerr, ccount, cdest, ctag
 
     implicit none
     type(MPI_Request), intent(inout) :: request
     type(MPI_Status),  intent(out)   :: status
-    integer, optional, intent(out)   :: err
+    integer(MPI_INT_KIND), optional, intent(out) :: err
     integer(C_INT) :: cerr
     
     cerr = MPI_Wait_c(request, status)
     integer(MPI_COUNT_KIND), intent(in) :: count
     type(MPI_Request), intent(inout), dimension(count) :: array_of_requests
     type(MPI_Status),  intent(out),   dimension(count) :: array_of_statuses
-    integer, optional, intent(out) :: err
+    integer(MPI_INT_KIND), optional, intent(out) :: err
     
     integer(C_INT) :: cerr, ccount
     
   
   function MPI_Wtime_wrapper() result(time)
     implicit none
-    real(kind(1.0d0)) :: time
+    real(MPI_DOUBLE_KIND) :: time
     time = MPI_Wtime_c()
   end function MPI_Wtime_wrapper