New clear_defaults function, use it in psb_exit

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

@ -418,6 +418,8 @@ contains
subroutine psb_exit_mpik(ictxt,close)
use psi_comm_buffers_mod
use psb_mat_mod
use psb_vect_mod
! !$ use psb_rsb_mod
#ifdef MPI_MOD
use mpi
@ -463,8 +465,10 @@ contains
end if
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

@ -445,7 +445,6 @@ module psb_c_mat_mod
module procedure psb_lc_get_mat_default
end interface
! == ===================================
!
!
@ -1872,6 +1871,14 @@ contains
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
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
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)
implicit none
@ -174,7 +182,6 @@ contains
end function psb_c_get_base_vect_default
subroutine c_vect_clone(x,y,info)
implicit none
class(psb_c_vect_type), intent(inout) :: x
@ -229,7 +236,6 @@ contains
end subroutine c_vect_bld_mn
subroutine c_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n
class(psb_c_vect_type), intent(inout) :: x

@ -445,7 +445,6 @@ module psb_d_mat_mod
module procedure psb_ld_get_mat_default
end interface
! == ===================================
!
!
@ -1872,6 +1871,14 @@ contains
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
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
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)
implicit none
@ -174,7 +182,6 @@ contains
end function psb_d_get_base_vect_default
subroutine d_vect_clone(x,y,info)
implicit none
class(psb_d_vect_type), intent(inout) :: x
@ -229,7 +236,6 @@ contains
end subroutine d_vect_bld_mn
subroutine d_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n
class(psb_d_vect_type), intent(inout) :: x

@ -134,6 +134,14 @@ contains
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)
implicit none
@ -147,7 +155,6 @@ contains
end function psb_i_get_base_vect_default
subroutine i_vect_clone(x,y,info)
implicit none
class(psb_i_vect_type), intent(inout) :: x
@ -202,7 +209,6 @@ contains
end subroutine i_vect_bld_mn
subroutine i_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n
class(psb_i_vect_type), intent(inout) :: x

@ -135,6 +135,14 @@ contains
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)
implicit none
@ -148,7 +156,6 @@ contains
end function psb_l_get_base_vect_default
subroutine l_vect_clone(x,y,info)
implicit none
class(psb_l_vect_type), intent(inout) :: x
@ -203,7 +210,6 @@ contains
end subroutine l_vect_bld_mn
subroutine l_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n
class(psb_l_vect_type), intent(inout) :: x

@ -23,4 +23,11 @@ contains
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

@ -445,7 +445,6 @@ module psb_s_mat_mod
module procedure psb_ls_get_mat_default
end interface
! == ===================================
!
!
@ -1872,6 +1871,14 @@ contains
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
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
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)
implicit none
@ -174,7 +182,6 @@ contains
end function psb_s_get_base_vect_default
subroutine s_vect_clone(x,y,info)
implicit none
class(psb_s_vect_type), intent(inout) :: x
@ -229,7 +236,6 @@ contains
end subroutine s_vect_bld_mn
subroutine s_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n
class(psb_s_vect_type), intent(inout) :: x

@ -36,4 +36,16 @@ contains
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

@ -445,7 +445,6 @@ module psb_z_mat_mod
module procedure psb_lz_get_mat_default
end interface
! == ===================================
!
!
@ -1872,6 +1871,14 @@ contains
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
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
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)
implicit none
@ -174,7 +182,6 @@ contains
end function psb_z_get_base_vect_default
subroutine z_vect_clone(x,y,info)
implicit none
class(psb_z_vect_type), intent(inout) :: x
@ -229,7 +236,6 @@ contains
end subroutine z_vect_bld_mn
subroutine z_vect_bld_en(x,n,mold)
integer(psb_epk_), intent(in) :: n
class(psb_z_vect_type), intent(inout) :: x

Loading…
Cancel
Save