mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-14 01:49:08 +00:00
base/comm/internals/psi_cswapdata.F90 base/comm/internals/psi_cswaptran.F90 base/comm/internals/psi_dswapdata.F90 base/comm/internals/psi_dswaptran.F90 base/comm/internals/psi_iswapdata.F90 base/comm/internals/psi_iswaptran.F90 base/comm/internals/psi_sswapdata.F90 base/comm/internals/psi_sswaptran.F90 base/comm/internals/psi_zswapdata.F90 base/comm/internals/psi_zswaptran.F90 base/comm/psb_cgather.f90 base/comm/psb_chalo.f90 base/comm/psb_covrl.f90 base/comm/psb_cscatter.F90 base/comm/psb_cspgather.F90 base/comm/psb_dgather.f90 base/comm/psb_dhalo.f90 base/comm/psb_dovrl.f90 base/comm/psb_dscatter.F90 base/comm/psb_dspgather.F90 base/comm/psb_igather.f90 base/comm/psb_ihalo.f90 base/comm/psb_iovrl.f90 base/comm/psb_iscatter.F90 base/comm/psb_sgather.f90 base/comm/psb_shalo.f90 base/comm/psb_sovrl.f90 base/comm/psb_sscatter.F90 base/comm/psb_sspgather.F90 base/comm/psb_zgather.f90 base/comm/psb_zhalo.f90 base/comm/psb_zovrl.f90 base/comm/psb_zscatter.F90 base/comm/psb_zspgather.F90 base/modules/desc/psb_hash_map_mod.f90 base/modules/psb_error_impl.F90 base/modules/psb_error_mod.F90 base/modules/psb_realloc_mod.F90 base/modules/serial/psb_c_base_vect_mod.f90 base/modules/serial/psb_c_vect_mod.F90 base/modules/serial/psb_d_base_vect_mod.f90 base/modules/serial/psb_d_vect_mod.F90 base/modules/serial/psb_i_base_vect_mod.f90 base/modules/serial/psb_s_base_vect_mod.f90 base/modules/serial/psb_s_vect_mod.F90 base/modules/serial/psb_z_base_vect_mod.f90 base/modules/serial/psb_z_vect_mod.F90 base/tools/psb_ccdbldext.F90 base/tools/psb_dcdbldext.F90 base/tools/psb_icdasb.F90 base/tools/psb_scdbldext.F90 base/tools/psb_zcdbldext.F90 krylov/psb_dcg.F90 krylov/psb_scg.F90 Fixes for --enable-long-integers. Now compiles and runs correctly.
153 lines
3.9 KiB
Fortran
153 lines
3.9 KiB
Fortran
! checks wether an error has occurred on one of the porecesses in the execution pool
|
|
subroutine psb_errcomm(ictxt, err)
|
|
use psb_error_mod, psb_protect_name => psb_errcomm
|
|
use psb_penv_mod
|
|
integer(psb_mpik_), intent(in) :: ictxt
|
|
integer(psb_ipk_), intent(inout):: err
|
|
|
|
call psb_amx(ictxt, err)
|
|
|
|
end subroutine psb_errcomm
|
|
|
|
subroutine psb_ser_error_handler(err_act)
|
|
use psb_error_mod, psb_protect_name => psb_ser_error_handler
|
|
use psb_penv_mod
|
|
implicit none
|
|
integer(psb_ipk_), intent(inout) :: err_act
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
if (err_act /= psb_act_ret_) &
|
|
& call psb_error()
|
|
if (err_act == psb_act_abort_) stop
|
|
|
|
return
|
|
end subroutine psb_ser_error_handler
|
|
|
|
subroutine psb_par_error_handler(ictxt,err_act)
|
|
use psb_error_mod, psb_protect_name => psb_par_error_handler
|
|
use psb_penv_mod
|
|
implicit none
|
|
integer(psb_ipk_), intent(in) :: ictxt
|
|
integer(psb_ipk_), intent(in) :: err_act
|
|
integer(psb_mpik_) :: iictxt
|
|
call psb_erractionrestore(err_act)
|
|
iictxt = ictxt
|
|
if (err_act == psb_act_print_) &
|
|
& call psb_error(iictxt, abrt=.false.)
|
|
if (err_act == psb_act_abort_) &
|
|
& call psb_error(iictxt, abrt=.true.)
|
|
|
|
return
|
|
|
|
end subroutine psb_par_error_handler
|
|
|
|
subroutine psb_par_error_print_stack(ictxt)
|
|
use psb_error_mod, psb_protect_name => psb_par_error_print_stack
|
|
use psb_penv_mod
|
|
integer(psb_mpik_), intent(in) :: ictxt
|
|
|
|
call psb_error(ictxt, abrt=.false.)
|
|
|
|
end subroutine psb_par_error_print_stack
|
|
|
|
subroutine psb_ser_error_print_stack()
|
|
use psb_error_mod, psb_protect_name => psb_ser_error_print_stack
|
|
|
|
call psb_error()
|
|
end subroutine psb_ser_error_print_stack
|
|
|
|
|
|
|
|
|
|
! handles the occurence of an error in a serial routine
|
|
subroutine psb_serror()
|
|
use psb_const_mod
|
|
use psb_error_mod
|
|
implicit none
|
|
integer(psb_ipk_) :: err_c
|
|
character(len=20) :: r_name
|
|
character(len=40) :: a_e_d
|
|
integer(psb_ipk_) :: i_e_d(5)
|
|
|
|
if (psb_errstatus_fatal()) then
|
|
if(psb_get_errverbosity() > 1) then
|
|
|
|
do while (psb_get_numerr() > izero)
|
|
write(psb_err_unit,'(50("="))')
|
|
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
|
|
call psb_errmsg(psb_err_unit,err_c, r_name, i_e_d, a_e_d)
|
|
! write(psb_err_unit,'(50("="))')
|
|
end do
|
|
|
|
else
|
|
|
|
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
|
|
call psb_errmsg(psb_err_unit,err_c, r_name, i_e_d, a_e_d)
|
|
do while (psb_get_numerr() > 0)
|
|
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
|
|
end do
|
|
end if
|
|
end if
|
|
#if defined(HAVE_FLUSH_STMT)
|
|
flush(psb_err_unit)
|
|
#endif
|
|
|
|
|
|
end subroutine psb_serror
|
|
|
|
|
|
! handles the occurence of an error in a parallel routine
|
|
subroutine psb_perror(ictxt,abrt)
|
|
use psb_const_mod
|
|
use psb_error_mod
|
|
use psb_penv_mod
|
|
implicit none
|
|
integer(psb_mpik_), intent(in) :: ictxt
|
|
logical, intent(in), optional :: abrt
|
|
|
|
integer(psb_ipk_) :: err_c
|
|
character(len=20) :: r_name
|
|
character(len=40) :: a_e_d
|
|
integer(psb_ipk_) :: i_e_d(5)
|
|
integer(psb_mpik_) :: iam, np
|
|
logical :: abrt_
|
|
|
|
abrt_=.true.
|
|
if (present(abrt)) abrt_=abrt
|
|
call psb_info(ictxt,iam,np)
|
|
|
|
if (psb_errstatus_fatal()) then
|
|
if (psb_get_errverbosity() > 1) then
|
|
|
|
do while (psb_get_numerr() > izero)
|
|
write(psb_err_unit,'(50("="))')
|
|
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
|
|
call psb_errmsg(psb_err_unit,err_c, r_name, i_e_d, a_e_d,iam)
|
|
! write(psb_err_unit,'(50("="))')
|
|
end do
|
|
#if defined(HAVE_FLUSH_STMT)
|
|
flush(psb_err_unit)
|
|
#endif
|
|
|
|
if (abrt_) call psb_abort(ictxt,-1)
|
|
|
|
else
|
|
|
|
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
|
|
call psb_errmsg(psb_err_unit,err_c, r_name, i_e_d, a_e_d,iam)
|
|
do while (psb_get_numerr() > 0)
|
|
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
|
|
end do
|
|
#if defined(HAVE_FLUSH_STMT)
|
|
flush(psb_err_unit)
|
|
#endif
|
|
|
|
if (abrt_) call psb_abort(ictxt,-1)
|
|
|
|
end if
|
|
end if
|
|
|
|
end subroutine psb_perror
|
|
|