From 936554eb2cf121d67c9dd3743ff654cc70e7cdda Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 17 Apr 2018 18:48:41 +0100 Subject: [PATCH] Fixed compilation and run for I4_L4 and I4_L8. Needs some more work for I8_L8. --- base/modules/desc/psb_desc_mod.F90 | 24 +++++++++++++++++++--- base/modules/penv/psi_comm_buffers_mod.F90 | 5 ++--- base/modules/psb_error_impl.F90 | 17 +++++++-------- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/base/modules/desc/psb_desc_mod.F90 b/base/modules/desc/psb_desc_mod.F90 index 803f21a0..4dc02d4a 100644 --- a/base/modules/desc/psb_desc_mod.F90 +++ b/base/modules/desc/psb_desc_mod.F90 @@ -282,6 +282,16 @@ module psb_desc_mod module procedure psb_cdfree end interface psb_free + interface psb_cd_set_large_threshold + module procedure psb_i_cd_set_large_threshold + end interface psb_cd_set_large_threshold + +#if defined(INT_I4_L8) + interface psb_cd_set_large_threshold + module procedure psb_l_cd_set_large_threshold + end interface psb_cd_set_large_threshold +#endif + private :: nullify_desc, cd_get_fmt,& & cd_l2gs1, cd_l2gs2, cd_l2gv1, cd_l2gv2, cd_g2ls1,& @@ -289,7 +299,7 @@ module psb_desc_mod & cd_g2ls2_ins, cd_g2lv1_ins, cd_g2lv2_ins, cd_fnd_owner - integer(psb_ipk_), private, save :: cd_large_threshold=psb_default_large_threshold + integer(psb_lpk_), private, save :: cd_large_threshold=psb_default_large_threshold contains @@ -320,13 +330,21 @@ contains - subroutine psb_cd_set_large_threshold(ith) + subroutine psb_i_cd_set_large_threshold(ith) implicit none integer(psb_ipk_), intent(in) :: ith if (ith > 0) then cd_large_threshold = ith end if - end subroutine psb_cd_set_large_threshold + end subroutine psb_i_cd_set_large_threshold + + subroutine psb_l_cd_set_large_threshold(ith) + implicit none + integer(psb_lpk_), intent(in) :: ith + if (ith > 0) then + cd_large_threshold = ith + end if + end subroutine psb_l_cd_set_large_threshold function psb_cd_get_large_threshold() result(val) implicit none diff --git a/base/modules/penv/psi_comm_buffers_mod.F90 b/base/modules/penv/psi_comm_buffers_mod.F90 index 8619f99d..c9c484e8 100644 --- a/base/modules/penv/psi_comm_buffers_mod.F90 +++ b/base/modules/penv/psi_comm_buffers_mod.F90 @@ -98,7 +98,6 @@ module psi_comm_buffers_mod integer(psb_mpk_) :: request integer(psb_mpk_) :: icontxt integer(psb_mpk_) :: buffer_type - integer(psb_ipk_), allocatable :: intbuf(:) integer(psb_epk_), allocatable :: int8buf(:) integer(psb_i2pk_), allocatable :: int2buf(:) integer(psb_mpk_), allocatable :: int4buf(:) @@ -307,12 +306,12 @@ contains end if node%icontxt = icontxt node%buffer_type = psb_int_type - call move_alloc(buffer,node%intbuf) + call move_alloc(buffer,node%int4buf) if (info /= 0) then write(psb_err_unit,*) 'Fatal memory error inside communication subsystem' return end if - call mpi_isend(node%intbuf,size(node%intbuf),psb_mpi_mpk_,& + call mpi_isend(node%int4buf,size(node%int4buf),psb_mpi_mpk_,& & dest,tag,icontxt,node%request,minfo) info = minfo call psb_insert_node(mesg_queue,node) diff --git a/base/modules/psb_error_impl.F90 b/base/modules/psb_error_impl.F90 index bdb289ec..0662b904 100644 --- a/base/modules/psb_error_impl.F90 +++ b/base/modules/psb_error_impl.F90 @@ -30,13 +30,13 @@ subroutine psb_par_error_handler(ictxt,err_act) implicit none integer(psb_ipk_), intent(in) :: ictxt integer(psb_ipk_), intent(in) :: err_act - integer(psb_mpk_) :: iictxt + call psb_erractionrestore(err_act) - iictxt = ictxt + if (err_act == psb_act_print_) & - & call psb_error(iictxt, abrt=.false.) + & call psb_error(ictxt, abrt=.false.) if (err_act == psb_act_abort_) & - & call psb_error(iictxt, abrt=.true.) + & call psb_error(ictxt, abrt=.true.) return @@ -110,12 +110,13 @@ subroutine psb_perror(ictxt,abrt) character(len=20) :: r_name character(len=40) :: a_e_d integer(psb_epk_) :: e_e_d(5) - integer(psb_mpk_) :: iam, np + integer(psb_mpk_) :: iictxt, iam, np logical :: abrt_ abrt_=.true. if (present(abrt)) abrt_=abrt - call psb_info(ictxt,iam,np) + iictxt = ictxt + call psb_info(iictxt,iam,np) if (psb_errstatus_fatal()) then if (psb_get_errverbosity() > 1) then @@ -130,7 +131,7 @@ subroutine psb_perror(ictxt,abrt) flush(psb_err_unit) #endif - if (abrt_) call psb_abort(ictxt,-1) + if (abrt_) call psb_abort(iictxt,-1) else @@ -143,7 +144,7 @@ subroutine psb_perror(ictxt,abrt) flush(psb_err_unit) #endif - if (abrt_) call psb_abort(ictxt,-1) + if (abrt_) call psb_abort(iictxt,-1) end if end if