From f21ee702712fa80c527640890370961feee91b09 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Thu, 21 Jun 2018 16:44:26 +0100 Subject: [PATCH] Added LPK to linmap. New error for LPK to IPK inexact conversion --- base/modules/comm/psb_base_linmap_mod.f90 | 6 +++--- base/modules/psb_const_mod.F90 | 1 + base/modules/psb_error_mod.F90 | 7 +++++++ base/tools/psb_c_map.f90 | 2 +- base/tools/psb_d_map.f90 | 2 +- base/tools/psb_s_map.f90 | 2 +- base/tools/psb_z_map.f90 | 2 +- 7 files changed, 15 insertions(+), 7 deletions(-) diff --git a/base/modules/comm/psb_base_linmap_mod.f90 b/base/modules/comm/psb_base_linmap_mod.f90 index f4ac9903..3dccac3f 100644 --- a/base/modules/comm/psb_base_linmap_mod.f90 +++ b/base/modules/comm/psb_base_linmap_mod.f90 @@ -42,7 +42,7 @@ module psb_base_linmap_mod type psb_base_linmap_type integer(psb_ipk_) :: kind - integer(psb_ipk_), allocatable :: iaggr(:), naggr(:) + integer(psb_lpk_), allocatable :: iaggr(:), naggr(:) type(psb_desc_type), pointer :: p_desc_X=>null(), p_desc_Y=>null() type(psb_desc_type) :: desc_X, desc_Y contains @@ -128,9 +128,9 @@ contains val = psb_sizeof_ip if (allocated(map%iaggr)) & - & val = val + psb_sizeof_ip*size(map%iaggr) + & val = val + psb_sizeof_lp*size(map%iaggr) if (allocated(map%naggr)) & - & val = val + psb_sizeof_ip*size(map%naggr) + & val = val + psb_sizeof_lp*size(map%naggr) val = val + map%desc_X%sizeof() val = val + map%desc_Y%sizeof() diff --git a/base/modules/psb_const_mod.F90 b/base/modules/psb_const_mod.F90 index 23e7ffc3..1b59aa62 100644 --- a/base/modules/psb_const_mod.F90 +++ b/base/modules/psb_const_mod.F90 @@ -254,6 +254,7 @@ module psb_const_mod integer(psb_ipk_), parameter, public :: psb_err_forgot_spall_=295 integer(psb_ipk_), parameter, public :: psb_err_wrong_ins_=298 integer(psb_ipk_), parameter, public :: psb_err_iarg_mbeeiarra_i_=300 + integer(psb_ipk_), parameter, public :: psb_err_bad_int_cnv_=301 integer(psb_ipk_), parameter, public :: psb_err_mpi_error_=400 integer(psb_ipk_), parameter, public :: psb_err_parm_differs_among_procs_=550 integer(psb_ipk_), parameter, public :: psb_err_entry_out_of_bounds_=551 diff --git a/base/modules/psb_error_mod.F90 b/base/modules/psb_error_mod.F90 index 71552564..4233f309 100644 --- a/base/modules/psb_error_mod.F90 +++ b/base/modules/psb_error_mod.F90 @@ -700,6 +700,13 @@ contains &'("Something went wrong before this call to ",a,", probably in cdins/spins")')& & trim(r_name) + case(psb_err_bad_int_cnv_) + allocate(achmsg(3)) + achmsg(1) = tmpmsg + write(achmsg(2),& + & '("Bad integer conversion from ",i0,"to ",i0)') & + & e_e_d(1),e_e_d(2) + case(psb_err_iarg_mbeeiarra_i_) allocate(achmsg(3)) achmsg(1) = tmpmsg diff --git a/base/tools/psb_c_map.f90 b/base/tools/psb_c_map.f90 index eeaefdc0..796a6c2c 100644 --- a/base/tools/psb_c_map.f90 +++ b/base/tools/psb_c_map.f90 @@ -401,7 +401,7 @@ function psb_c_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) & type(psb_desc_type), target :: desc_X, desc_Y type(psb_cspmat_type), intent(inout) :: map_X2Y, map_Y2X integer(psb_ipk_), intent(in) :: map_kind - integer(psb_ipk_), intent(in), optional :: iaggr(:), naggr(:) + integer(psb_lpk_), intent(in), optional :: iaggr(:), naggr(:) ! integer(psb_ipk_) :: info character(len=20), parameter :: name='psb_linmap' diff --git a/base/tools/psb_d_map.f90 b/base/tools/psb_d_map.f90 index 22e2ceb5..6f151921 100644 --- a/base/tools/psb_d_map.f90 +++ b/base/tools/psb_d_map.f90 @@ -401,7 +401,7 @@ function psb_d_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) & type(psb_desc_type), target :: desc_X, desc_Y type(psb_dspmat_type), intent(inout) :: map_X2Y, map_Y2X integer(psb_ipk_), intent(in) :: map_kind - integer(psb_ipk_), intent(in), optional :: iaggr(:), naggr(:) + integer(psb_lpk_), intent(in), optional :: iaggr(:), naggr(:) ! integer(psb_ipk_) :: info character(len=20), parameter :: name='psb_linmap' diff --git a/base/tools/psb_s_map.f90 b/base/tools/psb_s_map.f90 index 511bc1de..b5ea9b4f 100644 --- a/base/tools/psb_s_map.f90 +++ b/base/tools/psb_s_map.f90 @@ -401,7 +401,7 @@ function psb_s_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) & type(psb_desc_type), target :: desc_X, desc_Y type(psb_sspmat_type), intent(inout) :: map_X2Y, map_Y2X integer(psb_ipk_), intent(in) :: map_kind - integer(psb_ipk_), intent(in), optional :: iaggr(:), naggr(:) + integer(psb_lpk_), intent(in), optional :: iaggr(:), naggr(:) ! integer(psb_ipk_) :: info character(len=20), parameter :: name='psb_linmap' diff --git a/base/tools/psb_z_map.f90 b/base/tools/psb_z_map.f90 index d58c4a82..53893f85 100644 --- a/base/tools/psb_z_map.f90 +++ b/base/tools/psb_z_map.f90 @@ -401,7 +401,7 @@ function psb_z_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) & type(psb_desc_type), target :: desc_X, desc_Y type(psb_zspmat_type), intent(inout) :: map_X2Y, map_Y2X integer(psb_ipk_), intent(in) :: map_kind - integer(psb_ipk_), intent(in), optional :: iaggr(:), naggr(:) + integer(psb_lpk_), intent(in), optional :: iaggr(:), naggr(:) ! integer(psb_ipk_) :: info character(len=20), parameter :: name='psb_linmap'