diff --git a/cbind/Makefile b/cbind/Makefile index 85a09130..e4baf011 100644 --- a/cbind/Makefile +++ b/cbind/Makefile @@ -13,7 +13,7 @@ lib: based precd based: cd base && $(MAKE) lib LIBNAME=$(LIBNAME) -precd: +precd: based cd prec && $(MAKE) lib LIBNAME=$(LIBNAME) diff --git a/cbind/base/Makefile b/cbind/base/Makefile index 342697ae..ee9b7dcc 100644 --- a/cbind/base/Makefile +++ b/cbind/base/Makefile @@ -52,7 +52,7 @@ psb_base_cbind_mod.o: psb_cpenv_mod.o psb_objhandle_mod.o psb_base_tools_cbind_m psb_s_comm_cbind_mod.o psb_d_comm_cbind_mod.o \ psb_c_comm_cbind_mod.o psb_z_comm_cbind_mod.o -psb_base_tools_cbind_mod.o: psb_objhandle_mod.o psb_base_string_cbind_mod.o +psb_base_tools_cbind_mod.o: psb_cpenv_mod.o psb_objhandle_mod.o psb_base_string_cbind_mod.o psb_s_tools_cbind_mod.o psb_s_serial_cbind_mod.o \ psb_d_tools_cbind_mod.o psb_d_serial_cbind_mod.o \ diff --git a/cbind/base/psb_c_serial_cbind_mod.F90 b/cbind/base/psb_c_serial_cbind_mod.F90 index 8d2eac5a..b91aa34c 100644 --- a/cbind/base/psb_c_serial_cbind_mod.F90 +++ b/cbind/base/psb_c_serial_cbind_mod.F90 @@ -113,7 +113,32 @@ contains end function psb_c_cmat_get_ncols + + function psb_c_cmat_name_print(mh,name) 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 + + character(c_char) :: name(*) + type(psb_c_cspmat) :: mh + type(psb_cspmat_type), pointer :: ap + integer :: info + character(1024) :: fname + res = 0 + if (c_associated(mh%item)) then + call c_f_pointer(mh%item,ap) + else + return + end if + call stringc2f(name,fname) + + call ap%print(fname,head='PSBLAS Cbinding Interface') + + end function psb_c_cmat_name_print + end module psb_c_serial_cbind_mod diff --git a/cbind/base/psb_d_serial_cbind_mod.F90 b/cbind/base/psb_d_serial_cbind_mod.F90 index 9b14b898..4f0a6bce 100644 --- a/cbind/base/psb_d_serial_cbind_mod.F90 +++ b/cbind/base/psb_d_serial_cbind_mod.F90 @@ -113,7 +113,32 @@ contains end function psb_c_dmat_get_ncols + + function psb_c_dmat_name_print(mh,name) 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 + + character(c_char) :: name(*) + type(psb_c_dspmat) :: mh + type(psb_dspmat_type), pointer :: ap + integer :: info + character(1024) :: fname + res = 0 + if (c_associated(mh%item)) then + call c_f_pointer(mh%item,ap) + else + return + end if + call stringc2f(name,fname) + + call ap%print(fname,head='PSBLAS Cbinding Interface') + + end function psb_c_dmat_name_print + end module psb_d_serial_cbind_mod diff --git a/cbind/base/psb_s_serial_cbind_mod.F90 b/cbind/base/psb_s_serial_cbind_mod.F90 index b2bc5f6a..dedaab92 100644 --- a/cbind/base/psb_s_serial_cbind_mod.F90 +++ b/cbind/base/psb_s_serial_cbind_mod.F90 @@ -113,7 +113,32 @@ contains end function psb_c_smat_get_ncols + + function psb_c_smat_name_print(mh,name) 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 + + character(c_char) :: name(*) + type(psb_c_sspmat) :: mh + type(psb_sspmat_type), pointer :: ap + integer :: info + character(1024) :: fname + res = 0 + if (c_associated(mh%item)) then + call c_f_pointer(mh%item,ap) + else + return + end if + call stringc2f(name,fname) + + call ap%print(fname,head='PSBLAS Cbinding Interface') + + end function psb_c_smat_name_print + end module psb_s_serial_cbind_mod diff --git a/cbind/base/psb_z_serial_cbind_mod.F90 b/cbind/base/psb_z_serial_cbind_mod.F90 index ef6285bf..b2a3d206 100644 --- a/cbind/base/psb_z_serial_cbind_mod.F90 +++ b/cbind/base/psb_z_serial_cbind_mod.F90 @@ -113,7 +113,32 @@ contains end function psb_c_zmat_get_ncols + + function psb_c_zmat_name_print(mh,name) 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 + + character(c_char) :: name(*) + type(psb_c_zspmat) :: mh + type(psb_zspmat_type), pointer :: ap + integer :: info + character(1024) :: fname + res = 0 + if (c_associated(mh%item)) then + call c_f_pointer(mh%item,ap) + else + return + end if + call stringc2f(name,fname) + + call ap%print(fname,head='PSBLAS Cbinding Interface') + + end function psb_c_zmat_name_print + end module psb_z_serial_cbind_mod diff --git a/cbind/test/pargen/ppdec.c b/cbind/test/pargen/ppdec.c index 5573625a..fc972231 100644 --- a/cbind/test/pargen/ppdec.c +++ b/cbind/test/pargen/ppdec.c @@ -214,7 +214,10 @@ int matgen(int ictxt, int ng,int idim,int vg[],psb_c_dspmat *ah,psb_c_descriptor icol[el]=(x)*idim*idim+(y-1)*idim+(z); el=el+1; } - for (i=0; i