Modified implementation for residual check/print

richardson
Cirdans-Home 5 years ago
parent adc5aebd6b
commit d249042ea2

@ -1,15 +1,15 @@
! !
! !
! MLD2P4 version 2.2 ! MLD2P4 version 2.2
! MultiLevel Domain Decomposition Parallel Preconditioners Package ! MultiLevel Domain Decomposition Parallel Preconditioners Package
! based on PSBLAS (Parallel Sparse BLAS version 3.5) ! based on PSBLAS (Parallel Sparse BLAS version 3.5)
! !
! (C) Copyright 2008-2018 ! (C) Copyright 2008-2018
! !
! Salvatore Filippone ! Salvatore Filippone
! Pasqua D'Ambra ! Pasqua D'Ambra
! Daniela di Serafino ! Daniela di Serafino
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions ! modification, are permitted provided that the following conditions
! are met: ! are met:
@ -21,7 +21,7 @@
! 3. The name of the MLD2P4 group or the names of its contributors may ! 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 ! not be used to endorse or promote products derived from this
! software without specific written permission. ! software without specific written permission.
! !
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@ -33,10 +33,10 @@
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ! 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 ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE. ! POSSIBILITY OF SUCH DAMAGE.
! !
! !
subroutine mld_c_jac_smoother_clone(sm,smout,info) subroutine mld_c_jac_smoother_clone(sm,smout,info)
use psb_base_mod use psb_base_mod
use mld_c_jac_smoother, mld_protect_name => mld_c_jac_smoother_clone use mld_c_jac_smoother, mld_protect_name => mld_c_jac_smoother_clone
@ -59,14 +59,19 @@ subroutine mld_c_jac_smoother_clone(sm,smout,info)
end if end if
if (info == psb_success_) & if (info == psb_success_) &
& allocate(mld_c_jac_smoother_type :: smout, stat=info) & allocate(mld_c_jac_smoother_type :: smout, stat=info)
if (info /= 0) then if (info /= 0) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_
goto 9999 goto 9999
end if end if
select type(smo => smout) select type(smo => smout)
type is (mld_c_jac_smoother_type) type is (mld_c_jac_smoother_type)
smo%nd_nnz_tot = sm%nd_nnz_tot smo%nd_nnz_tot = sm%nd_nnz_tot
smo%checkres = sm%checkres
smo%printres = sm%printres
smo%checkiter = sm%checkiter
smo%printiter = sm%printiter
smo%tol = sm%tol
call sm%nd%clone(smo%nd,info) call sm%nd%clone(smo%nd,info)
if ((info==psb_success_).and.(allocated(sm%sv))) then if ((info==psb_success_).and.(allocated(sm%sv))) then
allocate(smout%sv,mold=sm%sv,stat=info) allocate(smout%sv,mold=sm%sv,stat=info)

@ -52,22 +52,27 @@ subroutine mld_c_jac_smoother_csetc(sm,what,val,info,idx)
info = psb_success_ info = psb_success_
call psb_erractionsave(err_act) call psb_erractionsave(err_act)
select case(psb_toupper(trim(what)))
select case(psb_toupper(what)) case('SMOOTHER_STOP')
case('SMOOTHER_STOP') select case(psb_toupper(trim(val)))
if((psb_toupper(trim(val)) == 'T').or.(psb_toupper(trim(val)) == 'TRUE')) then case('T','TRUE')
sm%checkres = .true. sm%checkres = .true.
else case('F','FALSE')
sm%checkres = .false. sm%checkres = .false.
end if case default
case('SMOOTHER_TRACE') write(0,*) 'Unknown value for smoother_stop : "',psb_toupper(trim(val)),'"'
if((psb_toupper(trim(val)) == 'T').or.(psb_toupper(trim(val)) == 'TRUE')) then end select
sm%printres = .true. case('SMOOTHER_TRACE')
else select case(psb_toupper(trim(val)))
sm%printres = .false. case('T','TRUE')
end if sm%printres = .true.
case default case('F','FALSE')
call sm%mld_c_base_smoother_type%set(what,val,info,idx=idx) sm%printres = .false.
case default
write(0,*) 'Unknown value for smoother_trace : "',psb_toupper(trim(val)),'"'
end select
case default
call sm%mld_c_base_smoother_type%set(what,val,info,idx=idx)
end select end select
if (info /= psb_success_) then if (info /= psb_success_) then

@ -1,15 +1,15 @@
! !
! !
! MLD2P4 version 2.2 ! MLD2P4 version 2.2
! MultiLevel Domain Decomposition Parallel Preconditioners Package ! MultiLevel Domain Decomposition Parallel Preconditioners Package
! based on PSBLAS (Parallel Sparse BLAS version 3.5) ! based on PSBLAS (Parallel Sparse BLAS version 3.5)
! !
! (C) Copyright 2008-2018 ! (C) Copyright 2008-2018
! !
! Salvatore Filippone ! Salvatore Filippone
! Pasqua D'Ambra ! Pasqua D'Ambra
! Daniela di Serafino ! Daniela di Serafino
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions ! modification, are permitted provided that the following conditions
! are met: ! are met:
@ -21,7 +21,7 @@
! 3. The name of the MLD2P4 group or the names of its contributors may ! 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 ! not be used to endorse or promote products derived from this
! software without specific written permission. ! software without specific written permission.
! !
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@ -33,10 +33,10 @@
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ! 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 ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE. ! POSSIBILITY OF SUCH DAMAGE.
! !
! !
subroutine mld_d_jac_smoother_clone(sm,smout,info) subroutine mld_d_jac_smoother_clone(sm,smout,info)
use psb_base_mod use psb_base_mod
use mld_d_jac_smoother, mld_protect_name => mld_d_jac_smoother_clone use mld_d_jac_smoother, mld_protect_name => mld_d_jac_smoother_clone
@ -59,14 +59,19 @@ subroutine mld_d_jac_smoother_clone(sm,smout,info)
end if end if
if (info == psb_success_) & if (info == psb_success_) &
& allocate(mld_d_jac_smoother_type :: smout, stat=info) & allocate(mld_d_jac_smoother_type :: smout, stat=info)
if (info /= 0) then if (info /= 0) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_
goto 9999 goto 9999
end if end if
select type(smo => smout) select type(smo => smout)
type is (mld_d_jac_smoother_type) type is (mld_d_jac_smoother_type)
smo%nd_nnz_tot = sm%nd_nnz_tot smo%nd_nnz_tot = sm%nd_nnz_tot
smo%checkres = sm%checkres
smo%printres = sm%printres
smo%checkiter = sm%checkiter
smo%printiter = sm%printiter
smo%tol = sm%tol
call sm%nd%clone(smo%nd,info) call sm%nd%clone(smo%nd,info)
if ((info==psb_success_).and.(allocated(sm%sv))) then if ((info==psb_success_).and.(allocated(sm%sv))) then
allocate(smout%sv,mold=sm%sv,stat=info) allocate(smout%sv,mold=sm%sv,stat=info)

@ -52,22 +52,27 @@ subroutine mld_d_jac_smoother_csetc(sm,what,val,info,idx)
info = psb_success_ info = psb_success_
call psb_erractionsave(err_act) call psb_erractionsave(err_act)
select case(psb_toupper(trim(what)))
select case(psb_toupper(what)) case('SMOOTHER_STOP')
case('SMOOTHER_STOP') select case(psb_toupper(trim(val)))
if((psb_toupper(trim(val)) == 'T').or.(psb_toupper(trim(val)) == 'TRUE')) then case('T','TRUE')
sm%checkres = .true. sm%checkres = .true.
else case('F','FALSE')
sm%checkres = .false. sm%checkres = .false.
end if case default
case('SMOOTHER_TRACE') write(0,*) 'Unknown value for smoother_stop : "',psb_toupper(trim(val)),'"'
if((psb_toupper(trim(val)) == 'T').or.(psb_toupper(trim(val)) == 'TRUE')) then end select
sm%printres = .true. case('SMOOTHER_TRACE')
else select case(psb_toupper(trim(val)))
sm%printres = .false. case('T','TRUE')
end if sm%printres = .true.
case default case('F','FALSE')
call sm%mld_d_base_smoother_type%set(what,val,info,idx=idx) sm%printres = .false.
case default
write(0,*) 'Unknown value for smoother_trace : "',psb_toupper(trim(val)),'"'
end select
case default
call sm%mld_d_base_smoother_type%set(what,val,info,idx=idx)
end select end select
if (info /= psb_success_) then if (info /= psb_success_) then

@ -1,15 +1,15 @@
! !
! !
! MLD2P4 version 2.2 ! MLD2P4 version 2.2
! MultiLevel Domain Decomposition Parallel Preconditioners Package ! MultiLevel Domain Decomposition Parallel Preconditioners Package
! based on PSBLAS (Parallel Sparse BLAS version 3.5) ! based on PSBLAS (Parallel Sparse BLAS version 3.5)
! !
! (C) Copyright 2008-2018 ! (C) Copyright 2008-2018
! !
! Salvatore Filippone ! Salvatore Filippone
! Pasqua D'Ambra ! Pasqua D'Ambra
! Daniela di Serafino ! Daniela di Serafino
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions ! modification, are permitted provided that the following conditions
! are met: ! are met:
@ -21,7 +21,7 @@
! 3. The name of the MLD2P4 group or the names of its contributors may ! 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 ! not be used to endorse or promote products derived from this
! software without specific written permission. ! software without specific written permission.
! !
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@ -33,10 +33,10 @@
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ! 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 ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE. ! POSSIBILITY OF SUCH DAMAGE.
! !
! !
subroutine mld_s_jac_smoother_clone(sm,smout,info) subroutine mld_s_jac_smoother_clone(sm,smout,info)
use psb_base_mod use psb_base_mod
use mld_s_jac_smoother, mld_protect_name => mld_s_jac_smoother_clone use mld_s_jac_smoother, mld_protect_name => mld_s_jac_smoother_clone
@ -59,14 +59,19 @@ subroutine mld_s_jac_smoother_clone(sm,smout,info)
end if end if
if (info == psb_success_) & if (info == psb_success_) &
& allocate(mld_s_jac_smoother_type :: smout, stat=info) & allocate(mld_s_jac_smoother_type :: smout, stat=info)
if (info /= 0) then if (info /= 0) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_
goto 9999 goto 9999
end if end if
select type(smo => smout) select type(smo => smout)
type is (mld_s_jac_smoother_type) type is (mld_s_jac_smoother_type)
smo%nd_nnz_tot = sm%nd_nnz_tot smo%nd_nnz_tot = sm%nd_nnz_tot
smo%checkres = sm%checkres
smo%printres = sm%printres
smo%checkiter = sm%checkiter
smo%printiter = sm%printiter
smo%tol = sm%tol
call sm%nd%clone(smo%nd,info) call sm%nd%clone(smo%nd,info)
if ((info==psb_success_).and.(allocated(sm%sv))) then if ((info==psb_success_).and.(allocated(sm%sv))) then
allocate(smout%sv,mold=sm%sv,stat=info) allocate(smout%sv,mold=sm%sv,stat=info)

@ -52,22 +52,27 @@ subroutine mld_s_jac_smoother_csetc(sm,what,val,info,idx)
info = psb_success_ info = psb_success_
call psb_erractionsave(err_act) call psb_erractionsave(err_act)
select case(psb_toupper(trim(what)))
select case(psb_toupper(what)) case('SMOOTHER_STOP')
case('SMOOTHER_STOP') select case(psb_toupper(trim(val)))
if((psb_toupper(trim(val)) == 'T').or.(psb_toupper(trim(val)) == 'TRUE')) then case('T','TRUE')
sm%checkres = .true. sm%checkres = .true.
else case('F','FALSE')
sm%checkres = .false. sm%checkres = .false.
end if case default
case('SMOOTHER_TRACE') write(0,*) 'Unknown value for smoother_stop : "',psb_toupper(trim(val)),'"'
if((psb_toupper(trim(val)) == 'T').or.(psb_toupper(trim(val)) == 'TRUE')) then end select
sm%printres = .true. case('SMOOTHER_TRACE')
else select case(psb_toupper(trim(val)))
sm%printres = .false. case('T','TRUE')
end if sm%printres = .true.
case default case('F','FALSE')
call sm%mld_s_base_smoother_type%set(what,val,info,idx=idx) sm%printres = .false.
case default
write(0,*) 'Unknown value for smoother_trace : "',psb_toupper(trim(val)),'"'
end select
case default
call sm%mld_s_base_smoother_type%set(what,val,info,idx=idx)
end select end select
if (info /= psb_success_) then if (info /= psb_success_) then

@ -1,15 +1,15 @@
! !
! !
! MLD2P4 version 2.2 ! MLD2P4 version 2.2
! MultiLevel Domain Decomposition Parallel Preconditioners Package ! MultiLevel Domain Decomposition Parallel Preconditioners Package
! based on PSBLAS (Parallel Sparse BLAS version 3.5) ! based on PSBLAS (Parallel Sparse BLAS version 3.5)
! !
! (C) Copyright 2008-2018 ! (C) Copyright 2008-2018
! !
! Salvatore Filippone ! Salvatore Filippone
! Pasqua D'Ambra ! Pasqua D'Ambra
! Daniela di Serafino ! Daniela di Serafino
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions ! modification, are permitted provided that the following conditions
! are met: ! are met:
@ -21,7 +21,7 @@
! 3. The name of the MLD2P4 group or the names of its contributors may ! 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 ! not be used to endorse or promote products derived from this
! software without specific written permission. ! software without specific written permission.
! !
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@ -33,10 +33,10 @@
! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ! 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 ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE. ! POSSIBILITY OF SUCH DAMAGE.
! !
! !
subroutine mld_z_jac_smoother_clone(sm,smout,info) subroutine mld_z_jac_smoother_clone(sm,smout,info)
use psb_base_mod use psb_base_mod
use mld_z_jac_smoother, mld_protect_name => mld_z_jac_smoother_clone use mld_z_jac_smoother, mld_protect_name => mld_z_jac_smoother_clone
@ -59,14 +59,19 @@ subroutine mld_z_jac_smoother_clone(sm,smout,info)
end if end if
if (info == psb_success_) & if (info == psb_success_) &
& allocate(mld_z_jac_smoother_type :: smout, stat=info) & allocate(mld_z_jac_smoother_type :: smout, stat=info)
if (info /= 0) then if (info /= 0) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_
goto 9999 goto 9999
end if end if
select type(smo => smout) select type(smo => smout)
type is (mld_z_jac_smoother_type) type is (mld_z_jac_smoother_type)
smo%nd_nnz_tot = sm%nd_nnz_tot smo%nd_nnz_tot = sm%nd_nnz_tot
smo%checkres = sm%checkres
smo%printres = sm%printres
smo%checkiter = sm%checkiter
smo%printiter = sm%printiter
smo%tol = sm%tol
call sm%nd%clone(smo%nd,info) call sm%nd%clone(smo%nd,info)
if ((info==psb_success_).and.(allocated(sm%sv))) then if ((info==psb_success_).and.(allocated(sm%sv))) then
allocate(smout%sv,mold=sm%sv,stat=info) allocate(smout%sv,mold=sm%sv,stat=info)

@ -52,22 +52,27 @@ subroutine mld_z_jac_smoother_csetc(sm,what,val,info,idx)
info = psb_success_ info = psb_success_
call psb_erractionsave(err_act) call psb_erractionsave(err_act)
select case(psb_toupper(trim(what)))
select case(psb_toupper(what)) case('SMOOTHER_STOP')
case('SMOOTHER_STOP') select case(psb_toupper(trim(val)))
if((psb_toupper(trim(val)) == 'T').or.(psb_toupper(trim(val)) == 'TRUE')) then case('T','TRUE')
sm%checkres = .true. sm%checkres = .true.
else case('F','FALSE')
sm%checkres = .false. sm%checkres = .false.
end if case default
case('SMOOTHER_TRACE') write(0,*) 'Unknown value for smoother_stop : "',psb_toupper(trim(val)),'"'
if((psb_toupper(trim(val)) == 'T').or.(psb_toupper(trim(val)) == 'TRUE')) then end select
sm%printres = .true. case('SMOOTHER_TRACE')
else select case(psb_toupper(trim(val)))
sm%printres = .false. case('T','TRUE')
end if sm%printres = .true.
case default case('F','FALSE')
call sm%mld_z_base_smoother_type%set(what,val,info,idx=idx) sm%printres = .false.
case default
write(0,*) 'Unknown value for smoother_trace : "',psb_toupper(trim(val)),'"'
end select
case default
call sm%mld_z_base_smoother_type%set(what,val,info,idx=idx)
end select end select
if (info /= psb_success_) then if (info /= psb_success_) then

Loading…
Cancel
Save