diff --git a/Makefile b/Makefile index a8360aeb..325fa854 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ include Make.inc -all: libd based precd kryld utild +all: libd based precd kryld utild cbindd @echo "=====================================" @echo "PSBLAS libraries Compilation Successful." -#cbindd + based: libd precd utild: based kryld: precd based diff --git a/cbind/Makefile b/cbind/Makefile index 3d078a9c..9beb1604 100644 --- a/cbind/Makefile +++ b/cbind/Makefile @@ -12,7 +12,6 @@ lib: based precd krylovd /bin/cp -p $(CPUPDFLAG) *$(.mod) $(MODDIR) - based: cd base && $(MAKE) lib LIBNAME=$(LIBNAME) precd: based diff --git a/cbind/base/psb_base_tools_cbind_mod.F90 b/cbind/base/psb_base_tools_cbind_mod.F90 index a8f87496..ea40197a 100644 --- a/cbind/base/psb_base_tools_cbind_mod.F90 +++ b/cbind/base/psb_base_tools_cbind_mod.F90 @@ -8,14 +8,14 @@ contains function psb_c_error() bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res res = 0 call psb_error() end function psb_c_error function psb_c_clean_errstack() bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res res = 0 call psb_clean_errstack() end function psb_c_clean_errstack @@ -23,9 +23,10 @@ contains function psb_c_cdall_vg(ng,vg,ictxt,cdh) bind(c,name='psb_c_cdall_vg') result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: ng, ictxt - integer(psb_c_int) :: vg(*) + integer(psb_c_ipk) :: res + integer(psb_c_lpk), value :: ng + integer(psb_c_ipk), value :: ictxt + integer(psb_c_ipk) :: vg(*) type(psb_c_object_type) :: cdh type(psb_desc_type), pointer :: descp integer :: info @@ -56,9 +57,9 @@ contains function psb_c_cdall_vl(nl,vl,ictxt,cdh) bind(c,name='psb_c_cdall_vl') result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nl, ictxt - integer(psb_c_int) :: vl(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nl, ictxt + integer(psb_c_lpk) :: vl(*) type(psb_c_object_type) :: cdh type(psb_desc_type), pointer :: descp integer :: info @@ -88,8 +89,8 @@ contains function psb_c_cdall_nl(nl,ictxt,cdh) bind(c,name='psb_c_cdall_nl') result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nl, ictxt + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nl, ictxt type(psb_c_object_type) :: cdh type(psb_desc_type), pointer :: descp integer :: info @@ -119,8 +120,9 @@ contains function psb_c_cdall_repl(n,ictxt,cdh) bind(c,name='psb_c_cdall_repl') result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: n, ictxt + integer(psb_c_ipk) :: res + integer(psb_c_lpk), value :: n + integer(psb_c_ipk), value :: ictxt type(psb_c_object_type) :: cdh type(psb_desc_type), pointer :: descp integer :: info @@ -150,7 +152,7 @@ contains function psb_c_cdasb(cdh) bind(c,name='psb_c_cdasb') result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_object_type) :: cdh type(psb_desc_type), pointer :: descp integer :: info @@ -169,7 +171,7 @@ contains function psb_c_cdfree(cdh) bind(c,name='psb_c_cdfree') result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_object_type) :: cdh type(psb_desc_type), pointer :: descp integer :: info @@ -190,10 +192,10 @@ contains function psb_c_cdins(nz,ia,ja,cdh) bind(c,name='psb_c_cdins') result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz type(psb_c_object_type) :: cdh - integer(psb_c_int) :: ia(*),ja(*) + integer(psb_c_lpk) :: ia(*),ja(*) type(psb_desc_type), pointer :: descp integer :: info @@ -213,7 +215,7 @@ contains function psb_c_cd_get_local_rows(cdh) bind(c,name='psb_c_cd_get_local_rows') result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_object_type) :: cdh type(psb_desc_type), pointer :: descp @@ -234,7 +236,7 @@ contains function psb_c_cd_get_local_cols(cdh) bind(c,name='psb_c_cd_get_local_cols') result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_object_type) :: cdh type(psb_desc_type), pointer :: descp @@ -253,7 +255,7 @@ contains function psb_c_cd_get_global_rows(cdh) bind(c,name='psb_c_cd_get_global_rows') result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_lpk) :: res type(psb_c_object_type) :: cdh type(psb_desc_type), pointer :: descp @@ -274,7 +276,7 @@ contains function psb_c_cd_get_global_cols(cdh) bind(c,name='psb_c_cd_get_global_cols') result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_lpk) :: res type(psb_c_object_type) :: cdh type(psb_desc_type), pointer :: descp diff --git a/cbind/base/psb_c_base.h b/cbind/base/psb_c_base.h index fe07902e..c167f26e 100644 --- a/cbind/base/psb_c_base.h +++ b/cbind/base/psb_c_base.h @@ -14,11 +14,21 @@ extern "C" { #include -#if defined(LONG_INTEGERS_) + typedef int32_t psb_m_t; + +#if defined(IPK4) && defined(LPK4) + typedef int32_t psb_i_t; + typedef int32_t psb_l_t; +#elif defined(IPK4) && defined(LPK8) + typedef int32_t psb_i_t; + typedef int64_t psb_l_t; +#elif defined(IPK4) && defined(LPK8) typedef int64_t psb_i_t; + typedef int64_t psb_l_t; #else - typedef int32_t psb_i_t; #endif + typedef int64_t psb_e_t; + typedef float psb_s_t; typedef double psb_d_t; typedef float complex psb_c_t; diff --git a/cbind/base/psb_c_comm_cbind_mod.f90 b/cbind/base/psb_c_comm_cbind_mod.f90 index 389464a5..b6edbffd 100644 --- a/cbind/base/psb_c_comm_cbind_mod.f90 +++ b/cbind/base/psb_c_comm_cbind_mod.f90 @@ -8,7 +8,7 @@ contains function psb_c_c_ovrl(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cvector) :: xh type(psb_c_descriptor) :: cdh @@ -39,8 +39,8 @@ contains function psb_c_c_ovrl_opt(xh,cdh,update,mode) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: update, mode + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: update, mode type(psb_c_cvector) :: xh type(psb_c_descriptor) :: cdh @@ -72,7 +72,7 @@ contains function psb_c_c_halo(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cvector) :: xh type(psb_c_descriptor) :: cdh @@ -103,8 +103,8 @@ contains function psb_c_c_halo_opt(xh,cdh,tran,data,mode) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: data, mode + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: data, mode character(c_char) :: tran @@ -141,8 +141,8 @@ contains function psb_c_c_vscatter(ng,gx,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: ng + integer(psb_c_ipk) :: res + integer(psb_c_lpk), value :: ng complex(c_float_complex), target :: gx(*) type(psb_c_cvector) :: xh type(psb_c_descriptor) :: cdh @@ -175,7 +175,7 @@ contains function psb_c_cvgather(v,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res complex(c_float_complex), target :: v(*) type(psb_c_cvector) :: xh type(psb_c_descriptor) :: cdh @@ -208,7 +208,7 @@ contains function psb_c_cspgather(gah,ah,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: ah, gah type(psb_c_descriptor) :: cdh diff --git a/cbind/base/psb_c_psblas_cbind_mod.f90 b/cbind/base/psb_c_psblas_cbind_mod.f90 index ac984562..763beca6 100644 --- a/cbind/base/psb_c_psblas_cbind_mod.f90 +++ b/cbind/base/psb_c_psblas_cbind_mod.f90 @@ -1,14 +1,14 @@ module psb_c_psblas_cbind_mod use iso_c_binding + use psb_base_mod + use psb_objhandle_mod + use psb_base_string_cbind_mod contains function psb_c_cgeaxpby(alpha,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cvector) :: xh,yh type(psb_c_descriptor) :: cdh @@ -44,9 +44,6 @@ contains end function psb_c_cgeaxpby function psb_c_cgenrm2(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_float_complex) :: res @@ -74,9 +71,6 @@ contains end function psb_c_cgenrm2 function psb_c_cgeamax(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_float_complex) :: res @@ -103,9 +97,6 @@ contains end function psb_c_cgeamax function psb_c_cgeasum(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_float_complex) :: res @@ -134,9 +125,6 @@ contains function psb_c_cspnrmi(ah,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_float_complex) :: res @@ -163,9 +151,6 @@ contains end function psb_c_cspnrmi function psb_c_cgedot(xh,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none complex(c_float_complex) :: res @@ -197,11 +182,8 @@ contains function psb_c_cspmm(alpha,ah,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: ah type(psb_c_cvector) :: xh,yh @@ -242,11 +224,8 @@ contains function psb_c_cspmm_opt(alpha,ah,xh,beta,yh,cdh,trans,doswap) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: ah type(psb_c_cvector) :: xh,yh @@ -294,11 +273,8 @@ contains function psb_c_cspsm(alpha,ah,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: ah type(psb_c_cvector) :: xh,yh diff --git a/cbind/base/psb_c_serial_cbind_mod.F90 b/cbind/base/psb_c_serial_cbind_mod.F90 index b91aa34c..40648bc5 100644 --- a/cbind/base/psb_c_serial_cbind_mod.F90 +++ b/cbind/base/psb_c_serial_cbind_mod.F90 @@ -11,7 +11,7 @@ contains function psb_c_cvect_get_nrows(xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cvector) :: xh type(psb_c_vect_type), pointer :: vp @@ -29,7 +29,7 @@ contains function psb_c_cvect_f_get_cpy(v,xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res complex(c_float_complex) :: v(*) type(psb_c_cvector) :: xh @@ -52,7 +52,7 @@ contains function psb_c_cvect_zero(xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cvector) :: xh type(psb_c_vect_type), pointer :: vp @@ -73,7 +73,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: mh type(psb_cspmat_type), pointer :: ap @@ -96,7 +96,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: mh type(psb_cspmat_type), pointer :: ap @@ -119,7 +119,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res character(c_char) :: name(*) type(psb_c_cspmat) :: mh diff --git a/cbind/base/psb_c_tools_cbind_mod.F90 b/cbind/base/psb_c_tools_cbind_mod.F90 index 3c2571ec..ef5d489e 100644 --- a/cbind/base/psb_c_tools_cbind_mod.F90 +++ b/cbind/base/psb_c_tools_cbind_mod.F90 @@ -11,7 +11,7 @@ contains function psb_c_cgeall(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cvector) :: xh type(psb_c_descriptor) :: cdh @@ -40,7 +40,7 @@ contains function psb_c_cgeasb(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cvector) :: xh type(psb_c_descriptor) :: cdh @@ -70,7 +70,7 @@ contains function psb_c_cgefree(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cvector) :: xh type(psb_c_descriptor) :: cdh @@ -102,9 +102,9 @@ contains function psb_c_cgeins(nz,irw,val,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*) complex(c_float_complex) :: val(*) type(psb_c_cvector) :: xh type(psb_c_descriptor) :: cdh @@ -143,9 +143,9 @@ contains function psb_c_cgeins_add(nz,irw,val,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*) complex(c_float_complex) :: val(*) type(psb_c_cvector) :: xh type(psb_c_descriptor) :: cdh @@ -183,7 +183,7 @@ contains function psb_c_cspall(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: mh type(psb_c_descriptor) :: cdh @@ -213,7 +213,7 @@ contains function psb_c_cspasb(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: mh type(psb_c_descriptor) :: cdh @@ -242,7 +242,7 @@ contains function psb_c_cspfree(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: mh type(psb_c_descriptor) :: cdh @@ -277,8 +277,8 @@ contains use psb_c_rsb_mat_mod #endif implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: cdh, mh,upd,dupl + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: cdh, mh,upd,dupl character(c_char) :: afmt(*) integer :: info,n, fdupl character(len=5) :: fafmt @@ -313,9 +313,9 @@ contains function psb_c_cspins(nz,irw,icl,val,mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*), icl(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*), icl(*) complex(c_float_complex) :: val(*) type(psb_c_cspmat) :: mh type(psb_c_descriptor) :: cdh @@ -350,7 +350,7 @@ contains function psb_c_csprn(mh,cdh,clear) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res logical(c_bool), value :: clear type(psb_c_cspmat) :: mh type(psb_c_descriptor) :: cdh @@ -382,8 +382,8 @@ contains !!$ function psb_c_cspprint(mh) bind(c) result(res) !!$ !!$ implicit none -!!$ integer(psb_c_int) :: res -!!$ integer(psb_c_int), value :: mh +!!$ integer(psb_c_ipk) :: res +!!$ integer(psb_c_ipk), value :: mh !!$ integer :: info !!$ !!$ diff --git a/cbind/base/psb_cpenv_mod.f90 b/cbind/base/psb_cpenv_mod.f90 index cf5fc7b0..ee7cdcf9 100644 --- a/cbind/base/psb_cpenv_mod.f90 +++ b/cbind/base/psb_cpenv_mod.f90 @@ -9,14 +9,14 @@ contains function psb_c_get_index_base() bind(c) result(res) implicit none - integer(psb_c_int) :: 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_int), 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_int) :: 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_int) :: 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_int), 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_int), 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_int), 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_int), value :: ictxt - integer(psb_c_int) :: 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_int), value :: ictxt + integer(psb_c_ipk), value :: ictxt call psb_barrier(ictxt) end subroutine psb_c_barrier @@ -89,11 +89,26 @@ contains psb_c_wtime = psb_wtime() end function psb_c_wtime + 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(*) + + if (n < 0) then + write(0,*) 'Wrong size in BCAST' + return + end if + if (n==0) return + + call psb_bcast(ictxt,v(1:n),root=root) + end subroutine psb_c_mbcast + subroutine psb_c_ibcast(ictxt,n,v,root) bind(c) use psb_base_mod, only : psb_bcast implicit none - integer(psb_c_int), value :: ictxt,n, root - integer(psb_c_int) :: v(*) + integer(psb_c_ipk), value :: ictxt,n, root + integer(psb_c_ipk) :: v(*) if (n < 0) then write(0,*) 'Wrong size in BCAST' @@ -104,10 +119,40 @@ contains call psb_bcast(ictxt,v(1:n),root=root) end subroutine psb_c_ibcast + 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(*) + + if (n < 0) then + write(0,*) 'Wrong size in BCAST' + return + end if + if (n==0) return + + call psb_bcast(ictxt,v(1:n),root=root) + end subroutine psb_c_lbcast + + 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(*) + + if (n < 0) then + write(0,*) 'Wrong size in BCAST' + return + end if + if (n==0) return + + call psb_bcast(ictxt,v(1:n),root=root) + end subroutine psb_c_ebcast + subroutine psb_c_sbcast(ictxt,n,v,root) bind(c) use psb_base_mod implicit none - integer(psb_c_int), value :: ictxt,n, root + integer(psb_c_ipk), value :: ictxt,n, root real(c_float) :: v(*) if (n < 0) then @@ -122,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_int), value :: ictxt,n, root + integer(psb_c_ipk), value :: ictxt,n, root real(c_double) :: v(*) if (n < 0) then @@ -138,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_int), value :: ictxt,n, root + integer(psb_c_ipk), value :: ictxt,n, root complex(c_float_complex) :: v(*) if (n < 0) then @@ -153,7 +198,7 @@ contains subroutine psb_c_zbcast(ictxt,n,v,root) bind(c) use psb_base_mod implicit none - integer(psb_c_int), value :: ictxt,n, root + integer(psb_c_ipk), value :: ictxt,n, root complex(c_double_complex) :: v(*) if (n < 0) then @@ -168,7 +213,7 @@ contains subroutine psb_c_hbcast(ictxt,v,root) bind(c) use psb_base_mod, only : psb_bcast, psb_info implicit none - integer(psb_c_int), value :: ictxt, root + integer(psb_c_ipk), value :: ictxt, root character(c_char) :: v(*) integer :: n, iam, np @@ -190,8 +235,8 @@ contains use psb_base_string_cbind_mod implicit none character(c_char), intent(inout) :: cmesg(*) - integer(psb_c_int), intent(in), value :: len - integer(psb_c_int) :: 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 diff --git a/cbind/base/psb_d_comm_cbind_mod.f90 b/cbind/base/psb_d_comm_cbind_mod.f90 index 857d0ce7..5eb0e363 100644 --- a/cbind/base/psb_d_comm_cbind_mod.f90 +++ b/cbind/base/psb_d_comm_cbind_mod.f90 @@ -8,7 +8,7 @@ contains function psb_c_d_ovrl(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dvector) :: xh type(psb_c_descriptor) :: cdh @@ -39,8 +39,8 @@ contains function psb_c_d_ovrl_opt(xh,cdh,update,mode) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: update, mode + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: update, mode type(psb_c_dvector) :: xh type(psb_c_descriptor) :: cdh @@ -72,7 +72,7 @@ contains function psb_c_d_halo(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dvector) :: xh type(psb_c_descriptor) :: cdh @@ -103,8 +103,8 @@ contains function psb_c_d_halo_opt(xh,cdh,tran,data,mode) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: data, mode + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: data, mode character(c_char) :: tran @@ -141,8 +141,8 @@ contains function psb_c_d_vscatter(ng,gx,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: ng + integer(psb_c_ipk) :: res + integer(psb_c_lpk), value :: ng real(c_double), target :: gx(*) type(psb_c_dvector) :: xh type(psb_c_descriptor) :: cdh @@ -175,7 +175,7 @@ contains function psb_c_dvgather(v,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res real(c_double), target :: v(*) type(psb_c_dvector) :: xh type(psb_c_descriptor) :: cdh @@ -208,7 +208,7 @@ contains function psb_c_dspgather(gah,ah,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: ah, gah type(psb_c_descriptor) :: cdh diff --git a/cbind/base/psb_d_psblas_cbind_mod.f90 b/cbind/base/psb_d_psblas_cbind_mod.f90 index 76bdfb18..8a0ef3b4 100644 --- a/cbind/base/psb_d_psblas_cbind_mod.f90 +++ b/cbind/base/psb_d_psblas_cbind_mod.f90 @@ -1,14 +1,14 @@ module psb_d_psblas_cbind_mod use iso_c_binding + use psb_base_mod + use psb_objhandle_mod + use psb_base_string_cbind_mod contains function psb_c_dgeaxpby(alpha,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dvector) :: xh,yh type(psb_c_descriptor) :: cdh @@ -44,9 +44,6 @@ contains end function psb_c_dgeaxpby function psb_c_dgenrm2(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_double) :: res @@ -74,9 +71,6 @@ contains end function psb_c_dgenrm2 function psb_c_dgeamax(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_double) :: res @@ -103,9 +97,6 @@ contains end function psb_c_dgeamax function psb_c_dgeasum(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_double) :: res @@ -134,9 +125,6 @@ contains function psb_c_dspnrmi(ah,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_double) :: res @@ -163,9 +151,6 @@ contains end function psb_c_dspnrmi function psb_c_dgedot(xh,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_double) :: res @@ -197,11 +182,8 @@ contains function psb_c_dspmm(alpha,ah,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: ah type(psb_c_dvector) :: xh,yh @@ -242,11 +224,8 @@ contains function psb_c_dspmm_opt(alpha,ah,xh,beta,yh,cdh,trans,doswap) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: ah type(psb_c_dvector) :: xh,yh @@ -294,11 +273,8 @@ contains function psb_c_dspsm(alpha,ah,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: ah type(psb_c_dvector) :: xh,yh diff --git a/cbind/base/psb_d_serial_cbind_mod.F90 b/cbind/base/psb_d_serial_cbind_mod.F90 index 48314205..dad5cc2d 100644 --- a/cbind/base/psb_d_serial_cbind_mod.F90 +++ b/cbind/base/psb_d_serial_cbind_mod.F90 @@ -11,7 +11,7 @@ contains function psb_c_dvect_get_nrows(xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dvector) :: xh type(psb_d_vect_type), pointer :: vp @@ -29,7 +29,7 @@ contains function psb_c_dvect_f_get_cpy(v,xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res real(c_double) :: v(*) type(psb_c_dvector) :: xh @@ -39,13 +39,11 @@ contains res = -1 - if (c_associated(xh%item)) then - res = 0 + if (c_associated(xh%item)) then call c_f_pointer(xh%item,vp) fv = vp%get_vect() sz = size(fv) v(1:sz) = fv(1:sz) - write(0,*) 'In dvect_f_get_cpy:',v(1),fv(1) end if end function psb_c_dvect_f_get_cpy @@ -54,7 +52,7 @@ contains function psb_c_dvect_zero(xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dvector) :: xh type(psb_d_vect_type), pointer :: vp @@ -75,7 +73,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: mh type(psb_dspmat_type), pointer :: ap @@ -98,7 +96,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: mh type(psb_dspmat_type), pointer :: ap @@ -121,7 +119,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res character(c_char) :: name(*) type(psb_c_dspmat) :: mh diff --git a/cbind/base/psb_d_tools_cbind_mod.F90 b/cbind/base/psb_d_tools_cbind_mod.F90 index d39c040b..bd183422 100644 --- a/cbind/base/psb_d_tools_cbind_mod.F90 +++ b/cbind/base/psb_d_tools_cbind_mod.F90 @@ -11,7 +11,7 @@ contains function psb_c_dgeall(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dvector) :: xh type(psb_c_descriptor) :: cdh @@ -40,7 +40,7 @@ contains function psb_c_dgeasb(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dvector) :: xh type(psb_c_descriptor) :: cdh @@ -70,7 +70,7 @@ contains function psb_c_dgefree(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dvector) :: xh type(psb_c_descriptor) :: cdh @@ -102,9 +102,9 @@ contains function psb_c_dgeins(nz,irw,val,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*) real(c_double) :: val(*) type(psb_c_dvector) :: xh type(psb_c_descriptor) :: cdh @@ -143,9 +143,9 @@ contains function psb_c_dgeins_add(nz,irw,val,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*) real(c_double) :: val(*) type(psb_c_dvector) :: xh type(psb_c_descriptor) :: cdh @@ -183,7 +183,7 @@ contains function psb_c_dspall(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: mh type(psb_c_descriptor) :: cdh @@ -213,7 +213,7 @@ contains function psb_c_dspasb(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: mh type(psb_c_descriptor) :: cdh @@ -242,7 +242,7 @@ contains function psb_c_dspfree(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: mh type(psb_c_descriptor) :: cdh @@ -277,8 +277,8 @@ contains use psb_d_rsb_mat_mod #endif implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: cdh, mh,upd,dupl + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: cdh, mh,upd,dupl character(c_char) :: afmt(*) integer :: info,n, fdupl character(len=5) :: fafmt @@ -313,9 +313,9 @@ contains function psb_c_dspins(nz,irw,icl,val,mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*), icl(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*), icl(*) real(c_double) :: val(*) type(psb_c_dspmat) :: mh type(psb_c_descriptor) :: cdh @@ -350,7 +350,7 @@ contains function psb_c_dsprn(mh,cdh,clear) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res logical(c_bool), value :: clear type(psb_c_dspmat) :: mh type(psb_c_descriptor) :: cdh @@ -382,8 +382,8 @@ contains !!$ function psb_c_dspprint(mh) bind(c) result(res) !!$ !!$ implicit none -!!$ integer(psb_c_int) :: res -!!$ integer(psb_c_int), value :: mh +!!$ integer(psb_c_ipk) :: res +!!$ integer(psb_c_ipk), value :: mh !!$ integer :: info !!$ !!$ diff --git a/cbind/base/psb_objhandle_mod.F90 b/cbind/base/psb_objhandle_mod.F90 index b2f1c008..57a1d0d3 100644 --- a/cbind/base/psb_objhandle_mod.F90 +++ b/cbind/base/psb_objhandle_mod.F90 @@ -1,12 +1,23 @@ module psb_objhandle_mod use iso_c_binding -#if defined(LONG_INTEGERS) - integer, parameter :: psb_c_int = c_int64_t + integer, parameter :: psb_c_mpk = c_int32_t +#if defined(IPK4) && defined(LPK4) + integer, parameter :: psb_c_ipk = c_int32_t + integer, parameter :: psb_c_lpk = c_int32_t +#elif defined(IPK4) && defined(LPK8) + integer, parameter :: psb_c_ipk = c_int32_t + integer, parameter :: psb_c_lpk = c_int64_t +#elif defined(IPK8) && defined(LPK8) + integer, parameter :: psb_c_ipk = c_int64_t + integer, parameter :: psb_c_lpk = c_int64_t #else - integer, parameter :: psb_c_int = c_int32_t + integer, parameter :: psb_c_ipk = -1 + integer, parameter :: psb_c_lpk = -1 #endif + integer, parameter :: psb_c_epk = c_int64_t + type, bind(c) :: psb_c_object_type type(c_ptr) :: item = c_null_ptr end type psb_c_object_type diff --git a/cbind/base/psb_s_comm_cbind_mod.f90 b/cbind/base/psb_s_comm_cbind_mod.f90 index 71e68cc5..f929cbb0 100644 --- a/cbind/base/psb_s_comm_cbind_mod.f90 +++ b/cbind/base/psb_s_comm_cbind_mod.f90 @@ -8,7 +8,7 @@ contains function psb_c_s_ovrl(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_svector) :: xh type(psb_c_descriptor) :: cdh @@ -39,8 +39,8 @@ contains function psb_c_s_ovrl_opt(xh,cdh,update,mode) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: update, mode + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: update, mode type(psb_c_svector) :: xh type(psb_c_descriptor) :: cdh @@ -72,7 +72,7 @@ contains function psb_c_s_halo(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_svector) :: xh type(psb_c_descriptor) :: cdh @@ -103,8 +103,8 @@ contains function psb_c_s_halo_opt(xh,cdh,tran,data,mode) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: data, mode + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: data, mode character(c_char) :: tran @@ -141,8 +141,8 @@ contains function psb_c_s_vscatter(ng,gx,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: ng + integer(psb_c_ipk) :: res + integer(psb_c_lpk), value :: ng real(c_float), target :: gx(*) type(psb_c_svector) :: xh type(psb_c_descriptor) :: cdh @@ -175,7 +175,7 @@ contains function psb_c_svgather(v,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res real(c_float), target :: v(*) type(psb_c_svector) :: xh type(psb_c_descriptor) :: cdh @@ -208,7 +208,7 @@ contains function psb_c_sspgather(gah,ah,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: ah, gah type(psb_c_descriptor) :: cdh diff --git a/cbind/base/psb_s_psblas_cbind_mod.f90 b/cbind/base/psb_s_psblas_cbind_mod.f90 index ea964ea7..1dfd2515 100644 --- a/cbind/base/psb_s_psblas_cbind_mod.f90 +++ b/cbind/base/psb_s_psblas_cbind_mod.f90 @@ -1,14 +1,14 @@ module psb_s_psblas_cbind_mod use iso_c_binding + use psb_base_mod + use psb_objhandle_mod + use psb_base_string_cbind_mod contains function psb_c_sgeaxpby(alpha,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_svector) :: xh,yh type(psb_c_descriptor) :: cdh @@ -44,9 +44,6 @@ contains end function psb_c_sgeaxpby function psb_c_sgenrm2(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_float) :: res @@ -74,9 +71,6 @@ contains end function psb_c_sgenrm2 function psb_c_sgeamax(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_float) :: res @@ -103,9 +97,6 @@ contains end function psb_c_sgeamax function psb_c_sgeasum(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_float) :: res @@ -134,9 +125,6 @@ contains function psb_c_sspnrmi(ah,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_float) :: res @@ -163,9 +151,6 @@ contains end function psb_c_sspnrmi function psb_c_sgedot(xh,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_float) :: res @@ -197,11 +182,8 @@ contains function psb_c_sspmm(alpha,ah,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: ah type(psb_c_svector) :: xh,yh @@ -242,11 +224,8 @@ contains function psb_c_sspmm_opt(alpha,ah,xh,beta,yh,cdh,trans,doswap) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: ah type(psb_c_svector) :: xh,yh @@ -294,11 +273,8 @@ contains function psb_c_sspsm(alpha,ah,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: ah type(psb_c_svector) :: xh,yh diff --git a/cbind/base/psb_s_serial_cbind_mod.F90 b/cbind/base/psb_s_serial_cbind_mod.F90 index dedaab92..ce502caf 100644 --- a/cbind/base/psb_s_serial_cbind_mod.F90 +++ b/cbind/base/psb_s_serial_cbind_mod.F90 @@ -11,7 +11,7 @@ contains function psb_c_svect_get_nrows(xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_svector) :: xh type(psb_s_vect_type), pointer :: vp @@ -29,7 +29,7 @@ contains function psb_c_svect_f_get_cpy(v,xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res real(c_float) :: v(*) type(psb_c_svector) :: xh @@ -52,7 +52,7 @@ contains function psb_c_svect_zero(xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_svector) :: xh type(psb_s_vect_type), pointer :: vp @@ -73,7 +73,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: mh type(psb_sspmat_type), pointer :: ap @@ -96,7 +96,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: mh type(psb_sspmat_type), pointer :: ap @@ -119,7 +119,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res character(c_char) :: name(*) type(psb_c_sspmat) :: mh diff --git a/cbind/base/psb_s_tools_cbind_mod.F90 b/cbind/base/psb_s_tools_cbind_mod.F90 index 117b6257..30df5a6a 100644 --- a/cbind/base/psb_s_tools_cbind_mod.F90 +++ b/cbind/base/psb_s_tools_cbind_mod.F90 @@ -11,7 +11,7 @@ contains function psb_c_sgeall(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_svector) :: xh type(psb_c_descriptor) :: cdh @@ -40,7 +40,7 @@ contains function psb_c_sgeasb(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_svector) :: xh type(psb_c_descriptor) :: cdh @@ -70,7 +70,7 @@ contains function psb_c_sgefree(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_svector) :: xh type(psb_c_descriptor) :: cdh @@ -102,9 +102,9 @@ contains function psb_c_sgeins(nz,irw,val,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*) real(c_float) :: val(*) type(psb_c_svector) :: xh type(psb_c_descriptor) :: cdh @@ -143,9 +143,9 @@ contains function psb_c_sgeins_add(nz,irw,val,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*) real(c_float) :: val(*) type(psb_c_svector) :: xh type(psb_c_descriptor) :: cdh @@ -183,7 +183,7 @@ contains function psb_c_sspall(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: mh type(psb_c_descriptor) :: cdh @@ -213,7 +213,7 @@ contains function psb_c_sspasb(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: mh type(psb_c_descriptor) :: cdh @@ -242,7 +242,7 @@ contains function psb_c_sspfree(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: mh type(psb_c_descriptor) :: cdh @@ -277,8 +277,8 @@ contains use psb_s_rsb_mat_mod #endif implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: cdh, mh,upd,dupl + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: cdh, mh,upd,dupl character(c_char) :: afmt(*) integer :: info,n, fdupl character(len=5) :: fafmt @@ -313,9 +313,9 @@ contains function psb_c_sspins(nz,irw,icl,val,mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*), icl(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*), icl(*) real(c_float) :: val(*) type(psb_c_sspmat) :: mh type(psb_c_descriptor) :: cdh @@ -350,7 +350,7 @@ contains function psb_c_ssprn(mh,cdh,clear) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res logical(c_bool), value :: clear type(psb_c_sspmat) :: mh type(psb_c_descriptor) :: cdh @@ -382,8 +382,8 @@ contains !!$ function psb_c_sspprint(mh) bind(c) result(res) !!$ !!$ implicit none -!!$ integer(psb_c_int) :: res -!!$ integer(psb_c_int), value :: mh +!!$ integer(psb_c_ipk) :: res +!!$ integer(psb_c_ipk), value :: mh !!$ integer :: info !!$ !!$ diff --git a/cbind/base/psb_z_comm_cbind_mod.f90 b/cbind/base/psb_z_comm_cbind_mod.f90 index 865e56ee..49d9df82 100644 --- a/cbind/base/psb_z_comm_cbind_mod.f90 +++ b/cbind/base/psb_z_comm_cbind_mod.f90 @@ -8,7 +8,7 @@ contains function psb_c_z_ovrl(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zvector) :: xh type(psb_c_descriptor) :: cdh @@ -39,8 +39,8 @@ contains function psb_c_z_ovrl_opt(xh,cdh,update,mode) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: update, mode + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: update, mode type(psb_c_zvector) :: xh type(psb_c_descriptor) :: cdh @@ -72,7 +72,7 @@ contains function psb_c_z_halo(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zvector) :: xh type(psb_c_descriptor) :: cdh @@ -103,8 +103,8 @@ contains function psb_c_z_halo_opt(xh,cdh,tran,data,mode) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: data, mode + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: data, mode character(c_char) :: tran @@ -141,8 +141,8 @@ contains function psb_c_z_vscatter(ng,gx,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: ng + integer(psb_c_ipk) :: res + integer(psb_c_lpk), value :: ng complex(c_double_complex), target :: gx(*) type(psb_c_zvector) :: xh type(psb_c_descriptor) :: cdh @@ -175,7 +175,7 @@ contains function psb_c_zvgather(v,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res complex(c_double_complex), target :: v(*) type(psb_c_zvector) :: xh type(psb_c_descriptor) :: cdh @@ -208,7 +208,7 @@ contains function psb_c_zspgather(gah,ah,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: ah, gah type(psb_c_descriptor) :: cdh diff --git a/cbind/base/psb_z_psblas_cbind_mod.f90 b/cbind/base/psb_z_psblas_cbind_mod.f90 index 0a3cad53..e367e741 100644 --- a/cbind/base/psb_z_psblas_cbind_mod.f90 +++ b/cbind/base/psb_z_psblas_cbind_mod.f90 @@ -1,14 +1,14 @@ module psb_z_psblas_cbind_mod use iso_c_binding + use psb_base_mod + use psb_objhandle_mod + use psb_base_string_cbind_mod contains function psb_c_zgeaxpby(alpha,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zvector) :: xh,yh type(psb_c_descriptor) :: cdh @@ -44,9 +44,6 @@ contains end function psb_c_zgeaxpby function psb_c_zgenrm2(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_double_complex) :: res @@ -74,9 +71,6 @@ contains end function psb_c_zgenrm2 function psb_c_zgeamax(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_double_complex) :: res @@ -103,9 +97,6 @@ contains end function psb_c_zgeamax function psb_c_zgeasum(xh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_double_complex) :: res @@ -134,9 +125,6 @@ contains function psb_c_zspnrmi(ah,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none real(c_double_complex) :: res @@ -163,9 +151,6 @@ contains end function psb_c_zspnrmi function psb_c_zgedot(xh,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none complex(c_double_complex) :: res @@ -197,11 +182,8 @@ contains function psb_c_zspmm(alpha,ah,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: ah type(psb_c_zvector) :: xh,yh @@ -242,11 +224,8 @@ contains function psb_c_zspmm_opt(alpha,ah,xh,beta,yh,cdh,trans,doswap) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: ah type(psb_c_zvector) :: xh,yh @@ -294,11 +273,8 @@ contains function psb_c_zspsm(alpha,ah,xh,beta,yh,cdh) bind(c) result(res) - use psb_base_mod - use psb_objhandle_mod - use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: ah type(psb_c_zvector) :: xh,yh diff --git a/cbind/base/psb_z_serial_cbind_mod.F90 b/cbind/base/psb_z_serial_cbind_mod.F90 index b2a3d206..dfb41a19 100644 --- a/cbind/base/psb_z_serial_cbind_mod.F90 +++ b/cbind/base/psb_z_serial_cbind_mod.F90 @@ -11,7 +11,7 @@ contains function psb_c_zvect_get_nrows(xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zvector) :: xh type(psb_z_vect_type), pointer :: vp @@ -29,7 +29,7 @@ contains function psb_c_zvect_f_get_cpy(v,xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res complex(c_double_complex) :: v(*) type(psb_c_zvector) :: xh @@ -52,7 +52,7 @@ contains function psb_c_zvect_zero(xh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zvector) :: xh type(psb_z_vect_type), pointer :: vp @@ -73,7 +73,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: mh type(psb_zspmat_type), pointer :: ap @@ -96,7 +96,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: mh type(psb_zspmat_type), pointer :: ap @@ -119,7 +119,7 @@ contains use psb_objhandle_mod use psb_base_string_cbind_mod implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res character(c_char) :: name(*) type(psb_c_zspmat) :: mh diff --git a/cbind/base/psb_z_tools_cbind_mod.F90 b/cbind/base/psb_z_tools_cbind_mod.F90 index 4d293fab..e1533696 100644 --- a/cbind/base/psb_z_tools_cbind_mod.F90 +++ b/cbind/base/psb_z_tools_cbind_mod.F90 @@ -11,7 +11,7 @@ contains function psb_c_zgeall(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zvector) :: xh type(psb_c_descriptor) :: cdh @@ -40,7 +40,7 @@ contains function psb_c_zgeasb(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zvector) :: xh type(psb_c_descriptor) :: cdh @@ -70,7 +70,7 @@ contains function psb_c_zgefree(xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zvector) :: xh type(psb_c_descriptor) :: cdh @@ -102,9 +102,9 @@ contains function psb_c_zgeins(nz,irw,val,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*) complex(c_double_complex) :: val(*) type(psb_c_zvector) :: xh type(psb_c_descriptor) :: cdh @@ -143,9 +143,9 @@ contains function psb_c_zgeins_add(nz,irw,val,xh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*) complex(c_double_complex) :: val(*) type(psb_c_zvector) :: xh type(psb_c_descriptor) :: cdh @@ -183,7 +183,7 @@ contains function psb_c_zspall(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: mh type(psb_c_descriptor) :: cdh @@ -213,7 +213,7 @@ contains function psb_c_zspasb(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: mh type(psb_c_descriptor) :: cdh @@ -242,7 +242,7 @@ contains function psb_c_zspfree(mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: mh type(psb_c_descriptor) :: cdh @@ -277,8 +277,8 @@ contains use psb_z_rsb_mat_mod #endif implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: cdh, mh,upd,dupl + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: cdh, mh,upd,dupl character(c_char) :: afmt(*) integer :: info,n, fdupl character(len=5) :: fafmt @@ -313,9 +313,9 @@ contains function psb_c_zspins(nz,irw,icl,val,mh,cdh) bind(c) result(res) implicit none - integer(psb_c_int) :: res - integer(psb_c_int), value :: nz - integer(psb_c_int) :: irw(*), icl(*) + integer(psb_c_ipk) :: res + integer(psb_c_ipk), value :: nz + integer(psb_c_lpk) :: irw(*), icl(*) complex(c_double_complex) :: val(*) type(psb_c_zspmat) :: mh type(psb_c_descriptor) :: cdh @@ -350,7 +350,7 @@ contains function psb_c_zsprn(mh,cdh,clear) bind(c) result(res) implicit none - integer(psb_c_int) :: res + integer(psb_c_ipk) :: res logical(c_bool), value :: clear type(psb_c_zspmat) :: mh type(psb_c_descriptor) :: cdh @@ -382,8 +382,8 @@ contains !!$ function psb_c_zspprint(mh) bind(c) result(res) !!$ !!$ implicit none -!!$ integer(psb_c_int) :: res -!!$ integer(psb_c_int), value :: mh +!!$ integer(psb_c_ipk) :: res +!!$ integer(psb_c_ipk), value :: mh !!$ integer :: info !!$ !!$ diff --git a/cbind/krylov/psb_base_krylov_cbind_mod.f90 b/cbind/krylov/psb_base_krylov_cbind_mod.f90 index 5f322fbc..8662ba92 100644 --- a/cbind/krylov/psb_base_krylov_cbind_mod.f90 +++ b/cbind/krylov/psb_base_krylov_cbind_mod.f90 @@ -1,8 +1,10 @@ module psb_base_krylov_cbind_mod use iso_c_binding + use psb_objhandle_mod + type, bind(c) :: solveroptions - integer(c_int) :: iter, itmax, itrace, irst, istop + integer(psb_c_ipk) :: iter, itmax, itrace, irst, istop real(c_double) :: eps, err end type solveroptions @@ -12,7 +14,7 @@ contains & bind(c,name='psb_c_DefaultSolverOptions') result(res) implicit none type(solveroptions) :: options - integer(c_int) :: res + integer(psb_c_ipk) :: res options%itmax = 1000 options%itrace = 0 diff --git a/cbind/krylov/psb_ckrylov_cbind_mod.f90 b/cbind/krylov/psb_ckrylov_cbind_mod.f90 index cba8ccc9..651ecadb 100644 --- a/cbind/krylov/psb_ckrylov_cbind_mod.f90 +++ b/cbind/krylov/psb_ckrylov_cbind_mod.f90 @@ -38,14 +38,14 @@ contains use psb_prec_cbind_mod use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: ah type(psb_c_descriptor) :: cdh type(psb_c_cprec) :: ph type(psb_c_cvector) :: bh,xh - integer(c_int), value :: itmax,itrace,irst,istop + integer(psb_c_ipk), value :: itmax,itrace,irst,istop real(c_double), value :: eps - integer(c_int) :: iter + integer(psb_c_ipk) :: iter real(c_double) :: err character(c_char) :: methd(*) type(solveroptions) :: options diff --git a/cbind/krylov/psb_dkrylov_cbind_mod.f90 b/cbind/krylov/psb_dkrylov_cbind_mod.f90 index 55fc0366..a656fba8 100644 --- a/cbind/krylov/psb_dkrylov_cbind_mod.f90 +++ b/cbind/krylov/psb_dkrylov_cbind_mod.f90 @@ -21,7 +21,6 @@ contains character(c_char) :: methd(*) type(solveroptions) :: options - write(0,*) 'psb_c_dkrylov options ', options%eps res= psb_c_dkrylov_opt(methd, ah, ph, bh, xh, options%eps,cdh, & & itmax=options%itmax, iter=options%iter,& & itrace=options%itrace, istop=options%istop,& @@ -39,14 +38,14 @@ contains use psb_prec_cbind_mod use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: ah type(psb_c_descriptor) :: cdh type(psb_c_dprec) :: ph type(psb_c_dvector) :: bh,xh - integer(c_int), value :: itmax,itrace,irst,istop + integer(psb_c_ipk), value :: itmax,itrace,irst,istop real(c_double), value :: eps - integer(c_int) :: iter + integer(psb_c_ipk) :: iter real(c_double) :: err character(c_char) :: methd(*) type(solveroptions) :: options @@ -59,7 +58,6 @@ contains character(len=20) :: fmethd real(psb_dpk_) :: feps,ferr - write(0,*) 'psb_c_dkrylov_opt options ', eps res = -1 if (c_associated(cdh%item)) then call c_f_pointer(cdh%item,descp) diff --git a/cbind/krylov/psb_skrylov_cbind_mod.f90 b/cbind/krylov/psb_skrylov_cbind_mod.f90 index c2856567..a3d4ff50 100644 --- a/cbind/krylov/psb_skrylov_cbind_mod.f90 +++ b/cbind/krylov/psb_skrylov_cbind_mod.f90 @@ -38,14 +38,14 @@ contains use psb_prec_cbind_mod use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: ah type(psb_c_descriptor) :: cdh type(psb_c_sprec) :: ph type(psb_c_svector) :: bh,xh - integer(c_int), value :: itmax,itrace,irst,istop + integer(psb_c_ipk), value :: itmax,itrace,irst,istop real(c_double), value :: eps - integer(c_int) :: iter + integer(psb_c_ipk) :: iter real(c_double) :: err character(c_char) :: methd(*) type(solveroptions) :: options diff --git a/cbind/krylov/psb_zkrylov_cbind_mod.f90 b/cbind/krylov/psb_zkrylov_cbind_mod.f90 index ae1931ec..8b3c0797 100644 --- a/cbind/krylov/psb_zkrylov_cbind_mod.f90 +++ b/cbind/krylov/psb_zkrylov_cbind_mod.f90 @@ -38,14 +38,14 @@ contains use psb_prec_cbind_mod use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: ah type(psb_c_descriptor) :: cdh type(psb_c_zprec) :: ph type(psb_c_zvector) :: bh,xh - integer(c_int), value :: itmax,itrace,irst,istop + integer(psb_c_ipk), value :: itmax,itrace,irst,istop real(c_double), value :: eps - integer(c_int) :: iter + integer(psb_c_ipk) :: iter real(c_double) :: err character(c_char) :: methd(*) type(solveroptions) :: options diff --git a/cbind/prec/psb_cprec_cbind_mod.f90 b/cbind/prec/psb_cprec_cbind_mod.f90 index 7f827b55..b33e665f 100644 --- a/cbind/prec/psb_cprec_cbind_mod.f90 +++ b/cbind/prec/psb_cprec_cbind_mod.f90 @@ -18,7 +18,7 @@ contains use psb_prec_mod use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cprec) :: ph character(c_char) :: ptype(*) type(psb_cprec_type), pointer :: precp @@ -51,7 +51,7 @@ contains use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cspmat) :: ah type(psb_c_cprec) :: ph type(psb_c_descriptor) :: cdh @@ -94,7 +94,7 @@ contains use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_cprec) :: ph type(psb_cprec_type), pointer :: precp diff --git a/cbind/prec/psb_dprec_cbind_mod.f90 b/cbind/prec/psb_dprec_cbind_mod.f90 index 1e756d11..21d28098 100644 --- a/cbind/prec/psb_dprec_cbind_mod.f90 +++ b/cbind/prec/psb_dprec_cbind_mod.f90 @@ -18,7 +18,7 @@ contains use psb_prec_mod use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dprec) :: ph character(c_char) :: ptype(*) type(psb_dprec_type), pointer :: precp @@ -51,7 +51,7 @@ contains use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dspmat) :: ah type(psb_c_dprec) :: ph type(psb_c_descriptor) :: cdh @@ -94,7 +94,7 @@ contains use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_dprec) :: ph type(psb_dprec_type), pointer :: precp diff --git a/cbind/prec/psb_sprec_cbind_mod.f90 b/cbind/prec/psb_sprec_cbind_mod.f90 index 1578eeba..bdfc3938 100644 --- a/cbind/prec/psb_sprec_cbind_mod.f90 +++ b/cbind/prec/psb_sprec_cbind_mod.f90 @@ -18,7 +18,7 @@ contains use psb_prec_mod use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sprec) :: ph character(c_char) :: ptype(*) type(psb_sprec_type), pointer :: precp @@ -51,7 +51,7 @@ contains use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sspmat) :: ah type(psb_c_sprec) :: ph type(psb_c_descriptor) :: cdh @@ -94,7 +94,7 @@ contains use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_sprec) :: ph type(psb_sprec_type), pointer :: precp diff --git a/cbind/prec/psb_zprec_cbind_mod.f90 b/cbind/prec/psb_zprec_cbind_mod.f90 index c662e21c..9ee230e2 100644 --- a/cbind/prec/psb_zprec_cbind_mod.f90 +++ b/cbind/prec/psb_zprec_cbind_mod.f90 @@ -18,7 +18,7 @@ contains use psb_prec_mod use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zprec) :: ph character(c_char) :: ptype(*) type(psb_zprec_type), pointer :: precp @@ -51,7 +51,7 @@ contains use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zspmat) :: ah type(psb_c_zprec) :: ph type(psb_c_descriptor) :: cdh @@ -94,7 +94,7 @@ contains use psb_base_string_cbind_mod implicit none - integer(c_int) :: res + integer(psb_c_ipk) :: res type(psb_c_zprec) :: ph type(psb_zprec_type), pointer :: precp