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
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

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

@ -17,8 +17,10 @@ STOBJS=s_file_spmv.o
DPGOBJS=pdgenspmv.o
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)
$(FLINK) $(LOPT) $(DTOBJS) -o d_file_spmv $(PSBLAS_LIB) $(LDLIBS)

@ -16,7 +16,10 @@ FINCLUDES=$(FMFLAG)$(MODDIR) $(FMFLAG).
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
$(FLINK) psb_d_pde3d.o -o psb_d_pde3d $(PSBLAS_LIB) $(LDLIBS)

@ -15,7 +15,10 @@ FINCLUDES=$(FMFLAG)$(MODDIR) $(FMFLAG).
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

@ -414,7 +414,7 @@ program d_matgen
!
call psb_barrier(ictxt)
t1 = psb_wtime()
if (.true.) then
if (.false.) then
call psb_gen_pde3d(ictxt,idim,a,b,x,desc_a,afmt,&
& a1,a2,a3,b1,b2,b3,c,g,info,amold=acsr)
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,&
& jmin,jmax,iren,append,nzin,rscale,cscale)
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format
use psb_error_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
integer(psb_ipk_), intent(in), optional :: iren(:)
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_) :: ierr(5)
character(len=20) :: name='csget'
@ -2073,13 +2073,18 @@ subroutine psb_d_xyz_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
else
cscale_ = .false.
endif
if (present(chksz)) then
chksz_ = chksz
else
chksz_ = .true.
endif
if ((rscale_.or.cscale_).and.(present(iren))) then
info = psb_err_many_optional_arg_
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
goto 9999
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)
if (rscale_) then
@ -2103,7 +2108,7 @@ subroutine psb_d_xyz_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
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)
use psb_const_mod
@ -2118,7 +2123,7 @@ contains
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
real(psb_dpk_), allocatable, intent(inout) :: val(:)
integer(psb_ipk_), intent(in) :: nzin
logical, intent(in) :: append
logical, intent(in) :: append, chksz
integer(psb_ipk_) :: info
integer(psb_ipk_), optional :: iren(:)
integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw
@ -2146,11 +2151,12 @@ contains
nz = 0
call psb_ensure_size(nzin_+nzt,ia,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 (chksz) then
call psb_ensure_size(nzin_+nzt,ia,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
end if
if (present(iren)) then
do i=irw, lrw

@ -59,6 +59,7 @@ module psb_d_xyz_mat_mod
real(psb_dpk_), allocatable :: val(:)
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_nzeros => d_xyz_get_nzeros
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
interface
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_
class(psb_d_xyz_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax
@ -324,7 +325,7 @@ module psb_d_xyz_mat_mod
logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:)
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 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)
implicit none
class(psb_d_xyz_sparse_mat), intent(in) :: a

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

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

Loading…
Cancel
Save