Merge branch 'development' of https://github.com/sfilippone/psblas3 into development

sphalo-a2av
Salvatore Filippone 6 years ago
commit 36c0a275e9

@ -18,7 +18,10 @@ ZFOBJS=getp.o psb_zf_sample.o
EXEDIR=./runs EXEDIR=./runs
all: psb_sf_sample psb_df_sample psb_cf_sample psb_zf_sample all: runsd psb_sf_sample psb_df_sample psb_cf_sample psb_zf_sample
runsd:
(if test ! -d runs ; then mkdir runs; fi)
psb_sf_sample.o psb_df_sample.o psb_cf_sample.o psb_zf_sample.o: getp.o psb_sf_sample.o psb_df_sample.o psb_cf_sample.o psb_zf_sample.o: getp.o

@ -1,10 +1,10 @@
BASEDIR=../.. INSTALLDIR=../..
INCDIR=$(BASEDIR)/include INCDIR=$(INSTALLDIR)/include
MODDIR=$(INSTALLDIR)/modules/ MODDIR=$(INSTALLDIR)/modules/
include $(INCDIR)/Make.inc.psblas include $(INCDIR)/Make.inc.psblas
# #
# Libraries used # Libraries used
LIBDIR=$(BASEDIR)/lib LIBDIR=$(INSTALLDIR)/lib
PSBLAS_LIB= -L$(LIBDIR) -lpsb_util -lpsb_krylov -lpsb_prec -lpsb_base PSBLAS_LIB= -L$(LIBDIR) -lpsb_util -lpsb_krylov -lpsb_prec -lpsb_base
LDLIBS=$(PSBLDLIBS) LDLIBS=$(PSBLDLIBS)
# #
@ -16,7 +16,10 @@ FINCLUDES=$(FMFLAG)$(MODDIR) $(FMFLAG).
EXEDIR=./runs EXEDIR=./runs
all: hello pingpong all: runsd hello pingpong
runsd:
(if test ! -d runs ; then mkdir runs; fi)
hello: hello.o hello: hello.o
$(FLINK) hello.o -o hello $(PSBLAS_LIB) $(LDLIBS) $(FLINK) hello.o -o hello $(PSBLAS_LIB) $(LDLIBS)

@ -17,8 +17,10 @@ STOBJS=s_file_spmv.o
DPGOBJS=pdgenspmv.o DPGOBJS=pdgenspmv.o
EXEDIR=./runs EXEDIR=./runs
all: d_file_spmv s_file_spmv pdgenspmv all: runsd d_file_spmv s_file_spmv pdgenspmv
runsd:
(if test ! -d runs ; then mkdir runs; fi)
d_file_spmv: $(DTOBJS) d_file_spmv: $(DTOBJS)
$(FLINK) $(LOPT) $(DTOBJS) -o d_file_spmv $(PSBLAS_LIB) $(LDLIBS) $(FLINK) $(LOPT) $(DTOBJS) -o d_file_spmv $(PSBLAS_LIB) $(LDLIBS)

@ -16,7 +16,10 @@ FINCLUDES=$(FMFLAG)$(MODDIR) $(FMFLAG).
EXEDIR=./runs EXEDIR=./runs
all: psb_d_pde3d psb_s_pde3d psb_d_pde2d psb_s_pde2d all: runsd psb_d_pde3d psb_s_pde3d psb_d_pde2d psb_s_pde2d
runsd:
(if test ! -d runs ; then mkdir runs; fi)
psb_d_pde3d: psb_d_pde3d.o psb_d_pde3d: psb_d_pde3d.o
$(FLINK) psb_d_pde3d.o -o psb_d_pde3d $(PSBLAS_LIB) $(LDLIBS) $(FLINK) psb_d_pde3d.o -o psb_d_pde3d $(PSBLAS_LIB) $(LDLIBS)

@ -15,7 +15,10 @@ FINCLUDES=$(FMFLAG)$(MODDIR) $(FMFLAG).
EXEDIR=./runs EXEDIR=./runs
all: d_matgen all: runsd d_matgen
runsd:
(if test ! -d runs ; then mkdir runs; fi)
psb_d_xyz_impl.o d_matgen.o: psb_d_xyz_mat_mod.o psb_d_xyz_impl.o d_matgen.o: psb_d_xyz_mat_mod.o

@ -414,7 +414,7 @@ program d_matgen
! !
call psb_barrier(ictxt) call psb_barrier(ictxt)
t1 = psb_wtime() t1 = psb_wtime()
if (.true.) then if (.false.) then
call psb_gen_pde3d(ictxt,idim,a,b,x,desc_a,afmt,& call psb_gen_pde3d(ictxt,idim,a,b,x,desc_a,afmt,&
& a1,a2,a3,b1,b2,b3,c,g,info,amold=acsr) & a1,a2,a3,b1,b2,b3,c,g,info,amold=acsr)
else if (.false.) then else if (.false.) then

@ -2008,7 +2008,7 @@ end subroutine psb_d_xyz_csgetptn
subroutine psb_d_xyz_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_xyz_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -2026,9 +2026,9 @@ subroutine psb_d_xyz_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_, chksz_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -2073,13 +2073,18 @@ subroutine psb_d_xyz_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
else else
cscale_ = .false. cscale_ = .false.
endif endif
if (present(chksz)) then
chksz_ = chksz
else
chksz_ = .true.
endif
if ((rscale_.or.cscale_).and.(present(iren))) then if ((rscale_.or.cscale_).and.(present(iren))) then
info = psb_err_many_optional_arg_ info = psb_err_many_optional_arg_
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)') call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
goto 9999 goto 9999
end if end if
call xyz_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,& call xyz_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
& iren) & iren)
if (rscale_) then if (rscale_) then
@ -2103,7 +2108,7 @@ subroutine psb_d_xyz_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
contains contains
subroutine xyz_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,& subroutine xyz_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
& iren) & iren)
use psb_const_mod use psb_const_mod
@ -2118,7 +2123,7 @@ contains
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
real(psb_dpk_), allocatable, intent(inout) :: val(:) real(psb_dpk_), allocatable, intent(inout) :: val(:)
integer(psb_ipk_), intent(in) :: nzin integer(psb_ipk_), intent(in) :: nzin
logical, intent(in) :: append logical, intent(in) :: append, chksz
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
integer(psb_ipk_), optional :: iren(:) integer(psb_ipk_), optional :: iren(:)
integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw
@ -2146,11 +2151,12 @@ contains
nz = 0 nz = 0
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
do i=irw, lrw do i=irw, lrw

@ -59,6 +59,7 @@ module psb_d_xyz_mat_mod
real(psb_dpk_), allocatable :: val(:) real(psb_dpk_), allocatable :: val(:)
contains contains
procedure, pass(a) :: is_by_rows => d_xyz_is_by_rows
procedure, pass(a) :: get_size => d_xyz_get_size procedure, pass(a) :: get_size => d_xyz_get_size
procedure, pass(a) :: get_nzeros => d_xyz_get_nzeros procedure, pass(a) :: get_nzeros => d_xyz_get_nzeros
procedure, nopass :: get_fmt => d_xyz_get_fmt procedure, nopass :: get_fmt => d_xyz_get_fmt
@ -313,7 +314,7 @@ module psb_d_xyz_mat_mod
!! \see psb_d_base_mat_mod::psb_d_base_csgetrow !! \see psb_d_base_mat_mod::psb_d_base_csgetrow
interface interface
subroutine psb_d_xyz_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_xyz_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_d_xyz_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_xyz_sparse_mat, psb_dpk_
class(psb_d_xyz_sparse_mat), intent(in) :: a class(psb_d_xyz_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -324,7 +325,7 @@ module psb_d_xyz_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_d_xyz_csgetrow end subroutine psb_d_xyz_csgetrow
end interface end interface
@ -518,6 +519,15 @@ contains
! == =================================== ! == ===================================
function d_xyz_is_by_rows(a) result(res)
implicit none
class(psb_d_xyz_sparse_mat), intent(in) :: a
logical :: res
res = .true.
end function d_xyz_is_by_rows
function d_xyz_sizeof(a) result(res) function d_xyz_sizeof(a) result(res)
implicit none implicit none
class(psb_d_xyz_sparse_mat), intent(in) :: a class(psb_d_xyz_sparse_mat), intent(in) :: a

@ -1,8 +1,8 @@
BASEDIR=../.. INSTALLDIR=../..
INCDIR=$(BASEDIR)/include/ INCDIR=$(INSTALLDIR)/include/
MODDIR=$(INSTALLDIR)/modules/ MODDIR=$(INSTALLDIR)/modules/
include $(INCDIR)/Make.inc.psblas include $(INCDIR)/Make.inc.psblas
LIBDIR=$(BASEDIR)/lib/ LIBDIR=$(INSTALLDIR)/lib/
PSBLAS_LIB= -L$(LIBDIR) -lpsb_util -lpsb_krylov -lpsb_prec -lpsb_base PSBLAS_LIB= -L$(LIBDIR) -lpsb_util -lpsb_krylov -lpsb_prec -lpsb_base
LDLIBS=$(PSBLDLIBS) LDLIBS=$(PSBLDLIBS)
CCOPT= -g CCOPT= -g
@ -14,7 +14,11 @@ PSBTOBJS=psbtf.o psb_mvsv_tester.o \
EXEDIR=./runs EXEDIR=./runs
all: psbtf all: runsd psbtf
runsd:
(if test ! -d runs ; then mkdir runs; fi)
psbtf.o: psb_mvsv_tester.o psbtf.o: psb_mvsv_tester.o
psb_mvsv_tester.o: psb_s_mvsv_tester.o psb_d_mvsv_tester.o psb_c_mvsv_tester.o \ psb_mvsv_tester.o: psb_s_mvsv_tester.o psb_d_mvsv_tester.o psb_c_mvsv_tester.o \
psb_z_mvsv_tester.o psb_z_mvsv_tester.o

@ -1,11 +1,11 @@
BASEDIR=../.. INSTALLDIR=../..
INCDIR=$(BASEDIR)/include/ INCDIR=$(INSTALLDIR)/include/
MODDIR=$(INSTALLDIR)/modules/ MODDIR=$(INSTALLDIR)/modules/
include $(INCDIR)/Make.inc.psblas include $(INCDIR)/Make.inc.psblas
# #
# Libraries used # Libraries used
# #
LIBDIR=$(BASEDIR)/lib/ LIBDIR=$(INSTALLDIR)/lib/
PSBLAS_LIB= -L$(LIBDIR) -lpsb_util -lpsb_krylov -lpsb_prec -lpsb_base PSBLAS_LIB= -L$(LIBDIR) -lpsb_util -lpsb_krylov -lpsb_prec -lpsb_base
LDLIBS=$(PSBLDLIBS) LDLIBS=$(PSBLDLIBS)

Loading…
Cancel
Save