*** empty log message ***

psblas3-type-indexed
Salvatore Filippone 19 years ago
parent f6ea0ade44
commit f678cbe25e

@ -46,7 +46,7 @@ f77d:
(cd f77; make lib) (cd f77; make lib)
clean: clean:
/bin/rm -f $(FOBJS) /bin/rm -f $(FOBJS) *$(.mod)
(cd aux; make clean) (cd aux; make clean)
(cd coo; make clean) (cd coo; make clean)
(cd csr; make clean) (cd csr; make clean)
@ -55,7 +55,7 @@ clean:
(cd f77; make clean) (cd f77; make clean)
veryclean: veryclean:
/bin/rm -f $(FOBJS) /bin/rm -f $(FOBJS) *$(.mod)
(cd aux; make veryclean) (cd aux; make veryclean)
(cd coo; make veryclean) (cd coo; make veryclean)
(cd csr; make veryclean) (cd csr; make veryclean)

@ -52,7 +52,7 @@ C .. Local Scalars ..
c .. Local Arrays .. c .. Local Arrays ..
CHARACTER*20 NAME CHARACTER*20 NAME
INTEGER INT_VAL(5) INTEGER INT_VAL(5)
logical, parameter :: debug=.false.
C .. External Subroutines .. C .. External Subroutines ..
EXTERNAL MAX_NNZERO EXTERNAL MAX_NNZERO
C .. Executable Statements .. C .. Executable Statements ..
@ -67,6 +67,8 @@ C
IP1(1) = 0 IP1(1) = 0
IP2(1) = 0 IP2(1) = 0
NNZ = IA2(M+1)-1 NNZ = IA2(M+1)-1
if (debug) write(0,*) 'CRCO: ',m,n,nnz,' : ',
+ descra,' : ',descrn
IF (LARN.LT.NNZ) THEN IF (LARN.LT.NNZ) THEN
IERROR = 60 IERROR = 60
INT_VAL(1) = 18 INT_VAL(1) = 18
@ -91,17 +93,18 @@ C
IF (DESCRA(1:1).EQ.'G') THEN IF (DESCRA(1:1).EQ.'G') THEN
C ... Construct COO Representation... C ... Construct COO Representation...
ELEM = 1 ELEM = 0
DO ROW = 1, M DO ROW = 1, M
DO J = IA2(ROW), IA2(ROW+1)-1 DO J = IA2(ROW), IA2(ROW+1)-1
ELEM = ELEM + 1
IAN1(ELEM) = ROW IAN1(ELEM) = ROW
IAN2(ELEM) = IA1(J) IAN2(ELEM) = IA1(J)
ARN(ELEM) = AR(J) ARN(ELEM) = AR(J)
ELEM = ELEM + 1
ENDDO ENDDO
ENDDO ENDDO
INFON(psb_nnz_) = IA2(M+1)-1 INFON(psb_nnz_) = elem
if (debug) write(0,*) 'CRCO endloop',m,elem
ELSE IF (DESCRA(1:1).EQ.'S' .AND. DESCRA(2:2).EQ.'U') THEN ELSE IF (DESCRA(1:1).EQ.'S' .AND. DESCRA(2:2).EQ.'U') THEN
DO 20 K = 1, M DO 20 K = 1, M

@ -127,7 +127,7 @@ subroutine psb_dcsdp(a, b,info,ifc,check,trans,unitd,upd,dupl)
goto 9999 goto 9999
end if end if
if (ifc_<1) then if (ifc_<1) then
write(0,*) 'dcsdp90 Error: invalid ifc ',ifc_ write(0,*) 'csdp90 Error: invalid ifc ',ifc_
info = -4 info = -4
call psb_errpush(info,name) call psb_errpush(info,name)
goto 9999 goto 9999
@ -219,6 +219,7 @@ subroutine psb_dcsdp(a, b,info,ifc,check,trans,unitd,upd,dupl)
b%pl(:) = 0 b%pl(:) = 0
b%pr(:) = 0 b%pr(:) = 0
b%descra = a%descra
select case (toupper(a%fida(1:3))) select case (toupper(a%fida(1:3)))
@ -283,7 +284,7 @@ subroutine psb_dcsdp(a, b,info,ifc,check,trans,unitd,upd,dupl)
end if end if
case ('COO') case ('COO')
if (debug) write(0,*) 'Calling CRCO ',a%descra
call dcrco(trans_, a%m, a%k, unitd_, d, a%descra, a%aspk,& call dcrco(trans_, a%m, a%k, unitd_, d, a%descra, a%aspk,&
& a%ia1, a%ia2, a%infoa, b%pl, b%descra, b%aspk, b%ia1,& & a%ia1, a%ia2, a%infoa, b%pl, b%descra, b%aspk, b%ia1,&
& b%ia2, b%infoa, b%pr, size(b%aspk), size(b%ia1),& & b%ia2, b%infoa, b%pr, size(b%aspk), size(b%ia1),&

@ -154,7 +154,7 @@ Subroutine psb_dfixcoo(A,INFO,idir)
case default case default
write(0,*) 'Fixcoo: unknown direction ',idir_ write(0,*) 'Fixcoo: unknown direction ',idir_
end select end select
a%infoa(psb_upd_) = psb_upd_srch_
deallocate(iaux) deallocate(iaux)
return return
end Subroutine psb_dfixcoo end Subroutine psb_dfixcoo

@ -177,6 +177,7 @@ subroutine psb_dipcoo2csc(a,info,clshr)
!!$ write(0,*) 'IPcoo2csc end loop ',i,nc,a%ia2(nc+1),nza !!$ write(0,*) 'IPcoo2csc end loop ',i,nc,a%ia2(nc+1),nza
a%fida='CSC' a%fida='CSC'
a%infoa(psb_upd_) = psb_upd_srch_
deallocate(itemp) deallocate(itemp)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -180,6 +180,7 @@ subroutine psb_dipcoo2csr(a,info,rwshr)
!!$ write(0,*) 'IPcoo2csr end loop ',i,nr,a%ia2(nr+1),nza !!$ write(0,*) 'IPcoo2csr end loop ',i,nr,a%ia2(nr+1),nza
a%fida='CSR' a%fida='CSR'
a%infoa(psb_upd_) = psb_upd_srch_
deallocate(itemp) deallocate(itemp)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -81,6 +81,8 @@ Subroutine psb_dipcsr2coo(a,info)
a%fida='COO' a%fida='COO'
a%infoa(psb_nnz_) = nza a%infoa(psb_nnz_) = nza
a%infoa(psb_srtd_) = psb_isrtdcoo_ a%infoa(psb_srtd_) = psb_isrtdcoo_
a%infoa(psb_upd_) = psb_upd_srch_
deallocate(itemp) deallocate(itemp)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -64,6 +64,7 @@ subroutine psb_dsymbmm(a,b,c)
c%m=a%m c%m=a%m
c%k=b%k c%k=b%k
c%fida='CSR' c%fida='CSR'
c%descra='GUN'
deallocate(itemp) deallocate(itemp)
return return
end subroutine psb_dsymbmm end subroutine psb_dsymbmm

@ -35,7 +35,8 @@
subroutine psb_dtransp(a,b,c,fmt) subroutine psb_dtransp(a,b,c,fmt)
use psb_spmat_type use psb_spmat_type
use psb_tools_mod use psb_tools_mod
use psb_serial_mod, only : psb_ipcoo2csr, psb_ipcsr2coo, psb_fixcoo use psb_string_mod
use psb_serial_mod, only : psb_ipcoo2csr, psb_ipcsr2coo, psb_fixcoo, psb_csdp
implicit none implicit none
type(psb_dspmat_type) :: a,b type(psb_dspmat_type) :: a,b
@ -45,25 +46,41 @@ subroutine psb_dtransp(a,b,c,fmt)
character(len=5) :: fmt_ character(len=5) :: fmt_
integer ::c_, info, nz integer ::c_, info, nz
integer, pointer :: itmp(:)=>null() integer, pointer :: itmp(:)=>null()
type(psb_dspmat_type) :: tmp
if (present(c)) then if (present(c)) then
c_=c c_=c
else else
c_=1 c_=1
endif endif
if (present(fmt)) then if (present(fmt)) then
fmt_ = fmt fmt_ = toupper(fmt)
else else
fmt_='CSR' fmt_='CSR'
endif endif
if (associated(b%aspk)) call psb_sp_free(b,info)
call psb_sp_clone(a,b,info)
if (b%fida=='CSR') then if (.true.) then
call psb_ipcsr2coo(b,info) if (associated(b%aspk)) call psb_sp_free(b,info)
else if (b%fida=='COO') then b%fida = 'COO'
! do nothing b%descra = 'GUN'
call psb_csdp(a,b,info)
!!$ write(0,*) 'Check from CSDP',b%m,b%k,b%fida,b%descra,b%infoa(psb_nnz_)
if (info /= 0) then
write(0,*) 'transp: info from CSDP ',info
return
end if
else else
write(0,*) 'Unimplemented case in TRANSP ' if (associated(b%aspk)) call psb_sp_free(b,info)
call psb_sp_clone(a,b,info)
if (b%fida=='CSR') then
call psb_ipcsr2coo(b,info)
else if (b%fida=='COO') then
! do nothing
else
write(0,*) 'Unimplemented case in TRANSP '
endif
!!$ write(0,*) 'Check from CLONE',b%m,b%k,b%fida,b%descra,b%infoa(psb_nnz_)
endif endif
!!$ nz = b%infoa(nnz_) !!$ nz = b%infoa(nnz_)
!!$ write(0,*) 'TRANSP CHECKS:',a%m,a%k,& !!$ write(0,*) 'TRANSP CHECKS:',a%m,a%k,&
@ -83,7 +100,13 @@ subroutine psb_dtransp(a,b,c,fmt)
call psb_fixcoo(b,info) call psb_fixcoo(b,info)
b%fida='COO' b%fida='COO'
else else
write(0,*) 'Unknown FMT in TRANSP : "',fmt_,'"' call psb_nullify_sp(tmp)
call psb_sp_clone(b,tmp,info)
b%fida=fmt_
call psb_csdp(tmp,b,info)
!!!!!! ADD HERE ERRPUSH!!!
call psb_sp_free(tmp,info)
endif endif
return return

@ -188,8 +188,6 @@ subroutine psb_zcsdp(a, b,info,ifc,check,trans,unitd,upd,dupl)
n_col=b%k n_col=b%k
call psb_cest(b%fida, n_row,n_col,size_req,& call psb_cest(b%fida, n_row,n_col,size_req,&
& ia1_size, ia2_size, aspk_size, upd_,info) & ia1_size, ia2_size, aspk_size, upd_,info)
!!$ write(0,*) size(b%aspk),size(b%ia1),size(b%ia2),size(b%pl),size(b%pr),&
!!$ & ia1_size, ia2_size, aspk_size,b%fida,b%m,b%k
if (info /= no_err) then if (info /= no_err) then
info=4010 info=4010
@ -221,6 +219,7 @@ subroutine psb_zcsdp(a, b,info,ifc,check,trans,unitd,upd,dupl)
b%pl(:) = 0 b%pl(:) = 0
b%pr(:) = 0 b%pr(:) = 0
b%descra = a%descra
select case (toupper(a%fida(1:3))) select case (toupper(a%fida(1:3)))
@ -248,7 +247,6 @@ subroutine psb_zcsdp(a, b,info,ifc,check,trans,unitd,upd,dupl)
!...converting to JAD !...converting to JAD
!...output matrix may not be big enough !...output matrix may not be big enough
do do
call zcrjd(trans_, a%m, a%k, unitd_, d, a%descra, a%aspk,& call zcrjd(trans_, a%m, a%k, unitd_, d, a%descra, a%aspk,&

@ -154,6 +154,7 @@ Subroutine psb_zfixcoo(A,INFO,idir)
case default case default
write(0,*) 'Fixcoo: unknown direction ',idir_ write(0,*) 'Fixcoo: unknown direction ',idir_
end select end select
a%infoa(psb_upd_) = psb_upd_srch_
deallocate(iaux) deallocate(iaux)
return return

@ -178,6 +178,7 @@ subroutine psb_zipcoo2csc(a,info,clshr)
!!$ write(0,*) 'IPcoo2csc end loop ',i,nc,a%ia2(nc+1),nza !!$ write(0,*) 'IPcoo2csc end loop ',i,nc,a%ia2(nc+1),nza
a%fida='CSC' a%fida='CSC'
a%infoa(psb_upd_) = psb_upd_srch_
deallocate(itemp) deallocate(itemp)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -180,6 +180,7 @@ subroutine psb_zipcoo2csr(a,info,rwshr)
!!$ write(0,*) 'IPcoo2csr end loop ',i,nr,a%ia2(nr+1),nza !!$ write(0,*) 'IPcoo2csr end loop ',i,nr,a%ia2(nr+1),nza
a%fida='CSR' a%fida='CSR'
a%infoa(psb_upd_) = psb_upd_srch_
deallocate(itemp) deallocate(itemp)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -81,6 +81,8 @@ Subroutine psb_zipcsr2coo(a,info)
a%fida='COO' a%fida='COO'
a%infoa(psb_nnz_) = nza a%infoa(psb_nnz_) = nza
a%infoa(psb_srtd_) = psb_isrtdcoo_ a%infoa(psb_srtd_) = psb_isrtdcoo_
a%infoa(psb_upd_) = psb_upd_srch_
deallocate(itemp) deallocate(itemp)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -64,6 +64,7 @@ subroutine psb_zsymbmm(a,b,c)
c%m=a%m c%m=a%m
c%k=b%k c%k=b%k
c%fida='CSR' c%fida='CSR'
c%descra='GUN'
deallocate(itemp) deallocate(itemp)
return return
end subroutine psb_zsymbmm end subroutine psb_zsymbmm

@ -36,7 +36,7 @@ subroutine psb_ztransc(a,b,c,fmt)
use psb_spmat_type use psb_spmat_type
use psb_tools_mod use psb_tools_mod
use psb_string_mod use psb_string_mod
use psb_serial_mod, only : psb_ipcoo2csr, psb_ipcsr2coo, psb_fixcoo use psb_serial_mod, only : psb_ipcoo2csr, psb_ipcsr2coo, psb_fixcoo, psb_csdp
implicit none implicit none
type(psb_zspmat_type) :: a,b type(psb_zspmat_type) :: a,b
@ -45,7 +45,9 @@ subroutine psb_ztransc(a,b,c,fmt)
character(len=5) :: fmt_ character(len=5) :: fmt_
integer ::c_, info, nz, i integer ::c_, info, nz, i
integer, pointer :: itmp(:) integer, pointer :: itmp(:)=>null()
type(psb_zspmat_type) :: tmp
if (present(c)) then if (present(c)) then
c_=c c_=c
else else
@ -56,15 +58,20 @@ subroutine psb_ztransc(a,b,c,fmt)
else else
fmt_='CSR' fmt_='CSR'
endif endif
if (associated(b%aspk)) call psb_sp_free(b,info) if (.true.) then
call psb_sp_clone(a,b,info) b%fida = 'COO'
call psb_csdp(a,b,info)
if (b%fida=='CSR') then
call psb_ipcsr2coo(b,info)
else if (b%fida=='COO') then
! do nothing
else else
write(0,*) 'Unimplemented case in TRANSC ' if (associated(b%aspk)) call psb_sp_free(b,info)
call psb_sp_clone(a,b,info)
if (b%fida=='CSR') then
call psb_ipcsr2coo(b,info)
else if (b%fida=='COO') then
! do nothing
else
write(0,*) 'Unimplemented case in TRANSC '
endif
endif endif
itmp => b%ia1 itmp => b%ia1
b%ia1 => b%ia2 b%ia1 => b%ia2
@ -85,7 +92,13 @@ subroutine psb_ztransc(a,b,c,fmt)
call psb_fixcoo(b,info) call psb_fixcoo(b,info)
b%fida='COO' b%fida='COO'
else else
write(0,*) 'Unknown FMT in TRANSC : "',fmt_,'"' call psb_nullify_sp(tmp)
call psb_sp_clone(b,tmp,info)
b%fida=fmt_
call psb_csdp(tmp,b,info)
!!!!!! ADD HERE ERRPUSH!!!
call psb_sp_free(tmp,info)
endif endif
return return

@ -36,7 +36,7 @@ subroutine psb_ztransp(a,b,c,fmt)
use psb_spmat_type use psb_spmat_type
use psb_tools_mod use psb_tools_mod
use psb_string_mod use psb_string_mod
use psb_serial_mod, only : psb_ipcoo2csr, psb_ipcsr2coo, psb_fixcoo use psb_serial_mod, only : psb_ipcoo2csr, psb_ipcsr2coo, psb_fixcoo, psb_csdp
implicit none implicit none
type(psb_zspmat_type) :: a,b type(psb_zspmat_type) :: a,b
@ -45,7 +45,9 @@ subroutine psb_ztransp(a,b,c,fmt)
character(len=5) :: fmt_ character(len=5) :: fmt_
integer ::c_, info, nz integer ::c_, info, nz
integer, pointer :: itmp(:) integer, pointer :: itmp(:)=>null()
type(psb_zspmat_type) :: tmp
if (present(c)) then if (present(c)) then
c_=c c_=c
else else
@ -56,15 +58,20 @@ subroutine psb_ztransp(a,b,c,fmt)
else else
fmt_='CSR' fmt_='CSR'
endif endif
if (associated(b%aspk)) call psb_sp_free(b,info) if (.true.) then
call psb_sp_clone(a,b,info) b%fida = 'COO'
call psb_csdp(a,b,info)
if (b%fida=='CSR') then
call psb_ipcsr2coo(b,info)
else if (b%fida=='COO') then
! do nothing
else else
write(0,*) 'Unimplemented case in TRANSP ' if (associated(b%aspk)) call psb_sp_free(b,info)
call psb_sp_clone(a,b,info)
if (b%fida=='CSR') then
call psb_ipcsr2coo(b,info)
else if (b%fida=='COO') then
! do nothing
else
write(0,*) 'Unimplemented case in TRANSP '
endif
endif endif
!!$ nz = b%infoa(nnz_) !!$ nz = b%infoa(nnz_)
!!$ write(0,*) 'TRANSP CHECKS:',a%m,a%k,& !!$ write(0,*) 'TRANSP CHECKS:',a%m,a%k,&
@ -84,7 +91,13 @@ subroutine psb_ztransp(a,b,c,fmt)
call psb_fixcoo(b,info) call psb_fixcoo(b,info)
b%fida='COO' b%fida='COO'
else else
write(0,*) 'Unknown FMT in TRANSP : "',fmt_,'"' call psb_nullify_sp(tmp)
call psb_sp_clone(b,tmp,info)
b%fida=fmt_
call psb_csdp(tmp,b,info)
!!!!!! ADD HERE ERRPUSH!!!
call psb_sp_free(tmp,info)
endif endif
return return

@ -63,7 +63,7 @@ Subroutine psb_dsphalo(a,desc_a,blk,info,rwcnv,clcnv,outfmt)
integer, intent(out) :: info integer, intent(out) :: info
logical, optional, intent(in) :: rwcnv,clcnv logical, optional, intent(in) :: rwcnv,clcnv
character(len=5), optional :: outfmt character(len=5), optional :: outfmt
!c ...local scalars.... ! ...local scalars....
Integer :: nprow,npcol,me,mycol,counter,proc,n,i,& Integer :: nprow,npcol,me,mycol,counter,proc,n,i,&
& n_el_send,k,n_el_recv,icontxt, idx, r, tot_elem,& & n_el_send,k,n_el_recv,icontxt, idx, r, tot_elem,&
& n_elem, m, j, ipx,mat_recv, iszs, iszr,& & n_elem, m, j, ipx,mat_recv, iszs, iszr,&

Loading…
Cancel
Save