Added clear_data to diag solver

pizdaint-runs
Salvatore Filippone 5 years ago
parent dad39223ec
commit 07a2a97b13

@ -26,6 +26,7 @@ mld_c_diag_solver_apply_vect.o \
mld_c_diag_solver_bld.o \
mld_c_diag_solver_dmp.o \
mld_c_diag_solver_clone.o \
mld_c_diag_solver_clear_data.o \
mld_c_diag_solver_cnv.o \
mld_c_gs_solver_bld.o \
mld_c_gs_solver_clone.o \
@ -70,6 +71,7 @@ mld_d_diag_solver_apply_vect.o \
mld_d_diag_solver_bld.o \
mld_d_diag_solver_dmp.o \
mld_d_diag_solver_clone.o \
mld_d_diag_solver_clear_data.o \
mld_d_diag_solver_cnv.o \
mld_d_bwgs_solver_bld.o \
mld_d_bwgs_solver_apply.o \
@ -114,6 +116,7 @@ mld_s_diag_solver_apply_vect.o \
mld_s_diag_solver_bld.o \
mld_s_diag_solver_dmp.o \
mld_s_diag_solver_clone.o \
mld_s_diag_solver_clear_data.o \
mld_s_diag_solver_cnv.o \
mld_s_gs_solver_bld.o \
mld_s_gs_solver_clone.o \
@ -158,6 +161,7 @@ mld_z_diag_solver_apply_vect.o \
mld_z_diag_solver_bld.o \
mld_z_diag_solver_dmp.o \
mld_z_diag_solver_clone.o \
mld_z_diag_solver_clear_data.o \
mld_z_diag_solver_cnv.o \
mld_z_gs_solver_bld.o \
mld_z_gs_solver_clone.o \

@ -0,0 +1,65 @@
!
!
! MLD2P4 version 2.2
! MultiLevel Domain Decomposition Parallel Preconditioners Package
! based on PSBLAS (Parallel Sparse BLAS version 3.5)
!
! (C) Copyright 2008-2018
!
! Salvatore Filippone
! Pasqua D'Ambra
! Daniela di Serafino
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions
! are met:
! 1. Redistributions of source code must retain the above copyright
! notice, this list of conditions and the following disclaimer.
! 2. Redistributions in binary form must reproduce the above copyright
! notice, this list of conditions, and the following disclaimer in the
! documentation and/or other materials provided with the distribution.
! 3. The name of the MLD2P4 group or the names of its contributors may
! not be used to endorse or promote products derived from this
! software without specific written permission.
!
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_c_diag_solver_clear_data(sv,info)
use psb_base_mod
use mld_c_diag_solver, mld_protect_name => mld_c_diag_solver_clear_data
Implicit None
! Arguments
class(mld_c_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
! Local variables
integer(psb_ipk_) :: err_act
info=psb_success_
call psb_erractionsave(err_act)
call sv%dv%free(info)
if ((info ==0).and.allocated(sv%d)) deallocate(sv%d,stat=info)
if (info /= 0) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine mld_c_diag_solver_clear_data

@ -0,0 +1,65 @@
!
!
! MLD2P4 version 2.2
! MultiLevel Domain Decomposition Parallel Preconditioners Package
! based on PSBLAS (Parallel Sparse BLAS version 3.5)
!
! (C) Copyright 2008-2018
!
! Salvatore Filippone
! Pasqua D'Ambra
! Daniela di Serafino
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions
! are met:
! 1. Redistributions of source code must retain the above copyright
! notice, this list of conditions and the following disclaimer.
! 2. Redistributions in binary form must reproduce the above copyright
! notice, this list of conditions, and the following disclaimer in the
! documentation and/or other materials provided with the distribution.
! 3. The name of the MLD2P4 group or the names of its contributors may
! not be used to endorse or promote products derived from this
! software without specific written permission.
!
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_d_diag_solver_clear_data(sv,info)
use psb_base_mod
use mld_d_diag_solver, mld_protect_name => mld_d_diag_solver_clear_data
Implicit None
! Arguments
class(mld_d_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
! Local variables
integer(psb_ipk_) :: err_act
info=psb_success_
call psb_erractionsave(err_act)
call sv%dv%free(info)
if ((info ==0).and.allocated(sv%d)) deallocate(sv%d,stat=info)
if (info /= 0) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine mld_d_diag_solver_clear_data

@ -0,0 +1,65 @@
!
!
! MLD2P4 version 2.2
! MultiLevel Domain Decomposition Parallel Preconditioners Package
! based on PSBLAS (Parallel Sparse BLAS version 3.5)
!
! (C) Copyright 2008-2018
!
! Salvatore Filippone
! Pasqua D'Ambra
! Daniela di Serafino
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions
! are met:
! 1. Redistributions of source code must retain the above copyright
! notice, this list of conditions and the following disclaimer.
! 2. Redistributions in binary form must reproduce the above copyright
! notice, this list of conditions, and the following disclaimer in the
! documentation and/or other materials provided with the distribution.
! 3. The name of the MLD2P4 group or the names of its contributors may
! not be used to endorse or promote products derived from this
! software without specific written permission.
!
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_s_diag_solver_clear_data(sv,info)
use psb_base_mod
use mld_s_diag_solver, mld_protect_name => mld_s_diag_solver_clear_data
Implicit None
! Arguments
class(mld_s_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
! Local variables
integer(psb_ipk_) :: err_act
info=psb_success_
call psb_erractionsave(err_act)
call sv%dv%free(info)
if ((info ==0).and.allocated(sv%d)) deallocate(sv%d,stat=info)
if (info /= 0) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine mld_s_diag_solver_clear_data

@ -0,0 +1,65 @@
!
!
! MLD2P4 version 2.2
! MultiLevel Domain Decomposition Parallel Preconditioners Package
! based on PSBLAS (Parallel Sparse BLAS version 3.5)
!
! (C) Copyright 2008-2018
!
! Salvatore Filippone
! Pasqua D'Ambra
! Daniela di Serafino
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions
! are met:
! 1. Redistributions of source code must retain the above copyright
! notice, this list of conditions and the following disclaimer.
! 2. Redistributions in binary form must reproduce the above copyright
! notice, this list of conditions, and the following disclaimer in the
! documentation and/or other materials provided with the distribution.
! 3. The name of the MLD2P4 group or the names of its contributors may
! not be used to endorse or promote products derived from this
! software without specific written permission.
!
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_z_diag_solver_clear_data(sv,info)
use psb_base_mod
use mld_z_diag_solver, mld_protect_name => mld_z_diag_solver_clear_data
Implicit None
! Arguments
class(mld_z_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
! Local variables
integer(psb_ipk_) :: err_act
info=psb_success_
call psb_erractionsave(err_act)
call sv%dv%free(info)
if ((info ==0).and.allocated(sv%d)) deallocate(sv%d,stat=info)
if (info /= 0) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine mld_z_diag_solver_clear_data

@ -58,6 +58,7 @@ module mld_c_diag_solver
procedure, pass(sv) :: build => mld_c_diag_solver_bld
procedure, pass(sv) :: cnv => mld_c_diag_solver_cnv
procedure, pass(sv) :: clone => mld_c_diag_solver_clone
procedure, pass(sv) :: clear_data => mld_c_diag_solver_clear_data
procedure, pass(sv) :: apply_v => mld_c_diag_solver_apply_vect
procedure, pass(sv) :: apply_a => mld_c_diag_solver_apply
procedure, pass(sv) :: free => c_diag_solver_free
@ -169,6 +170,19 @@ module mld_c_diag_solver
integer(psb_ipk_), intent(out) :: info
end subroutine mld_c_diag_solver_clone
end interface
interface
subroutine mld_c_diag_solver_clear_data(sv,info)
import :: psb_desc_type, psb_cspmat_type, psb_c_base_sparse_mat, &
& psb_c_vect_type, psb_c_base_vect_type, psb_spk_, &
& mld_c_diag_solver_type, psb_ipk_
Implicit None
! Arguments
class(mld_c_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
end subroutine mld_c_diag_solver_clear_data
end interface
contains

@ -58,6 +58,7 @@ module mld_d_diag_solver
procedure, pass(sv) :: build => mld_d_diag_solver_bld
procedure, pass(sv) :: cnv => mld_d_diag_solver_cnv
procedure, pass(sv) :: clone => mld_d_diag_solver_clone
procedure, pass(sv) :: clear_data => mld_d_diag_solver_clear_data
procedure, pass(sv) :: apply_v => mld_d_diag_solver_apply_vect
procedure, pass(sv) :: apply_a => mld_d_diag_solver_apply
procedure, pass(sv) :: free => d_diag_solver_free
@ -169,6 +170,19 @@ module mld_d_diag_solver
integer(psb_ipk_), intent(out) :: info
end subroutine mld_d_diag_solver_clone
end interface
interface
subroutine mld_d_diag_solver_clear_data(sv,info)
import :: psb_desc_type, psb_dspmat_type, psb_d_base_sparse_mat, &
& psb_d_vect_type, psb_d_base_vect_type, psb_dpk_, &
& mld_d_diag_solver_type, psb_ipk_
Implicit None
! Arguments
class(mld_d_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
end subroutine mld_d_diag_solver_clear_data
end interface
contains

@ -58,6 +58,7 @@ module mld_s_diag_solver
procedure, pass(sv) :: build => mld_s_diag_solver_bld
procedure, pass(sv) :: cnv => mld_s_diag_solver_cnv
procedure, pass(sv) :: clone => mld_s_diag_solver_clone
procedure, pass(sv) :: clear_data => mld_s_diag_solver_clear_data
procedure, pass(sv) :: apply_v => mld_s_diag_solver_apply_vect
procedure, pass(sv) :: apply_a => mld_s_diag_solver_apply
procedure, pass(sv) :: free => s_diag_solver_free
@ -169,6 +170,19 @@ module mld_s_diag_solver
integer(psb_ipk_), intent(out) :: info
end subroutine mld_s_diag_solver_clone
end interface
interface
subroutine mld_s_diag_solver_clear_data(sv,info)
import :: psb_desc_type, psb_sspmat_type, psb_s_base_sparse_mat, &
& psb_s_vect_type, psb_s_base_vect_type, psb_spk_, &
& mld_s_diag_solver_type, psb_ipk_
Implicit None
! Arguments
class(mld_s_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
end subroutine mld_s_diag_solver_clear_data
end interface
contains

@ -58,6 +58,7 @@ module mld_z_diag_solver
procedure, pass(sv) :: build => mld_z_diag_solver_bld
procedure, pass(sv) :: cnv => mld_z_diag_solver_cnv
procedure, pass(sv) :: clone => mld_z_diag_solver_clone
procedure, pass(sv) :: clear_data => mld_z_diag_solver_clear_data
procedure, pass(sv) :: apply_v => mld_z_diag_solver_apply_vect
procedure, pass(sv) :: apply_a => mld_z_diag_solver_apply
procedure, pass(sv) :: free => z_diag_solver_free
@ -169,6 +170,19 @@ module mld_z_diag_solver
integer(psb_ipk_), intent(out) :: info
end subroutine mld_z_diag_solver_clone
end interface
interface
subroutine mld_z_diag_solver_clear_data(sv,info)
import :: psb_desc_type, psb_zspmat_type, psb_z_base_sparse_mat, &
& psb_z_vect_type, psb_z_base_vect_type, psb_dpk_, &
& mld_z_diag_solver_type, psb_ipk_
Implicit None
! Arguments
class(mld_z_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
end subroutine mld_z_diag_solver_clear_data
end interface
contains

Loading…
Cancel
Save