diff --git a/base/modules/psb_base_mat_mod.f90 b/base/modules/psb_base_mat_mod.f90 index e2084d11..6143e105 100644 --- a/base/modules/psb_base_mat_mod.f90 +++ b/base/modules/psb_base_mat_mod.f90 @@ -56,8 +56,8 @@ ! an actual implementation. If it is not the case, the method ! defined at this level will raise an error. These methods are ! defined in the serial/f03/psb_base_mat_impl.f03 file - - +! +! module psb_base_mat_mod @@ -178,7 +178,11 @@ module psb_base_mat_mod end type psb_base_sparse_mat - + ! + ! GET_NZ_ROW: + ! + ! count(A(idx,:)/=0) + ! interface function psb_base_get_nz_row(idx,a) result(res) import :: psb_base_sparse_mat, psb_long_int_k_ @@ -188,6 +192,11 @@ module psb_base_mat_mod end function psb_base_get_nz_row end interface + ! + ! GET_NZEROS: + ! + ! count(A(:,:)/=0) + ! interface function psb_base_get_nzeros(a) result(res) import :: psb_base_sparse_mat, psb_long_int_k_ @@ -196,6 +205,12 @@ module psb_base_mat_mod end function psb_base_get_nzeros end interface + ! + ! GET_SIZE: how many items can A hold with + ! its current space allocation? + ! (as opposed to how many are + ! currently occupied) + ! interface function psb_base_get_size(a) result(res) import :: psb_base_sparse_mat, psb_long_int_k_ @@ -204,6 +219,10 @@ module psb_base_mat_mod end function psb_base_get_size end interface + ! + ! REINIT: transition state from ASB to UPDATE + ! by default zero the coefficient values. + ! interface subroutine psb_base_reinit(a,clear) import :: psb_base_sparse_mat, psb_long_int_k_ @@ -212,18 +231,44 @@ module psb_base_mat_mod end subroutine psb_base_reinit end interface + + ! + ! PRINT: print on file in Matrix Market format. + ! Optional arguments: + ! head: header descriptive string. + ! iv: renumbering to be applied to both rows and columns + ! ivr, ivc: renumbering to be applied independently to + ! rows and columns + ! interface - subroutine psb_base_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_base_sparse_print(iout,a,iv,head,ivr,ivc) import :: psb_base_sparse_mat, psb_long_int_k_ integer, intent(in) :: iout class(psb_base_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_base_sparse_print end interface + + ! + ! GETPTN: Get the pattern. + ! Return a list of NZ pairs + ! (IA(i),JA(i)) + ! each identifying the position of a nonzero in A + ! between row indices IMIN:IMAX. + ! IA,JA are reallocated as necessary. + ! Optional arguments: + ! iren: return (IREN(IA(:)),IREN(JA(:)) + ! RSCALE: map [min(ia(:)):max(ia(:))] onto [1:max(ia(:))-min(ia(:))+1] + ! CSCALE: map [min(ja(:)):max(ja(:))] onto [1:max(ja(:))-min(ja(:))+1] + ! + ! iren cannot be specified with rscale/cscale. + ! + ! APPEND: append to IA,JA; first new entry will be in NZIN+1 + ! + interface subroutine psb_base_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -240,6 +285,12 @@ module psb_base_mat_mod end subroutine psb_base_csgetptn end interface + ! + ! GETNEIGH: Get the neighbours of index IDX, i.e. + ! get the nonzero indices in its row. + ! Optional: LEV: recurse at LEV levels, + ! i.e. LEV=2 add neighours of neighbours of IDX, etc. + ! interface subroutine psb_base_get_neigh(a,idx,neigh,n,info,lev) import :: psb_base_sparse_mat, psb_long_int_k_ @@ -252,6 +303,11 @@ module psb_base_mat_mod end subroutine psb_base_get_neigh end interface + ! + ! ALLOCATE_MNNZ: allocate/initialize empty for + ! an MxN matrix capable of holding NZ nonzeros. + ! Note: NZ is usually an estimate + ! interface subroutine psb_base_allocate_mnnz(m,n,a,nz) import :: psb_base_sparse_mat, psb_long_int_k_ @@ -261,6 +317,10 @@ module psb_base_mat_mod end subroutine psb_base_allocate_mnnz end interface + + ! + ! REALLOCATE_NZ: make room for NZ in an existing matrix + ! interface subroutine psb_base_reallocate_nz(nz,a) import :: psb_base_sparse_mat, psb_long_int_k_ @@ -269,6 +329,9 @@ module psb_base_mat_mod end subroutine psb_base_reallocate_nz end interface + ! + ! FREE: name says all + ! interface subroutine psb_base_free(a) import :: psb_base_sparse_mat, psb_long_int_k_ @@ -276,6 +339,10 @@ module psb_base_mat_mod end subroutine psb_base_free end interface + ! + ! TRIM: reallocate internal memory to the barest minimum + ! necessary to hold the current nonzeros. + ! interface subroutine psb_base_trim(a) import :: psb_base_sparse_mat, psb_long_int_k_ @@ -286,6 +353,10 @@ module psb_base_mat_mod contains + + ! + ! SIZEOF: size in bytes + ! function psb_base_sizeof(a) result(res) implicit none class(psb_base_sparse_mat), intent(in) :: a @@ -293,12 +364,18 @@ contains res = 8 end function psb_base_sizeof + ! + ! GET_FMT: descriptive name (e.g. COO CSR etc.) + ! function psb_base_get_fmt() result(res) implicit none character(len=5) :: res res = 'NULL' end function psb_base_get_fmt + ! + ! Standard getter functions: self-explaining. + ! function psb_base_get_dupl(a) result(res) implicit none class(psb_base_sparse_mat), intent(in) :: a @@ -509,6 +586,12 @@ contains res = a%sorted end function psb_base_is_sorted + + ! + ! MV|CP_FROM: at base level they are the same. + ! + ! + subroutine psb_base_mv_from(a,b) implicit none @@ -526,6 +609,7 @@ contains end subroutine psb_base_mv_from + subroutine psb_base_cp_from(a,b) implicit none @@ -543,6 +627,13 @@ contains end subroutine psb_base_cp_from + ! + ! TRANSP: note sorted=.false. + ! better invoke a fix() too many than + ! regret it later... + ! + + subroutine psb_base_transp_2mat(a,b) implicit none diff --git a/base/modules/psb_c_base_mat_mod.f90 b/base/modules/psb_c_base_mat_mod.f90 index 138f1426..e8c70d76 100644 --- a/base/modules/psb_c_base_mat_mod.f90 +++ b/base/modules/psb_c_base_mat_mod.f90 @@ -214,7 +214,7 @@ module psb_c_base_mat_mod ! can only be called for COO matrice, in which case it ! is more like queueing coefficients for later processing; ! 2. If A is in the UPDATE state, then every derived class must - ! implement this; + ! implement it; ! 3. In the UPDATE state, depending on the value of DUPL flag ! inside A, it will be A=VAL or A = A + VAL ! @@ -725,12 +725,11 @@ module psb_c_base_mat_mod interface - subroutine psb_c_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_c_coo_print(iout,a,iv,head,ivr,ivc) import :: psb_c_coo_sparse_mat integer, intent(in) :: iout class(psb_c_coo_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_c_coo_print @@ -747,6 +746,12 @@ module psb_c_base_mat_mod end interface + ! + ! Fix: make sure that + ! 1. The coefficients are sorted + ! 2. Handle duplicates if necessary. + ! Optional: IDIR: sort by rows or columns. + ! interface subroutine psb_c_fix_coo_inner(nzin,dupl,ia,ja,val,nzout,info,idir) import :: psb_spk_ diff --git a/base/modules/psb_c_csc_mat_mod.f90 b/base/modules/psb_c_csc_mat_mod.f90 index b12b5343..5af6bbd9 100644 --- a/base/modules/psb_c_csc_mat_mod.f90 +++ b/base/modules/psb_c_csc_mat_mod.f90 @@ -140,12 +140,11 @@ module psb_c_csc_mat_mod end interface interface - subroutine psb_c_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_c_csc_print(iout,a,iv,head,ivr,ivc) import :: psb_c_csc_sparse_mat integer, intent(in) :: iout class(psb_c_csc_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_c_csc_print diff --git a/base/modules/psb_c_csr_mat_mod.f90 b/base/modules/psb_c_csr_mat_mod.f90 index fbc8161d..8fe96d39 100644 --- a/base/modules/psb_c_csr_mat_mod.f90 +++ b/base/modules/psb_c_csr_mat_mod.f90 @@ -140,12 +140,11 @@ module psb_c_csr_mat_mod end interface interface - subroutine psb_c_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_c_csr_print(iout,a,iv,head,ivr,ivc) import :: psb_c_csr_sparse_mat integer, intent(in) :: iout class(psb_c_csr_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_c_csr_print diff --git a/base/modules/psb_c_mat_mod.f90 b/base/modules/psb_c_mat_mod.f90 index 6c6d9e08..12a42344 100644 --- a/base/modules/psb_c_mat_mod.f90 +++ b/base/modules/psb_c_mat_mod.f90 @@ -296,24 +296,22 @@ module psb_c_mat_mod end interface interface - subroutine psb_c_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_c_sparse_print(iout,a,iv,head,ivr,ivc) import :: psb_cspmat_type integer, intent(in) :: iout class(psb_cspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_c_sparse_print end interface interface - subroutine psb_c_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_c_n_sparse_print(fname,a,iv,head,ivr,ivc) import :: psb_cspmat_type character(len=*), intent(in) :: fname class(psb_cspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_c_n_sparse_print diff --git a/base/modules/psb_d_base_mat_mod.f90 b/base/modules/psb_d_base_mat_mod.f90 index 49796ffa..4fb98a30 100644 --- a/base/modules/psb_d_base_mat_mod.f90 +++ b/base/modules/psb_d_base_mat_mod.f90 @@ -214,7 +214,7 @@ module psb_d_base_mat_mod ! can only be called for COO matrice, in which case it ! is more like queueing coefficients for later processing; ! 2. If A is in the UPDATE state, then every derived class must - ! implement this; + ! implement it; ! 3. In the UPDATE state, depending on the value of DUPL flag ! inside A, it will be A=VAL or A = A + VAL ! @@ -725,12 +725,11 @@ module psb_d_base_mat_mod interface - subroutine psb_d_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_d_coo_print(iout,a,iv,head,ivr,ivc) import :: psb_d_coo_sparse_mat integer, intent(in) :: iout class(psb_d_coo_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_d_coo_print @@ -747,6 +746,12 @@ module psb_d_base_mat_mod end interface + ! + ! Fix: make sure that + ! 1. The coefficients are sorted + ! 2. Handle duplicates if necessary. + ! Optional: IDIR: sort by rows or columns. + ! interface subroutine psb_d_fix_coo_inner(nzin,dupl,ia,ja,val,nzout,info,idir) import :: psb_dpk_ diff --git a/base/modules/psb_d_csc_mat_mod.f90 b/base/modules/psb_d_csc_mat_mod.f90 index d1ff8ea4..3410b660 100644 --- a/base/modules/psb_d_csc_mat_mod.f90 +++ b/base/modules/psb_d_csc_mat_mod.f90 @@ -140,12 +140,11 @@ module psb_d_csc_mat_mod end interface interface - subroutine psb_d_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_d_csc_print(iout,a,iv,head,ivr,ivc) import :: psb_d_csc_sparse_mat integer, intent(in) :: iout class(psb_d_csc_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_d_csc_print diff --git a/base/modules/psb_d_csr_mat_mod.f90 b/base/modules/psb_d_csr_mat_mod.f90 index f4c32274..5445846c 100644 --- a/base/modules/psb_d_csr_mat_mod.f90 +++ b/base/modules/psb_d_csr_mat_mod.f90 @@ -140,12 +140,11 @@ module psb_d_csr_mat_mod end interface interface - subroutine psb_d_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_d_csr_print(iout,a,iv,head,ivr,ivc) import :: psb_d_csr_sparse_mat integer, intent(in) :: iout class(psb_d_csr_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_d_csr_print diff --git a/base/modules/psb_d_mat_mod.f90 b/base/modules/psb_d_mat_mod.f90 index 9a7af53d..f3a39a3e 100644 --- a/base/modules/psb_d_mat_mod.f90 +++ b/base/modules/psb_d_mat_mod.f90 @@ -296,24 +296,22 @@ module psb_d_mat_mod end interface interface - subroutine psb_d_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_d_sparse_print(iout,a,iv,head,ivr,ivc) import :: psb_dspmat_type integer, intent(in) :: iout class(psb_dspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_d_sparse_print end interface interface - subroutine psb_d_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_d_n_sparse_print(fname,a,iv,head,ivr,ivc) import :: psb_dspmat_type character(len=*), intent(in) :: fname class(psb_dspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_d_n_sparse_print diff --git a/base/modules/psb_s_base_mat_mod.f90 b/base/modules/psb_s_base_mat_mod.f90 index 64be241e..82abb907 100644 --- a/base/modules/psb_s_base_mat_mod.f90 +++ b/base/modules/psb_s_base_mat_mod.f90 @@ -214,7 +214,7 @@ module psb_s_base_mat_mod ! can only be called for COO matrice, in which case it ! is more like queueing coefficients for later processing; ! 2. If A is in the UPDATE state, then every derived class must - ! implement this; + ! implement it; ! 3. In the UPDATE state, depending on the value of DUPL flag ! inside A, it will be A=VAL or A = A + VAL ! @@ -725,12 +725,11 @@ module psb_s_base_mat_mod interface - subroutine psb_s_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_s_coo_print(iout,a,iv,head,ivr,ivc) import :: psb_s_coo_sparse_mat integer, intent(in) :: iout class(psb_s_coo_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_s_coo_print @@ -747,6 +746,12 @@ module psb_s_base_mat_mod end interface + ! + ! Fix: make sure that + ! 1. The coefficients are sorted + ! 2. Handle duplicates if necessary. + ! Optional: IDIR: sort by rows or columns. + ! interface subroutine psb_s_fix_coo_inner(nzin,dupl,ia,ja,val,nzout,info,idir) import :: psb_spk_ diff --git a/base/modules/psb_s_csc_mat_mod.f90 b/base/modules/psb_s_csc_mat_mod.f90 index a8958805..fcc72c80 100644 --- a/base/modules/psb_s_csc_mat_mod.f90 +++ b/base/modules/psb_s_csc_mat_mod.f90 @@ -140,12 +140,11 @@ module psb_s_csc_mat_mod end interface interface - subroutine psb_s_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_s_csc_print(iout,a,iv,head,ivr,ivc) import :: psb_s_csc_sparse_mat integer, intent(in) :: iout class(psb_s_csc_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_s_csc_print diff --git a/base/modules/psb_s_csr_mat_mod.f90 b/base/modules/psb_s_csr_mat_mod.f90 index c4262782..8833ca91 100644 --- a/base/modules/psb_s_csr_mat_mod.f90 +++ b/base/modules/psb_s_csr_mat_mod.f90 @@ -140,12 +140,11 @@ module psb_s_csr_mat_mod end interface interface - subroutine psb_s_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_s_csr_print(iout,a,iv,head,ivr,ivc) import :: psb_s_csr_sparse_mat integer, intent(in) :: iout class(psb_s_csr_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_s_csr_print diff --git a/base/modules/psb_s_mat_mod.f90 b/base/modules/psb_s_mat_mod.f90 index b78dfb49..1a5e589d 100644 --- a/base/modules/psb_s_mat_mod.f90 +++ b/base/modules/psb_s_mat_mod.f90 @@ -296,24 +296,22 @@ module psb_s_mat_mod end interface interface - subroutine psb_s_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_s_sparse_print(iout,a,iv,head,ivr,ivc) import :: psb_sspmat_type integer, intent(in) :: iout class(psb_sspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_s_sparse_print end interface interface - subroutine psb_s_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_s_n_sparse_print(fname,a,iv,head,ivr,ivc) import :: psb_sspmat_type character(len=*), intent(in) :: fname class(psb_sspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_s_n_sparse_print diff --git a/base/modules/psb_serial_mod.f90 b/base/modules/psb_serial_mod.f90 index 90418b85..bc14f4bc 100644 --- a/base/modules/psb_serial_mod.f90 +++ b/base/modules/psb_serial_mod.f90 @@ -456,107 +456,99 @@ module psb_serial_mod contains - subroutine psb_scsprt(iout,a,iv,irs,ics,head,ivr,ivc) + subroutine psb_scsprt(iout,a,iv,head,ivr,ivc) use psb_mat_mod integer, intent(in) :: iout type(psb_sspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: irs,ics character(len=*), optional :: head integer, intent(in), optional :: ivr(:),ivc(:) - call a%print(iout,iv,irs,ics,head,ivr,ivc) + call a%print(iout,iv,head,ivr,ivc) end subroutine psb_scsprt - subroutine psb_scsprtn(fname,a,iv,irs,ics,head,ivr,ivc) + subroutine psb_scsprtn(fname,a,iv,head,ivr,ivc) use psb_mat_mod character(len=*), intent(in) :: fname type(psb_sspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: irs,ics character(len=*), optional :: head integer, intent(in), optional :: ivr(:),ivc(:) - call a%print(fname,iv,irs,ics,head,ivr,ivc) + call a%print(fname,iv,head,ivr,ivc) end subroutine psb_scsprtn - subroutine psb_dcsprt(iout,a,iv,irs,ics,head,ivr,ivc) + subroutine psb_dcsprt(iout,a,iv,head,ivr,ivc) use psb_mat_mod integer, intent(in) :: iout type(psb_dspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: irs,ics character(len=*), optional :: head integer, intent(in), optional :: ivr(:),ivc(:) - call a%print(iout,iv,irs,ics,head,ivr,ivc) + call a%print(iout,iv,head,ivr,ivc) end subroutine psb_dcsprt - subroutine psb_dcsprtn(fname,a,iv,irs,ics,head,ivr,ivc) + subroutine psb_dcsprtn(fname,a,iv,head,ivr,ivc) use psb_mat_mod character(len=*), intent(in) :: fname type(psb_dspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: irs,ics character(len=*), optional :: head integer, intent(in), optional :: ivr(:),ivc(:) - call a%print(fname,iv,irs,ics,head,ivr,ivc) + call a%print(fname,iv,head,ivr,ivc) end subroutine psb_dcsprtn - subroutine psb_ccsprt(iout,a,iv,irs,ics,head,ivr,ivc) + subroutine psb_ccsprt(iout,a,iv,head,ivr,ivc) use psb_mat_mod integer, intent(in) :: iout type(psb_cspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: irs,ics character(len=*), optional :: head integer, intent(in), optional :: ivr(:),ivc(:) - call a%print(iout,iv,irs,ics,head,ivr,ivc) + call a%print(iout,iv,head,ivr,ivc) end subroutine psb_ccsprt - subroutine psb_ccsprtn(fname,a,iv,irs,ics,head,ivr,ivc) + subroutine psb_ccsprtn(fname,a,iv,head,ivr,ivc) use psb_mat_mod character(len=*), intent(in) :: fname type(psb_cspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: irs,ics character(len=*), optional :: head integer, intent(in), optional :: ivr(:),ivc(:) - call a%print(fname,iv,irs,ics,head,ivr,ivc) + call a%print(fname,iv,head,ivr,ivc) end subroutine psb_ccsprtn - subroutine psb_zcsprt(iout,a,iv,irs,ics,head,ivr,ivc) + subroutine psb_zcsprt(iout,a,iv,head,ivr,ivc) use psb_mat_mod integer, intent(in) :: iout type(psb_zspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: irs,ics character(len=*), optional :: head integer, intent(in), optional :: ivr(:),ivc(:) - call a%print(iout,iv,irs,ics,head,ivr,ivc) + call a%print(iout,iv,head,ivr,ivc) end subroutine psb_zcsprt - subroutine psb_zcsprtn(fname,a,iv,irs,ics,head,ivr,ivc) + subroutine psb_zcsprtn(fname,a,iv,head,ivr,ivc) use psb_mat_mod character(len=*), intent(in) :: fname type(psb_zspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: irs,ics character(len=*), optional :: head integer, intent(in), optional :: ivr(:),ivc(:) - call a%print(fname,iv,irs,ics,head,ivr,ivc) + call a%print(fname,iv,head,ivr,ivc) end subroutine psb_zcsprtn diff --git a/base/modules/psb_z_base_mat_mod.f90 b/base/modules/psb_z_base_mat_mod.f90 index 76cde222..a49e00aa 100644 --- a/base/modules/psb_z_base_mat_mod.f90 +++ b/base/modules/psb_z_base_mat_mod.f90 @@ -214,7 +214,7 @@ module psb_z_base_mat_mod ! can only be called for COO matrice, in which case it ! is more like queueing coefficients for later processing; ! 2. If A is in the UPDATE state, then every derived class must - ! implement this; + ! implement it; ! 3. In the UPDATE state, depending on the value of DUPL flag ! inside A, it will be A=VAL or A = A + VAL ! @@ -725,12 +725,11 @@ module psb_z_base_mat_mod interface - subroutine psb_z_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_z_coo_print(iout,a,iv,head,ivr,ivc) import :: psb_z_coo_sparse_mat integer, intent(in) :: iout class(psb_z_coo_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_z_coo_print @@ -747,6 +746,12 @@ module psb_z_base_mat_mod end interface + ! + ! Fix: make sure that + ! 1. The coefficients are sorted + ! 2. Handle duplicates if necessary. + ! Optional: IDIR: sort by rows or columns. + ! interface subroutine psb_z_fix_coo_inner(nzin,dupl,ia,ja,val,nzout,info,idir) import :: psb_dpk_ diff --git a/base/modules/psb_z_csc_mat_mod.f90 b/base/modules/psb_z_csc_mat_mod.f90 index fc30d5db..5d092bf4 100644 --- a/base/modules/psb_z_csc_mat_mod.f90 +++ b/base/modules/psb_z_csc_mat_mod.f90 @@ -140,12 +140,11 @@ module psb_z_csc_mat_mod end interface interface - subroutine psb_z_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_z_csc_print(iout,a,iv,head,ivr,ivc) import :: psb_z_csc_sparse_mat integer, intent(in) :: iout class(psb_z_csc_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_z_csc_print diff --git a/base/modules/psb_z_csr_mat_mod.f90 b/base/modules/psb_z_csr_mat_mod.f90 index 8666de86..b2b9256f 100644 --- a/base/modules/psb_z_csr_mat_mod.f90 +++ b/base/modules/psb_z_csr_mat_mod.f90 @@ -140,12 +140,11 @@ module psb_z_csr_mat_mod end interface interface - subroutine psb_z_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_z_csr_print(iout,a,iv,head,ivr,ivc) import :: psb_z_csr_sparse_mat integer, intent(in) :: iout class(psb_z_csr_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_z_csr_print diff --git a/base/modules/psb_z_mat_mod.f90 b/base/modules/psb_z_mat_mod.f90 index 2d1d3d6e..1c1fb6c2 100644 --- a/base/modules/psb_z_mat_mod.f90 +++ b/base/modules/psb_z_mat_mod.f90 @@ -296,24 +296,22 @@ module psb_z_mat_mod end interface interface - subroutine psb_z_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_z_sparse_print(iout,a,iv,head,ivr,ivc) import :: psb_zspmat_type integer, intent(in) :: iout class(psb_zspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_z_sparse_print end interface interface - subroutine psb_z_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) + subroutine psb_z_n_sparse_print(fname,a,iv,head,ivr,ivc) import :: psb_zspmat_type character(len=*), intent(in) :: fname class(psb_zspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) end subroutine psb_z_n_sparse_print diff --git a/base/serial/impl/psb_c_coo_impl.f90 b/base/serial/impl/psb_c_coo_impl.f90 index 142f5b61..89f5aa31 100644 --- a/base/serial/impl/psb_c_coo_impl.f90 +++ b/base/serial/impl/psb_c_coo_impl.f90 @@ -335,7 +335,7 @@ end subroutine psb_c_coo_allocate_mnnz -subroutine psb_c_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_c_coo_print(iout,a,iv,head,ivr,ivc) use psb_c_base_mat_mod, psb_protect_name => psb_c_coo_print use psb_string_mod implicit none @@ -343,7 +343,6 @@ subroutine psb_c_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_c_coo_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -353,18 +352,7 @@ subroutine psb_c_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), parameter :: datatype='complex' character(len=80) :: frmtv - integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif + integer :: i,j, nmx, ni, nr, nc, nz if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' diff --git a/base/serial/impl/psb_c_csc_impl.f90 b/base/serial/impl/psb_c_csc_impl.f90 index 49ed6531..543d301c 100644 --- a/base/serial/impl/psb_c_csc_impl.f90 +++ b/base/serial/impl/psb_c_csc_impl.f90 @@ -2771,7 +2771,7 @@ subroutine psb_c_csc_allocate_mnnz(m,n,a,nz) end subroutine psb_c_csc_allocate_mnnz -subroutine psb_c_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_c_csc_print(iout,a,iv,head,ivr,ivc) use psb_string_mod use psb_c_csc_mat_mod, psb_protect_name => psb_c_csc_print implicit none @@ -2779,7 +2779,6 @@ subroutine psb_c_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_c_csc_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -2789,18 +2788,7 @@ subroutine psb_c_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), parameter :: datatype='complex' character(len=80) :: frmtv - integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif + integer :: i,j, nmx, ni, nr, nc, nz if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' diff --git a/base/serial/impl/psb_c_csr_impl.f90 b/base/serial/impl/psb_c_csr_impl.f90 index a735e069..48256c13 100644 --- a/base/serial/impl/psb_c_csr_impl.f90 +++ b/base/serial/impl/psb_c_csr_impl.f90 @@ -2585,7 +2585,7 @@ subroutine psb_c_csr_trim(a) end subroutine psb_c_csr_trim -subroutine psb_c_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_c_csr_print(iout,a,iv,head,ivr,ivc) use psb_string_mod use psb_c_csr_mat_mod, psb_protect_name => psb_c_csr_print implicit none @@ -2593,7 +2593,6 @@ subroutine psb_c_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_c_csr_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -2604,17 +2603,6 @@ subroutine psb_c_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=80) :: frmtv integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif - if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' write(iout,'(a,a)') '% ',head diff --git a/base/serial/impl/psb_c_mat_impl.F90 b/base/serial/impl/psb_c_mat_impl.F90 index 9bfb1008..c6053db3 100644 --- a/base/serial/impl/psb_c_mat_impl.F90 +++ b/base/serial/impl/psb_c_mat_impl.F90 @@ -446,7 +446,7 @@ end subroutine psb_c_set_upper ! == =================================== -subroutine psb_c_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_c_sparse_print(iout,a,iv,head,ivr,ivc) use psb_c_mat_mod, psb_protect_name => psb_c_sparse_print use psb_error_mod implicit none @@ -454,7 +454,6 @@ subroutine psb_c_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_cspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -470,7 +469,7 @@ subroutine psb_c_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) goto 9999 endif - call a%a%print(iout,iv,eirs,eics,head,ivr,ivc) + call a%a%print(iout,iv,head,ivr,ivc) return @@ -485,7 +484,7 @@ subroutine psb_c_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) end subroutine psb_c_sparse_print -subroutine psb_c_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_c_n_sparse_print(fname,a,iv,head,ivr,ivc) use psb_c_mat_mod, psb_protect_name => psb_c_n_sparse_print use psb_error_mod implicit none @@ -493,7 +492,6 @@ subroutine psb_c_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) character(len=*), intent(in) :: fname class(psb_cspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -522,7 +520,7 @@ subroutine psb_c_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) end if open(iout,file=fname,iostat=info) if (info == psb_success_) then - call a%a%print(iout,iv,eirs,eics,head,ivr,ivc) + call a%a%print(iout,iv,head,ivr,ivc) close(iout) else write(psb_err_unit,*) 'Error: could not open ',fname,' for output' diff --git a/base/serial/impl/psb_d_coo_impl.f90 b/base/serial/impl/psb_d_coo_impl.f90 index fa7b0e8d..1bcba17c 100644 --- a/base/serial/impl/psb_d_coo_impl.f90 +++ b/base/serial/impl/psb_d_coo_impl.f90 @@ -335,7 +335,7 @@ end subroutine psb_d_coo_allocate_mnnz -subroutine psb_d_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_d_coo_print(iout,a,iv,head,ivr,ivc) use psb_d_base_mat_mod, psb_protect_name => psb_d_coo_print use psb_string_mod implicit none @@ -343,7 +343,6 @@ subroutine psb_d_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_d_coo_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -353,18 +352,7 @@ subroutine psb_d_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), parameter :: datatype='real' character(len=80) :: frmtv - integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif + integer :: i,j, nmx, ni, nr, nc, nz if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' diff --git a/base/serial/impl/psb_d_csc_impl.f90 b/base/serial/impl/psb_d_csc_impl.f90 index 7d44ff21..6f7c9fbe 100644 --- a/base/serial/impl/psb_d_csc_impl.f90 +++ b/base/serial/impl/psb_d_csc_impl.f90 @@ -2771,7 +2771,7 @@ subroutine psb_d_csc_allocate_mnnz(m,n,a,nz) end subroutine psb_d_csc_allocate_mnnz -subroutine psb_d_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_d_csc_print(iout,a,iv,head,ivr,ivc) use psb_string_mod use psb_d_csc_mat_mod, psb_protect_name => psb_d_csc_print implicit none @@ -2779,7 +2779,6 @@ subroutine psb_d_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_d_csc_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -2789,18 +2788,7 @@ subroutine psb_d_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), parameter :: datatype='real' character(len=80) :: frmtv - integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif + integer :: i,j, nmx, ni, nr, nc, nz if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' diff --git a/base/serial/impl/psb_d_csr_impl.f90 b/base/serial/impl/psb_d_csr_impl.f90 index a9c3e8c2..4dbfa558 100644 --- a/base/serial/impl/psb_d_csr_impl.f90 +++ b/base/serial/impl/psb_d_csr_impl.f90 @@ -1561,7 +1561,7 @@ subroutine psb_d_csr_get_diag(a,d,info) end do end if do i=mnm+1,size(d) - d(i) = czero + d(i) = dzero end do call psb_erractionrestore(err_act) @@ -2585,7 +2585,7 @@ subroutine psb_d_csr_trim(a) end subroutine psb_d_csr_trim -subroutine psb_d_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_d_csr_print(iout,a,iv,head,ivr,ivc) use psb_string_mod use psb_d_csr_mat_mod, psb_protect_name => psb_d_csr_print implicit none @@ -2593,7 +2593,6 @@ subroutine psb_d_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_d_csr_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -2604,17 +2603,6 @@ subroutine psb_d_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=80) :: frmtv integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif - if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' write(iout,'(a,a)') '% ',head diff --git a/base/serial/impl/psb_d_mat_impl.F90 b/base/serial/impl/psb_d_mat_impl.F90 index fc7a5b61..0f9577df 100644 --- a/base/serial/impl/psb_d_mat_impl.F90 +++ b/base/serial/impl/psb_d_mat_impl.F90 @@ -446,7 +446,7 @@ end subroutine psb_d_set_upper ! == =================================== -subroutine psb_d_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_d_sparse_print(iout,a,iv,head,ivr,ivc) use psb_d_mat_mod, psb_protect_name => psb_d_sparse_print use psb_error_mod implicit none @@ -454,7 +454,6 @@ subroutine psb_d_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_dspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -470,7 +469,7 @@ subroutine psb_d_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) goto 9999 endif - call a%a%print(iout,iv,eirs,eics,head,ivr,ivc) + call a%a%print(iout,iv,head,ivr,ivc) return @@ -485,7 +484,7 @@ subroutine psb_d_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) end subroutine psb_d_sparse_print -subroutine psb_d_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_d_n_sparse_print(fname,a,iv,head,ivr,ivc) use psb_d_mat_mod, psb_protect_name => psb_d_n_sparse_print use psb_error_mod implicit none @@ -493,7 +492,6 @@ subroutine psb_d_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) character(len=*), intent(in) :: fname class(psb_dspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -522,7 +520,7 @@ subroutine psb_d_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) end if open(iout,file=fname,iostat=info) if (info == psb_success_) then - call a%a%print(iout,iv,eirs,eics,head,ivr,ivc) + call a%a%print(iout,iv,head,ivr,ivc) close(iout) else write(psb_err_unit,*) 'Error: could not open ',fname,' for output' diff --git a/base/serial/impl/psb_s_coo_impl.f90 b/base/serial/impl/psb_s_coo_impl.f90 index a2e6403b..808b0b04 100644 --- a/base/serial/impl/psb_s_coo_impl.f90 +++ b/base/serial/impl/psb_s_coo_impl.f90 @@ -335,7 +335,7 @@ end subroutine psb_s_coo_allocate_mnnz -subroutine psb_s_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_s_coo_print(iout,a,iv,head,ivr,ivc) use psb_s_base_mat_mod, psb_protect_name => psb_s_coo_print use psb_string_mod implicit none @@ -343,7 +343,6 @@ subroutine psb_s_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_s_coo_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -353,18 +352,7 @@ subroutine psb_s_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), parameter :: datatype='real' character(len=80) :: frmtv - integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif + integer :: i,j, nmx, ni, nr, nc, nz if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' diff --git a/base/serial/impl/psb_s_csc_impl.f90 b/base/serial/impl/psb_s_csc_impl.f90 index ac7e57a4..eb1c0ba6 100644 --- a/base/serial/impl/psb_s_csc_impl.f90 +++ b/base/serial/impl/psb_s_csc_impl.f90 @@ -2771,7 +2771,7 @@ subroutine psb_s_csc_allocate_mnnz(m,n,a,nz) end subroutine psb_s_csc_allocate_mnnz -subroutine psb_s_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_s_csc_print(iout,a,iv,head,ivr,ivc) use psb_string_mod use psb_s_csc_mat_mod, psb_protect_name => psb_s_csc_print implicit none @@ -2779,7 +2779,6 @@ subroutine psb_s_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_s_csc_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -2789,18 +2788,7 @@ subroutine psb_s_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), parameter :: datatype='real' character(len=80) :: frmtv - integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif + integer :: i,j, nmx, ni, nr, nc, nz if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' diff --git a/base/serial/impl/psb_s_csr_impl.f90 b/base/serial/impl/psb_s_csr_impl.f90 index c4ae4d32..10841821 100644 --- a/base/serial/impl/psb_s_csr_impl.f90 +++ b/base/serial/impl/psb_s_csr_impl.f90 @@ -1561,7 +1561,7 @@ subroutine psb_s_csr_get_diag(a,d,info) end do end if do i=mnm+1,size(d) - d(i) = czero + d(i) = szero end do call psb_erractionrestore(err_act) @@ -2585,7 +2585,7 @@ subroutine psb_s_csr_trim(a) end subroutine psb_s_csr_trim -subroutine psb_s_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_s_csr_print(iout,a,iv,head,ivr,ivc) use psb_string_mod use psb_s_csr_mat_mod, psb_protect_name => psb_s_csr_print implicit none @@ -2593,7 +2593,6 @@ subroutine psb_s_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_s_csr_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -2604,17 +2603,6 @@ subroutine psb_s_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=80) :: frmtv integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif - if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate real general' write(iout,'(a,a)') '% ',head diff --git a/base/serial/impl/psb_s_mat_impl.F90 b/base/serial/impl/psb_s_mat_impl.F90 index bfd59727..3faa8cb6 100644 --- a/base/serial/impl/psb_s_mat_impl.F90 +++ b/base/serial/impl/psb_s_mat_impl.F90 @@ -446,7 +446,7 @@ end subroutine psb_s_set_upper ! == =================================== -subroutine psb_s_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_s_sparse_print(iout,a,iv,head,ivr,ivc) use psb_s_mat_mod, psb_protect_name => psb_s_sparse_print use psb_error_mod implicit none @@ -454,7 +454,6 @@ subroutine psb_s_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_sspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -470,7 +469,7 @@ subroutine psb_s_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) goto 9999 endif - call a%a%print(iout,iv,eirs,eics,head,ivr,ivc) + call a%a%print(iout,iv,head,ivr,ivc) return @@ -485,7 +484,7 @@ subroutine psb_s_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) end subroutine psb_s_sparse_print -subroutine psb_s_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_s_n_sparse_print(fname,a,iv,head,ivr,ivc) use psb_s_mat_mod, psb_protect_name => psb_s_n_sparse_print use psb_error_mod implicit none @@ -493,7 +492,6 @@ subroutine psb_s_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) character(len=*), intent(in) :: fname class(psb_sspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -522,7 +520,7 @@ subroutine psb_s_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) end if open(iout,file=fname,iostat=info) if (info == psb_success_) then - call a%a%print(iout,iv,eirs,eics,head,ivr,ivc) + call a%a%print(iout,iv,head,ivr,ivc) close(iout) else write(psb_err_unit,*) 'Error: could not open ',fname,' for output' diff --git a/base/serial/impl/psb_z_coo_impl.f90 b/base/serial/impl/psb_z_coo_impl.f90 index 542410a1..55446d21 100644 --- a/base/serial/impl/psb_z_coo_impl.f90 +++ b/base/serial/impl/psb_z_coo_impl.f90 @@ -335,7 +335,7 @@ end subroutine psb_z_coo_allocate_mnnz -subroutine psb_z_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_z_coo_print(iout,a,iv,head,ivr,ivc) use psb_z_base_mat_mod, psb_protect_name => psb_z_coo_print use psb_string_mod implicit none @@ -343,7 +343,6 @@ subroutine psb_z_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_z_coo_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -353,18 +352,7 @@ subroutine psb_z_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), parameter :: datatype='complex' character(len=80) :: frmtv - integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif + integer :: i,j, nmx, ni, nr, nc, nz if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' diff --git a/base/serial/impl/psb_z_csc_impl.f90 b/base/serial/impl/psb_z_csc_impl.f90 index 9190a61c..c27c1249 100644 --- a/base/serial/impl/psb_z_csc_impl.f90 +++ b/base/serial/impl/psb_z_csc_impl.f90 @@ -2771,7 +2771,7 @@ subroutine psb_z_csc_allocate_mnnz(m,n,a,nz) end subroutine psb_z_csc_allocate_mnnz -subroutine psb_z_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_z_csc_print(iout,a,iv,head,ivr,ivc) use psb_string_mod use psb_z_csc_mat_mod, psb_protect_name => psb_z_csc_print implicit none @@ -2779,7 +2779,6 @@ subroutine psb_z_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_z_csc_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -2789,18 +2788,7 @@ subroutine psb_z_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), parameter :: datatype='complex' character(len=80) :: frmtv - integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif + integer :: i,j, nmx, ni, nr, nc, nz if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' diff --git a/base/serial/impl/psb_z_csr_impl.f90 b/base/serial/impl/psb_z_csr_impl.f90 index 5c9de60e..d20a774b 100644 --- a/base/serial/impl/psb_z_csr_impl.f90 +++ b/base/serial/impl/psb_z_csr_impl.f90 @@ -1561,7 +1561,7 @@ subroutine psb_z_csr_get_diag(a,d,info) end do end if do i=mnm+1,size(d) - d(i) = czero + d(i) = zzero end do call psb_erractionrestore(err_act) @@ -2585,7 +2585,7 @@ subroutine psb_z_csr_trim(a) end subroutine psb_z_csr_trim -subroutine psb_z_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_z_csr_print(iout,a,iv,head,ivr,ivc) use psb_string_mod use psb_z_csr_mat_mod, psb_protect_name => psb_z_csr_print implicit none @@ -2593,7 +2593,6 @@ subroutine psb_z_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_z_csr_sparse_mat), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -2604,17 +2603,6 @@ subroutine psb_z_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=80) :: frmtv integer :: irs,ics,i,j, nmx, ni, nr, nc, nz - if (present(eirs)) then - irs = eirs - else - irs = 0 - endif - if (present(eics)) then - ics = eics - else - ics = 0 - endif - if (present(head)) then write(iout,'(a)') '%%MatrixMarket matrix coordinate complex general' write(iout,'(a,a)') '% ',head diff --git a/base/serial/impl/psb_z_mat_impl.F90 b/base/serial/impl/psb_z_mat_impl.F90 index c8423502..5335337d 100644 --- a/base/serial/impl/psb_z_mat_impl.F90 +++ b/base/serial/impl/psb_z_mat_impl.F90 @@ -446,7 +446,7 @@ end subroutine psb_z_set_upper ! == =================================== -subroutine psb_z_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_z_sparse_print(iout,a,iv,head,ivr,ivc) use psb_z_mat_mod, psb_protect_name => psb_z_sparse_print use psb_error_mod implicit none @@ -454,7 +454,6 @@ subroutine psb_z_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) integer, intent(in) :: iout class(psb_zspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -470,7 +469,7 @@ subroutine psb_z_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) goto 9999 endif - call a%a%print(iout,iv,eirs,eics,head,ivr,ivc) + call a%a%print(iout,iv,head,ivr,ivc) return @@ -485,7 +484,7 @@ subroutine psb_z_sparse_print(iout,a,iv,eirs,eics,head,ivr,ivc) end subroutine psb_z_sparse_print -subroutine psb_z_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) +subroutine psb_z_n_sparse_print(fname,a,iv,head,ivr,ivc) use psb_z_mat_mod, psb_protect_name => psb_z_n_sparse_print use psb_error_mod implicit none @@ -493,7 +492,6 @@ subroutine psb_z_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) character(len=*), intent(in) :: fname class(psb_zspmat_type), intent(in) :: a integer, intent(in), optional :: iv(:) - integer, intent(in), optional :: eirs,eics character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) @@ -522,7 +520,7 @@ subroutine psb_z_n_sparse_print(fname,a,iv,eirs,eics,head,ivr,ivc) end if open(iout,file=fname,iostat=info) if (info == psb_success_) then - call a%a%print(iout,iv,eirs,eics,head,ivr,ivc) + call a%a%print(iout,iv,head,ivr,ivc) close(iout) else write(psb_err_unit,*) 'Error: could not open ',fname,' for output' diff --git a/config/pac.m4 b/config/pac.m4 index 82ddfa26..12b7dd4e 100644 --- a/config/pac.m4 +++ b/config/pac.m4 @@ -1036,7 +1036,7 @@ dnl would fail even when linking in the compiler's library) AC_DEFUN([PAC_BLAS], [ AC_PREREQ(2.50) AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS]) -pac_blas_ok=no +pac_blas_ok=no AC_ARG_WITH(blas, [AC_HELP_STRING([--with-blas=], [use BLAS library ])])