From caaced3ad1faaf302b54aa07f6d2df413e67b3fe Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Mon, 19 Dec 2011 17:07:15 +0000 Subject: [PATCH] psblas3: util/psb_d_renum_impl.F90 util/psb_renum_mod.f90 Added identity option to renumbering --- Makefile | 2 +- util/psb_d_renum_impl.F90 | 16 +++++++++++++++- util/psb_renum_mod.f90 | 3 ++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4bf8cae5..62951685 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ include Make.inc all: libd based precd kryld utild - (cd opt; $(MAKE) lib) +# (cd opt; $(MAKE) lib) @echo "=====================================" @echo "PSBLAS libraries Compilation Successful." diff --git a/util/psb_d_renum_impl.F90 b/util/psb_d_renum_impl.F90 index 52fccdc2..5feae72b 100644 --- a/util/psb_d_renum_impl.F90 +++ b/util/psb_d_renum_impl.F90 @@ -20,6 +20,8 @@ subroutine psb_d_mat_renums(alg,mat,info,perm) ialg = psb_mat_renum_gps_ case ('AMD') ialg = psb_mat_renum_amd_ + case ('NONE', 'ID') + ialg = psb_mat_renum_identity_ case default write(0,*) 'Unknown algorithm "',psb_toupper(alg),'"' ialg = -1 @@ -54,7 +56,7 @@ subroutine psb_d_mat_renum(alg,mat,info,perm) integer, intent(out) :: info integer, allocatable, optional, intent(out) :: perm(:) - integer :: err_act, nr, nc + integer :: err_act, nr, nc, i character(len=20) :: name info = psb_success_ @@ -80,6 +82,18 @@ subroutine psb_d_mat_renum(alg,mat,info,perm) call psb_mat_renum_amd(mat,info,perm) + case(psb_mat_renum_identity_) + nr = mat%get_nrows() + allocate(perm(nr),stat=info) + if (info == 0) then + do i=1,nr + perm(i) = i + end do + else + info = psb_err_alloc_dealloc_ + call psb_errpush(info,name) + goto 9999 + endif case default info = psb_err_input_value_invalid_i_ call psb_errpush(info,name,i_err=(/1,alg,0,0,0/)) diff --git a/util/psb_renum_mod.f90 b/util/psb_renum_mod.f90 index bc1baa0c..c1741cfc 100644 --- a/util/psb_renum_mod.f90 +++ b/util/psb_renum_mod.f90 @@ -1,9 +1,10 @@ module psb_renum_mod use psb_base_mod + integer, parameter :: psb_mat_renum_identity_ = 0 integer, parameter :: psb_mat_renum_gps_ = 456 integer, parameter :: psb_mat_renum_amd_ = psb_mat_renum_gps_ + 1 - + interface psb_mat_renum subroutine psb_d_mat_renums(alg,mat,info,perm)