|
|
|
@ -9,14 +9,14 @@ contains
|
|
|
|
|
function psb_c_get_index_base() bind(c) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
integer(psb_c_ipk) :: res
|
|
|
|
|
integer(psb_c_ipk_) :: res
|
|
|
|
|
|
|
|
|
|
res = psb_c_index_base
|
|
|
|
|
end function psb_c_get_index_base
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_set_index_base(base) bind(c)
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_c_ipk), value :: base
|
|
|
|
|
integer(psb_c_ipk_), value :: base
|
|
|
|
|
|
|
|
|
|
psb_c_index_base = base
|
|
|
|
|
end subroutine psb_c_set_index_base
|
|
|
|
@ -25,7 +25,7 @@ contains
|
|
|
|
|
use psb_base_mod, only : psb_get_errstatus
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
integer(psb_c_ipk) :: res
|
|
|
|
|
integer(psb_c_ipk_) :: res
|
|
|
|
|
|
|
|
|
|
res = psb_get_errstatus()
|
|
|
|
|
end function psb_c_get_errstatus
|
|
|
|
@ -34,7 +34,7 @@ contains
|
|
|
|
|
use psb_base_mod, only : psb_init
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
integer(psb_c_ipk) :: psb_c_init
|
|
|
|
|
integer(psb_c_ipk_) :: psb_c_init
|
|
|
|
|
|
|
|
|
|
integer :: ictxt
|
|
|
|
|
|
|
|
|
@ -44,7 +44,7 @@ contains
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_exit_ctxt(ictxt) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_exit
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt
|
|
|
|
|
|
|
|
|
|
call psb_exit(ictxt,close=.false.)
|
|
|
|
|
return
|
|
|
|
@ -52,7 +52,7 @@ contains
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_exit(ictxt) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_exit
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt
|
|
|
|
|
|
|
|
|
|
call psb_exit(ictxt)
|
|
|
|
|
return
|
|
|
|
@ -60,7 +60,7 @@ contains
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_abort(ictxt) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_abort
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt
|
|
|
|
|
|
|
|
|
|
call psb_abort(ictxt)
|
|
|
|
|
return
|
|
|
|
@ -69,8 +69,8 @@ contains
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_info(ictxt,iam,np) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_info
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt
|
|
|
|
|
integer(psb_c_ipk) :: iam,np
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt
|
|
|
|
|
integer(psb_c_ipk_) :: iam,np
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
|
return
|
|
|
|
@ -78,7 +78,7 @@ contains
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_barrier(ictxt) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_barrier
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt
|
|
|
|
|
|
|
|
|
|
call psb_barrier(ictxt)
|
|
|
|
|
end subroutine psb_c_barrier
|
|
|
|
@ -92,8 +92,8 @@ contains
|
|
|
|
|
subroutine psb_c_mbcast(ictxt,n,v,root) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_bcast
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_mpk) :: v(*)
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_mpk_) :: v(*)
|
|
|
|
|
|
|
|
|
|
if (n < 0) then
|
|
|
|
|
write(0,*) 'Wrong size in BCAST'
|
|
|
|
@ -107,8 +107,8 @@ contains
|
|
|
|
|
subroutine psb_c_ibcast(ictxt,n,v,root) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_bcast
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_ipk) :: v(*)
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_ipk_) :: v(*)
|
|
|
|
|
|
|
|
|
|
if (n < 0) then
|
|
|
|
|
write(0,*) 'Wrong size in BCAST'
|
|
|
|
@ -122,8 +122,8 @@ contains
|
|
|
|
|
subroutine psb_c_lbcast(ictxt,n,v,root) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_bcast
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_lpk) :: v(*)
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_lpk_) :: v(*)
|
|
|
|
|
|
|
|
|
|
if (n < 0) then
|
|
|
|
|
write(0,*) 'Wrong size in BCAST'
|
|
|
|
@ -137,8 +137,8 @@ contains
|
|
|
|
|
subroutine psb_c_ebcast(ictxt,n,v,root) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_bcast
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_epk) :: v(*)
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_epk_) :: v(*)
|
|
|
|
|
|
|
|
|
|
if (n < 0) then
|
|
|
|
|
write(0,*) 'Wrong size in BCAST'
|
|
|
|
@ -152,7 +152,7 @@ contains
|
|
|
|
|
subroutine psb_c_sbcast(ictxt,n,v,root) bind(c)
|
|
|
|
|
use psb_base_mod
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt,n, root
|
|
|
|
|
real(c_float) :: v(*)
|
|
|
|
|
|
|
|
|
|
if (n < 0) then
|
|
|
|
@ -167,7 +167,7 @@ contains
|
|
|
|
|
subroutine psb_c_dbcast(ictxt,n,v,root) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_bcast
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt,n, root
|
|
|
|
|
real(c_double) :: v(*)
|
|
|
|
|
|
|
|
|
|
if (n < 0) then
|
|
|
|
@ -183,7 +183,7 @@ contains
|
|
|
|
|
subroutine psb_c_cbcast(ictxt,n,v,root) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_bcast
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt,n, root
|
|
|
|
|
complex(c_float_complex) :: v(*)
|
|
|
|
|
|
|
|
|
|
if (n < 0) then
|
|
|
|
@ -198,7 +198,7 @@ contains
|
|
|
|
|
subroutine psb_c_zbcast(ictxt,n,v,root) bind(c)
|
|
|
|
|
use psb_base_mod
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt,n, root
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt,n, root
|
|
|
|
|
complex(c_double_complex) :: v(*)
|
|
|
|
|
|
|
|
|
|
if (n < 0) then
|
|
|
|
@ -213,7 +213,7 @@ contains
|
|
|
|
|
subroutine psb_c_hbcast(ictxt,v,root) bind(c)
|
|
|
|
|
use psb_base_mod, only : psb_bcast, psb_info, psb_ipk_
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_c_ipk), value :: ictxt, root
|
|
|
|
|
integer(psb_c_ipk_), value :: ictxt, root
|
|
|
|
|
character(c_char) :: v(*)
|
|
|
|
|
integer(psb_ipk_) :: iam, np, n
|
|
|
|
|
|
|
|
|
@ -235,8 +235,8 @@ contains
|
|
|
|
|
use psb_base_string_cbind_mod
|
|
|
|
|
implicit none
|
|
|
|
|
character(c_char), intent(inout) :: cmesg(*)
|
|
|
|
|
integer(psb_c_ipk), intent(in), value :: len
|
|
|
|
|
integer(psb_c_ipk) :: res
|
|
|
|
|
integer(psb_c_ipk_), intent(in), value :: len
|
|
|
|
|
integer(psb_c_ipk_) :: res
|
|
|
|
|
character(len=psb_max_errmsg_len_), allocatable :: fmesg(:)
|
|
|
|
|
character(len=psb_max_errmsg_len_) :: tmp
|
|
|
|
|
integer :: i, j, ll, il
|
|
|
|
|