From 05983fc8c2db47c0b2ada89ab8c3101766c31563 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Thu, 8 May 2008 07:00:56 +0000 Subject: [PATCH] psblas2-dev: base/serial/psb_dspcnv.f90 base/serial/psb_zspcnv.f90 base/tools/psb_dsphalo.F90 base/tools/psb_zsphalo.F90 Fix spcnv with tolower. Fix bad initialization of a%m,a%k in sphalo. --- base/serial/psb_dspcnv.f90 | 4 ++-- base/serial/psb_zspcnv.f90 | 4 ++-- base/tools/psb_dsphalo.F90 | 4 ++-- base/tools/psb_zsphalo.F90 | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/serial/psb_dspcnv.f90 b/base/serial/psb_dspcnv.f90 index 82a807a6..8f5ae9b5 100644 --- a/base/serial/psb_dspcnv.f90 +++ b/base/serial/psb_dspcnv.f90 @@ -98,7 +98,7 @@ subroutine psb_dspcnv2(a, b,info,afmt,upd,dupl) call psb_sp_setifld(dupl,psb_dupl_,b,info) end if if (present(afmt)) then - afmt_ = afmt + afmt_ = psb_tolower(afmt) else afmt_ = psb_fidef_ end if @@ -126,7 +126,7 @@ subroutine psb_dspcnv2(a, b,info,afmt,upd,dupl) ! ...matrix conversion... b%m=a%m b%k=a%k - b%fida=afmt_ + b%fida=psb_tolower(afmt_) size_req = psb_sp_get_nnzeros(a) ! n_row=b%m diff --git a/base/serial/psb_zspcnv.f90 b/base/serial/psb_zspcnv.f90 index aa37094a..7243c34e 100644 --- a/base/serial/psb_zspcnv.f90 +++ b/base/serial/psb_zspcnv.f90 @@ -98,7 +98,7 @@ subroutine psb_zspcnv2(a, b,info,afmt,upd,dupl) call psb_sp_setifld(dupl,psb_dupl_,b,info) end if if (present(afmt)) then - afmt_ = afmt + afmt_ = psb_tolower(afmt) else afmt_ = psb_fidef_ end if @@ -126,7 +126,7 @@ subroutine psb_zspcnv2(a, b,info,afmt,upd,dupl) ! ...matrix conversion... b%m=a%m b%k=a%k - b%fida=afmt_ + b%fida=psb_tolower(afmt_) size_req = psb_sp_get_nnzeros(a) ! n_row=b%m diff --git a/base/tools/psb_dsphalo.F90 b/base/tools/psb_dsphalo.F90 index 71fa5f7a..b2fbd359 100644 --- a/base/tools/psb_dsphalo.F90 +++ b/base/tools/psb_dsphalo.F90 @@ -338,13 +338,13 @@ Subroutine psb_dsphalo(a,desc_a,blk,info,rowcnv,colcnv,& End If Enddo if (rowscale_) then - blk%m = irmax-irmin+1 + blk%m = max(irmax-irmin+1,0) blk%ia1(1:l1) = blk%ia1(1:l1) - irmin + 1 else blk%m = irmax end if if (colscale_) then - blk%k = icmax-icmin+1 + blk%k = max(icmax-icmin+1,0) blk%ia2(1:l1) = blk%ia2(1:l1) - icmin + 1 else blk%k = icmax diff --git a/base/tools/psb_zsphalo.F90 b/base/tools/psb_zsphalo.F90 index ebd8401a..58d67acf 100644 --- a/base/tools/psb_zsphalo.F90 +++ b/base/tools/psb_zsphalo.F90 @@ -337,13 +337,13 @@ Subroutine psb_zsphalo(a,desc_a,blk,info,rowcnv,colcnv,& End If Enddo if (rowscale_) then - blk%m = irmax-irmin+1 + blk%m = max(irmax-irmin+1,0) blk%ia1(1:l1) = blk%ia1(1:l1) - irmin + 1 else blk%m = irmax end if if (colscale_) then - blk%k = icmax-icmin+1 + blk%k = max(icmax-icmin+1,0) blk%ia2(1:l1) = blk%ia2(1:l1) - icmin + 1 else blk%k = icmax