New clear_defaults function, use it in psb_exit

pizdaint-runs
Salvatore Filippone 5 years ago
parent c9cfb1bb06
commit f499ffb203

@ -417,7 +417,9 @@ contains
end subroutine psb_init_mpik end subroutine psb_init_mpik
subroutine psb_exit_mpik(ictxt,close) subroutine psb_exit_mpik(ictxt,close)
use psi_comm_buffers_mod use psi_comm_buffers_mod
use psb_mat_mod
use psb_vect_mod
! !$ use psb_rsb_mod ! !$ use psb_rsb_mod
#ifdef MPI_MOD #ifdef MPI_MOD
use mpi use mpi
@ -463,8 +465,10 @@ contains
end if end if
if (close_) call mpi_finalize(info) if (close_) call mpi_finalize(info)
#endif
#endif
if (close_) call psb_clear_vect_defaults()
if (close_) call psb_clear_mat_defaults()
end subroutine psb_exit_mpik end subroutine psb_exit_mpik

@ -445,7 +445,6 @@ module psb_c_mat_mod
module procedure psb_lc_get_mat_default module procedure psb_lc_get_mat_default
end interface end interface
! == =================================== ! == ===================================
! !
! !
@ -1872,6 +1871,14 @@ contains
end function psb_c_get_base_mat_default end function psb_c_get_base_mat_default
subroutine psb_c_clear_mat_default()
implicit none
if (allocated(psb_c_base_mat_default)) then
deallocate(psb_c_base_mat_default)
end if
end subroutine psb_c_clear_mat_default
@ -2382,6 +2389,14 @@ contains
end function psb_lc_get_base_mat_default end function psb_lc_get_base_mat_default
subroutine psb_lc_clear_mat_default()
implicit none
if (allocated(psb_lc_base_mat_default)) then
deallocate(psb_lc_base_mat_default)
end if
end subroutine psb_lc_clear_mat_default

@ -161,6 +161,14 @@ contains
end function psb_c_get_vect_default end function psb_c_get_vect_default
subroutine psb_c_clear_vect_default()
implicit none
if (allocated(psb_c_base_vect_default)) then
deallocate(psb_c_base_vect_default)
end if
end subroutine psb_c_clear_vect_default
function psb_c_get_base_vect_default() result(res) function psb_c_get_base_vect_default() result(res)
implicit none implicit none
@ -174,7 +182,6 @@ contains
end function psb_c_get_base_vect_default end function psb_c_get_base_vect_default
subroutine c_vect_clone(x,y,info) subroutine c_vect_clone(x,y,info)
implicit none implicit none
class(psb_c_vect_type), intent(inout) :: x class(psb_c_vect_type), intent(inout) :: x
@ -229,7 +236,6 @@ contains
end subroutine c_vect_bld_mn end subroutine c_vect_bld_mn
subroutine c_vect_bld_en(x,n,mold) subroutine c_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n integer(psb_epk_), intent(in) :: n
class(psb_c_vect_type), intent(inout) :: x class(psb_c_vect_type), intent(inout) :: x

@ -445,7 +445,6 @@ module psb_d_mat_mod
module procedure psb_ld_get_mat_default module procedure psb_ld_get_mat_default
end interface end interface
! == =================================== ! == ===================================
! !
! !
@ -1872,6 +1871,14 @@ contains
end function psb_d_get_base_mat_default end function psb_d_get_base_mat_default
subroutine psb_d_clear_mat_default()
implicit none
if (allocated(psb_d_base_mat_default)) then
deallocate(psb_d_base_mat_default)
end if
end subroutine psb_d_clear_mat_default
@ -2382,6 +2389,14 @@ contains
end function psb_ld_get_base_mat_default end function psb_ld_get_base_mat_default
subroutine psb_ld_clear_mat_default()
implicit none
if (allocated(psb_ld_base_mat_default)) then
deallocate(psb_ld_base_mat_default)
end if
end subroutine psb_ld_clear_mat_default

@ -161,6 +161,14 @@ contains
end function psb_d_get_vect_default end function psb_d_get_vect_default
subroutine psb_d_clear_vect_default()
implicit none
if (allocated(psb_d_base_vect_default)) then
deallocate(psb_d_base_vect_default)
end if
end subroutine psb_d_clear_vect_default
function psb_d_get_base_vect_default() result(res) function psb_d_get_base_vect_default() result(res)
implicit none implicit none
@ -174,7 +182,6 @@ contains
end function psb_d_get_base_vect_default end function psb_d_get_base_vect_default
subroutine d_vect_clone(x,y,info) subroutine d_vect_clone(x,y,info)
implicit none implicit none
class(psb_d_vect_type), intent(inout) :: x class(psb_d_vect_type), intent(inout) :: x
@ -229,7 +236,6 @@ contains
end subroutine d_vect_bld_mn end subroutine d_vect_bld_mn
subroutine d_vect_bld_en(x,n,mold) subroutine d_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n integer(psb_epk_), intent(in) :: n
class(psb_d_vect_type), intent(inout) :: x class(psb_d_vect_type), intent(inout) :: x

@ -134,6 +134,14 @@ contains
end function psb_i_get_vect_default end function psb_i_get_vect_default
subroutine psb_i_clear_vect_default()
implicit none
if (allocated(psb_i_base_vect_default)) then
deallocate(psb_i_base_vect_default)
end if
end subroutine psb_i_clear_vect_default
function psb_i_get_base_vect_default() result(res) function psb_i_get_base_vect_default() result(res)
implicit none implicit none
@ -147,7 +155,6 @@ contains
end function psb_i_get_base_vect_default end function psb_i_get_base_vect_default
subroutine i_vect_clone(x,y,info) subroutine i_vect_clone(x,y,info)
implicit none implicit none
class(psb_i_vect_type), intent(inout) :: x class(psb_i_vect_type), intent(inout) :: x
@ -202,7 +209,6 @@ contains
end subroutine i_vect_bld_mn end subroutine i_vect_bld_mn
subroutine i_vect_bld_en(x,n,mold) subroutine i_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n integer(psb_epk_), intent(in) :: n
class(psb_i_vect_type), intent(inout) :: x class(psb_i_vect_type), intent(inout) :: x

@ -135,6 +135,14 @@ contains
end function psb_l_get_vect_default end function psb_l_get_vect_default
subroutine psb_l_clear_vect_default()
implicit none
if (allocated(psb_l_base_vect_default)) then
deallocate(psb_l_base_vect_default)
end if
end subroutine psb_l_clear_vect_default
function psb_l_get_base_vect_default() result(res) function psb_l_get_base_vect_default() result(res)
implicit none implicit none
@ -148,7 +156,6 @@ contains
end function psb_l_get_base_vect_default end function psb_l_get_base_vect_default
subroutine l_vect_clone(x,y,info) subroutine l_vect_clone(x,y,info)
implicit none implicit none
class(psb_l_vect_type), intent(inout) :: x class(psb_l_vect_type), intent(inout) :: x
@ -203,7 +210,6 @@ contains
end subroutine l_vect_bld_mn end subroutine l_vect_bld_mn
subroutine l_vect_bld_en(x,n,mold) subroutine l_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n integer(psb_epk_), intent(in) :: n
class(psb_l_vect_type), intent(inout) :: x class(psb_l_vect_type), intent(inout) :: x

@ -23,4 +23,11 @@ contains
end subroutine psb_init_mat_defaults end subroutine psb_init_mat_defaults
subroutine psb_clear_mat_defaults()
call psb_s_clear_mat_default()
call psb_d_clear_mat_default()
call psb_c_clear_mat_default()
call psb_z_clear_mat_default()
end subroutine psb_clear_mat_defaults
end module psb_mat_mod end module psb_mat_mod

@ -445,7 +445,6 @@ module psb_s_mat_mod
module procedure psb_ls_get_mat_default module procedure psb_ls_get_mat_default
end interface end interface
! == =================================== ! == ===================================
! !
! !
@ -1872,6 +1871,14 @@ contains
end function psb_s_get_base_mat_default end function psb_s_get_base_mat_default
subroutine psb_s_clear_mat_default()
implicit none
if (allocated(psb_s_base_mat_default)) then
deallocate(psb_s_base_mat_default)
end if
end subroutine psb_s_clear_mat_default
@ -2382,6 +2389,14 @@ contains
end function psb_ls_get_base_mat_default end function psb_ls_get_base_mat_default
subroutine psb_ls_clear_mat_default()
implicit none
if (allocated(psb_ls_base_mat_default)) then
deallocate(psb_ls_base_mat_default)
end if
end subroutine psb_ls_clear_mat_default

@ -161,6 +161,14 @@ contains
end function psb_s_get_vect_default end function psb_s_get_vect_default
subroutine psb_s_clear_vect_default()
implicit none
if (allocated(psb_s_base_vect_default)) then
deallocate(psb_s_base_vect_default)
end if
end subroutine psb_s_clear_vect_default
function psb_s_get_base_vect_default() result(res) function psb_s_get_base_vect_default() result(res)
implicit none implicit none
@ -174,7 +182,6 @@ contains
end function psb_s_get_base_vect_default end function psb_s_get_base_vect_default
subroutine s_vect_clone(x,y,info) subroutine s_vect_clone(x,y,info)
implicit none implicit none
class(psb_s_vect_type), intent(inout) :: x class(psb_s_vect_type), intent(inout) :: x
@ -229,7 +236,6 @@ contains
end subroutine s_vect_bld_mn end subroutine s_vect_bld_mn
subroutine s_vect_bld_en(x,n,mold) subroutine s_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n integer(psb_epk_), intent(in) :: n
class(psb_s_vect_type), intent(inout) :: x class(psb_s_vect_type), intent(inout) :: x

@ -36,4 +36,16 @@ contains
end subroutine psb_init_vect_defaults end subroutine psb_init_vect_defaults
subroutine psb_clear_vect_defaults()
implicit none
call psb_i_clear_vect_default()
call psb_l_clear_vect_default()
call psb_s_clear_vect_default()
call psb_d_clear_vect_default()
call psb_c_clear_vect_default()
call psb_z_clear_vect_default()
end subroutine psb_clear_vect_defaults
end module psb_vect_mod end module psb_vect_mod

@ -445,7 +445,6 @@ module psb_z_mat_mod
module procedure psb_lz_get_mat_default module procedure psb_lz_get_mat_default
end interface end interface
! == =================================== ! == ===================================
! !
! !
@ -1872,6 +1871,14 @@ contains
end function psb_z_get_base_mat_default end function psb_z_get_base_mat_default
subroutine psb_z_clear_mat_default()
implicit none
if (allocated(psb_z_base_mat_default)) then
deallocate(psb_z_base_mat_default)
end if
end subroutine psb_z_clear_mat_default
@ -2382,6 +2389,14 @@ contains
end function psb_lz_get_base_mat_default end function psb_lz_get_base_mat_default
subroutine psb_lz_clear_mat_default()
implicit none
if (allocated(psb_lz_base_mat_default)) then
deallocate(psb_lz_base_mat_default)
end if
end subroutine psb_lz_clear_mat_default

@ -161,6 +161,14 @@ contains
end function psb_z_get_vect_default end function psb_z_get_vect_default
subroutine psb_z_clear_vect_default()
implicit none
if (allocated(psb_z_base_vect_default)) then
deallocate(psb_z_base_vect_default)
end if
end subroutine psb_z_clear_vect_default
function psb_z_get_base_vect_default() result(res) function psb_z_get_base_vect_default() result(res)
implicit none implicit none
@ -174,7 +182,6 @@ contains
end function psb_z_get_base_vect_default end function psb_z_get_base_vect_default
subroutine z_vect_clone(x,y,info) subroutine z_vect_clone(x,y,info)
implicit none implicit none
class(psb_z_vect_type), intent(inout) :: x class(psb_z_vect_type), intent(inout) :: x
@ -229,7 +236,6 @@ contains
end subroutine z_vect_bld_mn end subroutine z_vect_bld_mn
subroutine z_vect_bld_en(x,n,mold) subroutine z_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n integer(psb_epk_), intent(in) :: n
class(psb_z_vect_type), intent(inout) :: x class(psb_z_vect_type), intent(inout) :: x

Loading…
Cancel
Save