psblas3: test/newfmts

Changed create_matrix to get a MOLD argument.
psblas3-type-indexed
Salvatore Filippone 14 years ago
parent c8fe049994
commit 66bbb878d7

@ -121,7 +121,7 @@ program ppde
! !
call psb_barrier(ictxt) call psb_barrier(ictxt)
t1 = psb_wtime() t1 = psb_wtime()
call create_matrix(idim,a,b,x,desc_a,ictxt,afmt,info) call create_matrix(idim,a,b,x,desc_a,ictxt,afmt,info,mold=aell)
call psb_barrier(ictxt) call psb_barrier(ictxt)
t2 = psb_wtime() - t1 t2 = psb_wtime() - t1
if(info /= psb_success_) then if(info /= psb_success_) then
@ -324,7 +324,7 @@ contains
! subroutine to allocate and fill in the coefficient matrix and ! subroutine to allocate and fill in the coefficient matrix and
! the rhs. ! the rhs.
! !
subroutine create_matrix(idim,a,b,xv,desc_a,ictxt,afmt,info) subroutine create_matrix(idim,a,b,xv,desc_a,ictxt,afmt,info,mold)
! !
! discretize the partial diferential equation ! discretize the partial diferential equation
! !
@ -351,10 +351,8 @@ contains
integer :: ictxt, info integer :: ictxt, info
character :: afmt*5 character :: afmt*5
type(psb_dspmat_type) :: a type(psb_dspmat_type) :: a
type(psb_d_csc_sparse_mat) :: acsc class(psb_d_base_sparse_mat), optional :: mold
type(psb_d_coo_sparse_mat) :: acoo ! Local
type(psb_d_csr_sparse_mat) :: acsr
type(psb_d_ell_sparse_mat) :: aell
real(psb_dpk_) :: zt(nb),x,y,z real(psb_dpk_) :: zt(nb),x,y,z
integer :: m,n,nnz,glob_row,nlr,i,ii,ib,k integer :: m,n,nnz,glob_row,nlr,i,ii,ib,k
integer :: ix,iy,iz,ia,indx_owner integer :: ix,iy,iz,ia,indx_owner
@ -573,10 +571,13 @@ contains
call psb_barrier(ictxt) call psb_barrier(ictxt)
t1 = psb_wtime() t1 = psb_wtime()
call psb_cdasb(desc_a,info) call psb_cdasb(desc_a,info)
if (present(mold)) then
if (info == psb_success_) &
& call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,mold=mold)
else
if (info == psb_success_) & if (info == psb_success_) &
& call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,mold=aell) & call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=afmt)
!!$ if (info == psb_success_) & end if
!!$ & call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=afmt)
call psb_barrier(ictxt) call psb_barrier(ictxt)
if(info /= psb_success_) then if(info /= psb_success_) then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_

Loading…
Cancel
Save