From dffb9148293c12abcd4862c956f58dee4ce4545a Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 9 May 2012 16:04:06 +0000 Subject: [PATCH] psblas3 prec/psb_c_bjacprec.f90 prec/psb_d_bjacprec.f90 prec/psb_s_bjacprec.f90 prec/psb_z_bjacprec.f90 Fix leaky free method. --- prec/psb_c_bjacprec.f90 | 30 +++--------------------------- prec/psb_d_bjacprec.f90 | 30 +++--------------------------- prec/psb_s_bjacprec.f90 | 30 +++--------------------------- prec/psb_z_bjacprec.f90 | 30 +++--------------------------- 4 files changed, 12 insertions(+), 108 deletions(-) diff --git a/prec/psb_c_bjacprec.f90 b/prec/psb_c_bjacprec.f90 index 70935466..b85caa57 100644 --- a/prec/psb_c_bjacprec.f90 +++ b/prec/psb_c_bjacprec.f90 @@ -100,33 +100,6 @@ module psb_c_bjacprec end subroutine psb_c_bjac_precseti end interface -!!$ interface -!!$ subroutine psb_c_bjac_precsetr(prec,what,val,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_c_bjac_prec_type, psb_c_vect_type, psb_spk_ -!!$ class(psb_c_bjac_prec_type),intent(inout) :: prec -!!$ integer(psb_ipk_), intent(in) :: what -!!$ real(psb_spk_), intent(in) :: val -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_c_bjac_precsetr -!!$ end interface -!!$ -!!$ interface -!!$ subroutine psb_c_bjac_precsetc(prec,what,val,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_c_bjac_prec_type, psb_c_vect_type, psb_spk_ -!!$ class(psb_c_bjac_prec_type),intent(inout) :: prec -!!$ integer(psb_ipk_), intent(in) :: what -!!$ character(len=*), intent(in) :: val -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_c_bjac_precsetc -!!$ end interface -!!$ -!!$ interface -!!$ subroutine psb_c_bjac_precfree(prec,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_c_bjac_prec_type, psb_c_vect_type, psb_spk_ -!!$ class(psb_c_bjac_prec_type), intent(inout) :: prec -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_c_bjac_precfree -!!$ end interface contains @@ -284,6 +257,9 @@ contains call prec%dv%free(info) if (info == 0) deallocate(prec%dv,stat=info) end if + if (allocated(prec%iprcparm)) then + deallocate(prec%iprcparm,stat=info) + end if call psb_erractionrestore(err_act) return diff --git a/prec/psb_d_bjacprec.f90 b/prec/psb_d_bjacprec.f90 index 86994b10..903aca67 100644 --- a/prec/psb_d_bjacprec.f90 +++ b/prec/psb_d_bjacprec.f90 @@ -100,33 +100,6 @@ module psb_d_bjacprec end subroutine psb_d_bjac_precseti end interface -!!$ interface -!!$ subroutine psb_d_bjac_precsetr(prec,what,val,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_d_bjac_prec_type, psb_d_vect_type, psb_dpk_ -!!$ class(psb_d_bjac_prec_type),intent(inout) :: prec -!!$ integer(psb_ipk_), intent(in) :: what -!!$ real(psb_dpk_), intent(in) :: val -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_d_bjac_precsetr -!!$ end interface -!!$ -!!$ interface -!!$ subroutine psb_d_bjac_precsetc(prec,what,val,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_d_bjac_prec_type, psb_d_vect_type, psb_dpk_ -!!$ class(psb_d_bjac_prec_type),intent(inout) :: prec -!!$ integer(psb_ipk_), intent(in) :: what -!!$ character(len=*), intent(in) :: val -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_d_bjac_precsetc -!!$ end interface -!!$ -!!$ interface -!!$ subroutine psb_d_bjac_precfree(prec,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_d_bjac_prec_type, psb_d_vect_type, psb_dpk_ -!!$ class(psb_d_bjac_prec_type), intent(inout) :: prec -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_d_bjac_precfree -!!$ end interface contains @@ -284,6 +257,9 @@ contains call prec%dv%free(info) if (info == 0) deallocate(prec%dv,stat=info) end if + if (allocated(prec%iprcparm)) then + deallocate(prec%iprcparm,stat=info) + end if call psb_erractionrestore(err_act) return diff --git a/prec/psb_s_bjacprec.f90 b/prec/psb_s_bjacprec.f90 index eb308f51..77703d91 100644 --- a/prec/psb_s_bjacprec.f90 +++ b/prec/psb_s_bjacprec.f90 @@ -100,33 +100,6 @@ module psb_s_bjacprec end subroutine psb_s_bjac_precseti end interface -!!$ interface -!!$ subroutine psb_s_bjac_precsetr(prec,what,val,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_s_bjac_prec_type, psb_s_vect_type, psb_spk_ -!!$ class(psb_s_bjac_prec_type),intent(inout) :: prec -!!$ integer(psb_ipk_), intent(in) :: what -!!$ real(psb_spk_), intent(in) :: val -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_s_bjac_precsetr -!!$ end interface -!!$ -!!$ interface -!!$ subroutine psb_s_bjac_precsetc(prec,what,val,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_s_bjac_prec_type, psb_s_vect_type, psb_spk_ -!!$ class(psb_s_bjac_prec_type),intent(inout) :: prec -!!$ integer(psb_ipk_), intent(in) :: what -!!$ character(len=*), intent(in) :: val -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_s_bjac_precsetc -!!$ end interface -!!$ -!!$ interface -!!$ subroutine psb_s_bjac_precfree(prec,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_s_bjac_prec_type, psb_s_vect_type, psb_spk_ -!!$ class(psb_s_bjac_prec_type), intent(inout) :: prec -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_s_bjac_precfree -!!$ end interface contains @@ -284,6 +257,9 @@ contains call prec%dv%free(info) if (info == 0) deallocate(prec%dv,stat=info) end if + if (allocated(prec%iprcparm)) then + deallocate(prec%iprcparm,stat=info) + end if call psb_erractionrestore(err_act) return diff --git a/prec/psb_z_bjacprec.f90 b/prec/psb_z_bjacprec.f90 index f4bd7980..235ea44c 100644 --- a/prec/psb_z_bjacprec.f90 +++ b/prec/psb_z_bjacprec.f90 @@ -100,33 +100,6 @@ module psb_z_bjacprec end subroutine psb_z_bjac_precseti end interface -!!$ interface -!!$ subroutine psb_z_bjac_precsetr(prec,what,val,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_z_bjac_prec_type, psb_z_vect_type, psb_dpk_ -!!$ class(psb_z_bjac_prec_type),intent(inout) :: prec -!!$ integer(psb_ipk_), intent(in) :: what -!!$ real(psb_dpk_), intent(in) :: val -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_z_bjac_precsetr -!!$ end interface -!!$ -!!$ interface -!!$ subroutine psb_z_bjac_precsetc(prec,what,val,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_z_bjac_prec_type, psb_z_vect_type, psb_dpk_ -!!$ class(psb_z_bjac_prec_type),intent(inout) :: prec -!!$ integer(psb_ipk_), intent(in) :: what -!!$ character(len=*), intent(in) :: val -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_z_bjac_precsetc -!!$ end interface -!!$ -!!$ interface -!!$ subroutine psb_z_bjac_precfree(prec,info) -!!$ import :: psb_ipk_, psb_desc_type, psb_z_bjac_prec_type, psb_z_vect_type, psb_dpk_ -!!$ class(psb_z_bjac_prec_type), intent(inout) :: prec -!!$ integer(psb_ipk_), intent(out) :: info -!!$ end subroutine psb_z_bjac_precfree -!!$ end interface contains @@ -284,6 +257,9 @@ contains call prec%dv%free(info) if (info == 0) deallocate(prec%dv,stat=info) end if + if (allocated(prec%iprcparm)) then + deallocate(prec%iprcparm,stat=info) + end if call psb_erractionrestore(err_act) return