mld2p4-2:

Makefile
 mlprec/mld_c_prec_type.f90
 mlprec/mld_cmlprec_bld.f90
 mlprec/mld_d_prec_type.f90
 mlprec/mld_daggrmat_minnrg_asb.F90
 mlprec/mld_dmlprec_bld.f90
 mlprec/mld_s_prec_type.f90
 mlprec/mld_smlprec_bld.f90
 mlprec/mld_z_prec_type.f90
 mlprec/mld_zmlprec_bld.f90

Fixes for free of linmap. 
Preprocessed sources from testpre.
stopcriterion
Salvatore Filippone 13 years ago
parent 7b2e98e0e2
commit 8059d3b131

@ -9,7 +9,7 @@ libdir:
mlp: mlp:
cd mlprec && $(MAKE) lib cd mlprec && $(MAKE) lib
install: install: all
(./mkdir.sh $(INSTALL_DIR) &&\ (./mkdir.sh $(INSTALL_DIR) &&\
$(INSTALL_DATA) Make.inc $(INSTALL_DIR)/Make.inc.MLD2P4) $(INSTALL_DATA) Make.inc $(INSTALL_DIR)/Make.inc.MLD2P4)
(./mkdir.sh $(INSTALL_LIBDIR) &&\ (./mkdir.sh $(INSTALL_LIBDIR) &&\

@ -664,26 +664,22 @@ contains
info = psb_success_ info = psb_success_
! Actually we might just deallocate the top level array, except ! We might just deallocate the top level array, except
! for the inner UMFPACK or SLU stuff. ! that there are inner objects containing C pointers,
! e.g. UMFPACK, SLU or CUDA stuff.
! We really need FINALs. ! We really need FINALs.
call lv%sm%free(info) call lv%sm%free(info)
call lv%ac%free() call lv%ac%free()
if (psb_is_ok_desc(lv%desc_ac)) & if (psb_is_ok_desc(lv%desc_ac)) &
& call psb_cdfree(lv%desc_ac,info) & call psb_cdfree(lv%desc_ac,info)
call lv%map%free(info)
! This is a pointer to something else, must not free it here. ! This is a pointer to something else, must not free it here.
nullify(lv%base_a) nullify(lv%base_a)
! This is a pointer to something else, must not free it here. ! This is a pointer to something else, must not free it here.
nullify(lv%base_desc) nullify(lv%base_desc)
!
! free explicitly map???
! For now thanks to allocatable semantics
! works anyway.
!
call lv%nullify() call lv%nullify()
end subroutine c_base_onelev_free end subroutine c_base_onelev_free

@ -62,6 +62,17 @@
! of the preconditioner to be built. ! of the preconditioner to be built.
! info - integer, output. ! info - integer, output.
! Error code. ! Error code.
!
! amold - class(psb_c_base_sparse_mat), input, optional
! Mold for the inner format of matrices contained in the
! preconditioner
!
!
! vmold - class(psb_c_base_vect_type), input, optional
! Mold for the inner format of vectors contained in the
! preconditioner
!
!
! !
subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold) subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold)

@ -664,26 +664,22 @@ contains
info = psb_success_ info = psb_success_
! Actually we might just deallocate the top level array, except ! We might just deallocate the top level array, except
! for the inner UMFPACK or SLU stuff. ! that there are inner objects containing C pointers,
! e.g. UMFPACK, SLU or CUDA stuff.
! We really need FINALs. ! We really need FINALs.
call lv%sm%free(info) call lv%sm%free(info)
call lv%ac%free() call lv%ac%free()
if (psb_is_ok_desc(lv%desc_ac)) & if (psb_is_ok_desc(lv%desc_ac)) &
& call psb_cdfree(lv%desc_ac,info) & call psb_cdfree(lv%desc_ac,info)
call lv%map%free(info)
! This is a pointer to something else, must not free it here. ! This is a pointer to something else, must not free it here.
nullify(lv%base_a) nullify(lv%base_a)
! This is a pointer to something else, must not free it here. ! This is a pointer to something else, must not free it here.
nullify(lv%base_desc) nullify(lv%base_desc)
!
! free explicitly map???
! For now thanks to allocatable semantics
! works anyway.
!
call lv%nullify() call lv%nullify()
end subroutine d_base_onelev_free end subroutine d_base_onelev_free

@ -124,11 +124,11 @@ subroutine mld_daggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,p,info)
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt
integer :: ictxt,np,me, err_act, icomm integer :: ictxt,np,me, err_act, icomm
character(len=20) :: name character(len=20) :: name
type(psb_dspmat_type) :: am1,am2, af, ptilde, rtilde, atran, atp, atdatp type(psb_dspmat_type) :: am1, am2, af, ptilde, rtilde, atran, atp, atdatp
type(psb_dspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da type(psb_dspmat_type) :: am3, am4, ap, adap, atmp, rada, ra, atmp2, dap, dadap, da
type(psb_dspmat_type) :: dat, datp, datdatp, atmp3 type(psb_dspmat_type) :: dat, datp, datdatp, atmp3
type(psb_d_coo_sparse_mat) :: acoo, acoof, bcoo, tmpcoo type(psb_d_coo_sparse_mat) :: acoo, acoof, bcoo, tmpcoo
type(psb_d_csr_sparse_mat) :: acsr1, acsr2, acsr3, bcsr, acsr, acsrf type(psb_d_csr_sparse_mat) :: acsr1, acsr2, acsr3, acsrf
type(psb_d_csc_sparse_mat) :: csc_dap, csc_dadap, csc_datp, csc_datdatp, acsc type(psb_d_csc_sparse_mat) :: csc_dap, csc_dadap, csc_datp, csc_datdatp, acsc
real(psb_dpk_), allocatable :: adiag(:), omf(:),omp(:),omi(:),& real(psb_dpk_), allocatable :: adiag(:), omf(:),omp(:),omi(:),&
& oden(:), adinv(:) & oden(:), adinv(:)
@ -625,14 +625,14 @@ subroutine mld_daggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,p,info)
call p%ac%cscnv(info,type='csr') call p%ac%cscnv(info,type='csr')
if (np>1) then if (np>1) then
call am1%mv_to(acsr) call am1%mv_to(acsr1)
nzl = acsr%get_nzeros() nzl = acsr1%get_nzeros()
call psb_glob_to_loc(acsr%ja(1:nzl),p%desc_ac,info,'I') call psb_glob_to_loc(acsr1%ja(1:nzl),p%desc_ac,info,'I')
if (info /= psb_success_) then if (info /= psb_success_) then
call psb_errpush(psb_err_from_subroutine_,name,a_err='psb_glob_to_loc') call psb_errpush(psb_err_from_subroutine_,name,a_err='psb_glob_to_loc')
goto 9999 goto 9999
end if end if
call am1%mv_from(acsr) call am1%mv_from(acsr1)
endif endif
call am1%set_ncols(p%desc_ac%get_local_cols()) call am1%set_ncols(p%desc_ac%get_local_cols())

@ -62,6 +62,17 @@
! of the preconditioner to be built. ! of the preconditioner to be built.
! info - integer, output. ! info - integer, output.
! Error code. ! Error code.
!
! amold - class(psb_d_base_sparse_mat), input, optional
! Mold for the inner format of matrices contained in the
! preconditioner
!
!
! vmold - class(psb_d_base_vect_type), input, optional
! Mold for the inner format of vectors contained in the
! preconditioner
!
!
! !
subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold) subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold)

@ -664,26 +664,22 @@ contains
info = psb_success_ info = psb_success_
! Actually we might just deallocate the top level array, except ! We might just deallocate the top level array, except
! for the inner UMFPACK or SLU stuff. ! that there are inner objects containing C pointers,
! e.g. UMFPACK, SLU or CUDA stuff.
! We really need FINALs. ! We really need FINALs.
call lv%sm%free(info) call lv%sm%free(info)
call lv%ac%free() call lv%ac%free()
if (psb_is_ok_desc(lv%desc_ac)) & if (psb_is_ok_desc(lv%desc_ac)) &
& call psb_cdfree(lv%desc_ac,info) & call psb_cdfree(lv%desc_ac,info)
call lv%map%free(info)
! This is a pointer to something else, must not free it here. ! This is a pointer to something else, must not free it here.
nullify(lv%base_a) nullify(lv%base_a)
! This is a pointer to something else, must not free it here. ! This is a pointer to something else, must not free it here.
nullify(lv%base_desc) nullify(lv%base_desc)
!
! free explicitly map???
! For now thanks to allocatable semantics
! works anyway.
!
call lv%nullify() call lv%nullify()
end subroutine s_base_onelev_free end subroutine s_base_onelev_free

@ -62,6 +62,17 @@
! of the preconditioner to be built. ! of the preconditioner to be built.
! info - integer, output. ! info - integer, output.
! Error code. ! Error code.
!
! amold - class(psb_s_base_sparse_mat), input, optional
! Mold for the inner format of matrices contained in the
! preconditioner
!
!
! vmold - class(psb_s_base_vect_type), input, optional
! Mold for the inner format of vectors contained in the
! preconditioner
!
!
! !
subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold) subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold)

@ -664,26 +664,22 @@ contains
info = psb_success_ info = psb_success_
! Actually we might just deallocate the top level array, except ! We might just deallocate the top level array, except
! for the inner UMFPACK or SLU stuff. ! that there are inner objects containing C pointers,
! e.g. UMFPACK, SLU or CUDA stuff.
! We really need FINALs. ! We really need FINALs.
call lv%sm%free(info) call lv%sm%free(info)
call lv%ac%free() call lv%ac%free()
if (psb_is_ok_desc(lv%desc_ac)) & if (psb_is_ok_desc(lv%desc_ac)) &
& call psb_cdfree(lv%desc_ac,info) & call psb_cdfree(lv%desc_ac,info)
call lv%map%free(info)
! This is a pointer to something else, must not free it here. ! This is a pointer to something else, must not free it here.
nullify(lv%base_a) nullify(lv%base_a)
! This is a pointer to something else, must not free it here. ! This is a pointer to something else, must not free it here.
nullify(lv%base_desc) nullify(lv%base_desc)
!
! free explicitly map???
! For now thanks to allocatable semantics
! works anyway.
!
call lv%nullify() call lv%nullify()
end subroutine z_base_onelev_free end subroutine z_base_onelev_free

@ -62,6 +62,17 @@
! of the preconditioner to be built. ! of the preconditioner to be built.
! info - integer, output. ! info - integer, output.
! Error code. ! Error code.
!
! amold - class(psb_z_base_sparse_mat), input, optional
! Mold for the inner format of matrices contained in the
! preconditioner
!
!
! vmold - class(psb_z_base_vect_type), input, optional
! Mold for the inner format of vectors contained in the
! preconditioner
!
!
! !
subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold) subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold)

Loading…
Cancel
Save