psblas2-dev:

base/serial/psb_dspcnv.f90
 base/serial/psb_zspcnv.f90

Final fix for in-place path.
psblas3-type-indexed
Salvatore Filippone 17 years ago
parent 098bb7ea04
commit d315a49a95

@ -408,6 +408,7 @@ subroutine psb_dspcnv1(a, info, afmt, upd, dupl)
integer :: upd_, dupl_ integer :: upd_, dupl_
integer :: debug_level, debug_unit integer :: debug_level, debug_unit
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
logical :: inplace
info = 0 info = 0
int_err(1)=0 int_err(1)=0
@ -456,6 +457,7 @@ subroutine psb_dspcnv1(a, info, afmt, upd, dupl)
if (debug_level >= psb_debug_serial_) & if (debug_level >= psb_debug_serial_) &
& write(debug_unit,*) trim(name),& & write(debug_unit,*) trim(name),&
& ': Update:',upd_,psb_upd_srch_,psb_upd_perm_ & ': Update:',upd_,psb_upd_srch_,psb_upd_perm_
inplace = .false.
if (upd_ == psb_upd_srch_) then if (upd_ == psb_upd_srch_) then
if (present(afmt)) then if (present(afmt)) then
select case (psb_tolower(a%fida)) select case (psb_tolower(a%fida))
@ -463,26 +465,32 @@ subroutine psb_dspcnv1(a, info, afmt, upd, dupl)
select case(psb_tolower(afmt)) select case(psb_tolower(afmt))
case('coo') case('coo')
call psb_fixcoo(a,info) call psb_fixcoo(a,info)
call psb_sp_trim(a,info) inplace = .true.
goto 9998
case('csr') case('csr')
call psb_ipcoo2csr(a,info) call psb_ipcoo2csr(a,info)
call psb_sp_trim(a,info) inplace = .true.
goto 9998
case('csc') case('csc')
call psb_ipcoo2csc(a,info) call psb_ipcoo2csc(a,info)
call psb_sp_trim(a,info) inplace = .true.
goto 9998
end select end select
case('csr') case('csr')
select case(psb_tolower(afmt)) select case(psb_tolower(afmt))
case('coo') case('coo')
call psb_ipcsr2coo(a,info) call psb_ipcsr2coo(a,info)
call psb_sp_trim(a,info) inplace = .true.
goto 9998
end select end select
end select end select
end if end if
if (inplace) then
if (info == 0) call psb_sp_trim(a,info)
if (info /= 0) then
info=4010
ch_err='inplace cnv'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
goto 9998
end if
end if end if
call psb_sp_clone(a,atemp,info) call psb_sp_clone(a,atemp,info)

@ -408,6 +408,7 @@ subroutine psb_zspcnv1(a, info, afmt, upd, dupl)
integer :: upd_, dupl_ integer :: upd_, dupl_
integer :: debug_level, debug_unit integer :: debug_level, debug_unit
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
logical :: inplace
info = 0 info = 0
int_err(1)=0 int_err(1)=0
@ -456,6 +457,7 @@ subroutine psb_zspcnv1(a, info, afmt, upd, dupl)
if (debug_level >= psb_debug_serial_) & if (debug_level >= psb_debug_serial_) &
& write(debug_unit,*) trim(name),& & write(debug_unit,*) trim(name),&
& ': Update:',upd_,psb_upd_srch_,psb_upd_perm_ & ': Update:',upd_,psb_upd_srch_,psb_upd_perm_
inplace = .false.
if (upd_ == psb_upd_srch_) then if (upd_ == psb_upd_srch_) then
if (present(afmt)) then if (present(afmt)) then
select case (psb_tolower(a%fida)) select case (psb_tolower(a%fida))
@ -463,26 +465,32 @@ subroutine psb_zspcnv1(a, info, afmt, upd, dupl)
select case(psb_tolower(afmt)) select case(psb_tolower(afmt))
case('coo') case('coo')
call psb_fixcoo(a,info) call psb_fixcoo(a,info)
call psb_sp_trim(a,info) inplace = .true.
goto 9998
case('csr') case('csr')
call psb_ipcoo2csr(a,info) call psb_ipcoo2csr(a,info)
call psb_sp_trim(a,info) inplace = .true.
goto 9998
case('csc') case('csc')
call psb_ipcoo2csc(a,info) call psb_ipcoo2csc(a,info)
call psb_sp_trim(a,info) inplace = .true.
goto 9998
end select end select
case('csr') case('csr')
select case(psb_tolower(afmt)) select case(psb_tolower(afmt))
case('coo') case('coo')
call psb_ipcsr2coo(a,info) call psb_ipcsr2coo(a,info)
call psb_sp_trim(a,info) inplace = .true.
goto 9998
end select end select
end select end select
end if end if
if (inplace) then
if (info == 0) call psb_sp_trim(a,info)
if (info /= 0) then
info=4010
ch_err='inplace cnv'
call psb_errpush(info,name,a_err=ch_err)
goto 9999
endif
goto 9998
end if
end if end if
call psb_sp_clone(a,atemp,info) call psb_sp_clone(a,atemp,info)

Loading…
Cancel
Save