Reworked independent IPK and LPK #defines.

ILmat
Salvatore Filippone 8 years ago
parent 660f0ccb28
commit f915066b81

@ -286,7 +286,7 @@ module psb_desc_mod
module procedure psb_i_cd_set_large_threshold
end interface psb_cd_set_large_threshold
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
interface psb_cd_set_large_threshold
module procedure psb_l_cd_set_large_threshold
end interface psb_cd_set_large_threshold

@ -86,7 +86,7 @@ module psb_hash_mod
module procedure psb_hash_lsearchkey
end interface psb_hash_searchkey
#if defined (INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
interface psb_hash_init
module procedure psb_hash_init_v, psb_hash_init_n
end interface

@ -155,13 +155,13 @@ contains
if (info == 0) call mpi_type_create_f90_complex(psb_spk_p_,psb_spk_r_, psb_mpi_c_spk_,info)
if (info == 0) call mpi_type_create_f90_complex(psb_dpk_p_,psb_dpk_r_, psb_mpi_c_dpk_,info)
#else
#if defined(INT_I4_L4)
#if defined(IPK4) && defined(LPK4)
psb_mpi_ipk_ = mpi_integer4
psb_mpi_lpk_ = mpi_integer4
#elif defined(INT_I4_L8)
#elif defined(IPK4) && defined(LPK8)
psb_mpi_ipk_ = mpi_integer4
psb_mpi_lpk_ = mpi_integer8
#elif defined(INT_I8_L8)
#elif defined(IPK8) && defined(LPK8)
psb_mpi_ipk_ = mpi_integer8
psb_mpi_lpk_ = mpi_integer8
#else

@ -86,13 +86,13 @@ module psb_const_mod
! compiler will later pick up the correct version according
! to what IPK/LPK are mapped onto.
!
#if defined(INT_I4_L4)
#if defined(IPK4) && defined(LPK4)
integer, parameter :: psb_ipk_ = psb_mpk_
integer, parameter :: psb_lpk_ = psb_mpk_
#elif defined(INT_I4_L8)
#elif defined(IPK4) && defined(LPK8)
integer, parameter :: psb_ipk_ = psb_mpk_
integer, parameter :: psb_lpk_ = psb_epk_
#elif defined(INT_I8_L8)
#elif defined(IPK8) && defined(LPK8)
integer, parameter :: psb_ipk_ = psb_epk_
integer, parameter :: psb_lpk_ = psb_epk_
#else

@ -9,7 +9,7 @@ subroutine psb_errcomm_i(ictxt, err)
end subroutine psb_errcomm_i
#if defined(INT_I8_L8)
#if defined(IPK8)
subroutine psb_errcomm_m(ictxt, err)
use psb_error_mod, psb_protect_name => psb_errcomm

@ -99,7 +99,7 @@ module psb_error_mod
end interface
interface psb_errcomm
#if defined(INT_I8_L8)
#if defined(IPK8)
subroutine psb_errcomm_m(ictxt, err)
import :: psb_ipk_, psb_mpk_
integer(psb_mpk_), intent(in) :: ictxt

@ -128,7 +128,7 @@ module psb_c_mat_mod
procedure, pass(a) :: csgetrow => psb_c_csgetrow
procedure, pass(a) :: csgetblk => psb_c_csgetblk
generic, public :: csget => csgetptn, csgetrow, csgetblk
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
procedure, pass(a) :: lcsgetptn => psb_c_lcsgetptn
procedure, pass(a) :: lcsgetrow => psb_c_lcsgetrow
generic, public :: csget => lcsgetptn, lcsgetrow
@ -1297,7 +1297,7 @@ contains
end subroutine psb_c_clean_zeros
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
subroutine psb_c_lcsgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale)
implicit none

@ -128,7 +128,7 @@ module psb_d_mat_mod
procedure, pass(a) :: csgetrow => psb_d_csgetrow
procedure, pass(a) :: csgetblk => psb_d_csgetblk
generic, public :: csget => csgetptn, csgetrow, csgetblk
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
procedure, pass(a) :: lcsgetptn => psb_d_lcsgetptn
procedure, pass(a) :: lcsgetrow => psb_d_lcsgetrow
generic, public :: csget => lcsgetptn, lcsgetrow
@ -1297,7 +1297,7 @@ contains
end subroutine psb_d_clean_zeros
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
subroutine psb_d_lcsgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale)
implicit none

@ -128,7 +128,7 @@ module psb_s_mat_mod
procedure, pass(a) :: csgetrow => psb_s_csgetrow
procedure, pass(a) :: csgetblk => psb_s_csgetblk
generic, public :: csget => csgetptn, csgetrow, csgetblk
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
procedure, pass(a) :: lcsgetptn => psb_s_lcsgetptn
procedure, pass(a) :: lcsgetrow => psb_s_lcsgetrow
generic, public :: csget => lcsgetptn, lcsgetrow
@ -1297,7 +1297,7 @@ contains
end subroutine psb_s_clean_zeros
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
subroutine psb_s_lcsgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale)
implicit none

@ -128,7 +128,7 @@ module psb_z_mat_mod
procedure, pass(a) :: csgetrow => psb_z_csgetrow
procedure, pass(a) :: csgetblk => psb_z_csgetblk
generic, public :: csget => csgetptn, csgetrow, csgetblk
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
procedure, pass(a) :: lcsgetptn => psb_z_lcsgetptn
procedure, pass(a) :: lcsgetrow => psb_z_lcsgetrow
generic, public :: csget => lcsgetptn, lcsgetrow
@ -1297,7 +1297,7 @@ contains
end subroutine psb_z_clean_zeros
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
subroutine psb_z_lcsgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale)
implicit none

@ -84,8 +84,8 @@ Subroutine psb_csphalo(a,desc_a,blk,info,rowcnv,colcnv,&
integer(psb_mpk_) :: icomm, minfo
integer(psb_mpk_), allocatable :: brvindx(:), &
& rvsz(:), bsdindx(:),sdsz(:)
#if defined(INT_I4_L8)
! If globals are 8 bytes but locals are not, things get tricky
#if defined(IPK4) && defined(LPK8)
! If globals are 8 bytes but locals are 4, things get tricky
integer(psb_ipk_), allocatable :: liasnd(:), ljasnd(:)
integer(psb_lpk_), allocatable :: iasnd(:), jasnd(:), iarcv(:), jarcv(:)
#else
@ -239,7 +239,7 @@ Subroutine psb_csphalo(a,desc_a,blk,info,rowcnv,colcnv,&
if (info == psb_success_) call psb_ensure_size(max(iszs,1),iasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),jasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),valsnd,info)
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
! If globals are 8 bytes but locals are not, things get tricky
if (info == psb_success_) call psb_ensure_size(max(iszs,1),liasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),ljasnd,info)

@ -84,8 +84,8 @@ Subroutine psb_dsphalo(a,desc_a,blk,info,rowcnv,colcnv,&
integer(psb_mpk_) :: icomm, minfo
integer(psb_mpk_), allocatable :: brvindx(:), &
& rvsz(:), bsdindx(:),sdsz(:)
#if defined(INT_I4_L8)
! If globals are 8 bytes but locals are not, things get tricky
#if defined(IPK4) && defined(LPK8)
! If globals are 8 bytes but locals are 4, things get tricky
integer(psb_ipk_), allocatable :: liasnd(:), ljasnd(:)
integer(psb_lpk_), allocatable :: iasnd(:), jasnd(:), iarcv(:), jarcv(:)
#else
@ -239,7 +239,7 @@ Subroutine psb_dsphalo(a,desc_a,blk,info,rowcnv,colcnv,&
if (info == psb_success_) call psb_ensure_size(max(iszs,1),iasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),jasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),valsnd,info)
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
! If globals are 8 bytes but locals are not, things get tricky
if (info == psb_success_) call psb_ensure_size(max(iszs,1),liasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),ljasnd,info)

@ -84,8 +84,8 @@ Subroutine psb_ssphalo(a,desc_a,blk,info,rowcnv,colcnv,&
integer(psb_mpk_) :: icomm, minfo
integer(psb_mpk_), allocatable :: brvindx(:), &
& rvsz(:), bsdindx(:),sdsz(:)
#if defined(INT_I4_L8)
! If globals are 8 bytes but locals are not, things get tricky
#if defined(IPK4) && defined(LPK8)
! If globals are 8 bytes but locals are 4, things get tricky
integer(psb_ipk_), allocatable :: liasnd(:), ljasnd(:)
integer(psb_lpk_), allocatable :: iasnd(:), jasnd(:), iarcv(:), jarcv(:)
#else
@ -239,7 +239,7 @@ Subroutine psb_ssphalo(a,desc_a,blk,info,rowcnv,colcnv,&
if (info == psb_success_) call psb_ensure_size(max(iszs,1),iasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),jasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),valsnd,info)
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
! If globals are 8 bytes but locals are not, things get tricky
if (info == psb_success_) call psb_ensure_size(max(iszs,1),liasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),ljasnd,info)

@ -84,8 +84,8 @@ Subroutine psb_zsphalo(a,desc_a,blk,info,rowcnv,colcnv,&
integer(psb_mpk_) :: icomm, minfo
integer(psb_mpk_), allocatable :: brvindx(:), &
& rvsz(:), bsdindx(:),sdsz(:)
#if defined(INT_I4_L8)
! If globals are 8 bytes but locals are not, things get tricky
#if defined(IPK4) && defined(LPK8)
! If globals are 8 bytes but locals are 4, things get tricky
integer(psb_ipk_), allocatable :: liasnd(:), ljasnd(:)
integer(psb_lpk_), allocatable :: iasnd(:), jasnd(:), iarcv(:), jarcv(:)
#else
@ -239,7 +239,7 @@ Subroutine psb_zsphalo(a,desc_a,blk,info,rowcnv,colcnv,&
if (info == psb_success_) call psb_ensure_size(max(iszs,1),iasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),jasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),valsnd,info)
#if defined(INT_I4_L8)
#if defined(IPK4) && defined(LPK8)
! If globals are 8 bytes but locals are not, things get tricky
if (info == psb_success_) call psb_ensure_size(max(iszs,1),liasnd,info)
if (info == psb_success_) call psb_ensure_size(max(iszs,1),ljasnd,info)

2
configure vendored

@ -6883,10 +6883,8 @@ $as_echo "$as_me: Invalid combination of size specs IPK ${pac_cv_ipk_size} LPK $
$as_echo "$as_me: Forcing equal values" >&6;}
pac_cv_lpk_size=$pac_cv_ipk_size;
fi
FDEFINES="$psblas_cv_define_prepend-DINT_I${pac_cv_ipk_size}_L${pac_cv_lpk_size} $FDEFINES";
FDEFINES="$psblas_cv_define_prepend-DIPK${pac_cv_ipk_size} $FDEFINES";
FDEFINES="$psblas_cv_define_prepend-DLPK${pac_cv_lpk_size} $FDEFINES";
CDEFINES="-DINT_I${pac_cv_ipk_size}_L${pac_cv_lpk_size} $CDEFINES"
CDEFINES="-DIPK${pac_cv_ipk_size} -DLPK${pac_cv_lpk_size} $CDEFINES"

@ -499,10 +499,8 @@ if (( $pac_cv_lpk_size < $pac_cv_ipk_size )); then
AC_MSG_NOTICE([[Forcing equal values]])
pac_cv_lpk_size=$pac_cv_ipk_size;
fi
FDEFINES="$psblas_cv_define_prepend-DINT_I${pac_cv_ipk_size}_L${pac_cv_lpk_size} $FDEFINES";
FDEFINES="$psblas_cv_define_prepend-DIPK${pac_cv_ipk_size} $FDEFINES";
FDEFINES="$psblas_cv_define_prepend-DLPK${pac_cv_lpk_size} $FDEFINES";
CDEFINES="-DINT_I${pac_cv_ipk_size}_L${pac_cv_lpk_size} $CDEFINES"
CDEFINES="-DIPK${pac_cv_ipk_size} -DLPK${pac_cv_lpk_size} $CDEFINES"

@ -267,7 +267,7 @@ contains
name = 'mat_renum_amd'
call psb_erractionsave(err_act)
#if defined(HAVE_AMD) && !defined(INT_I8_L8)
#if defined(HAVE_AMD) && defined(IPK4)
info = psb_success_
nr = a%get_nrows()

@ -267,7 +267,7 @@ contains
name = 'mat_renum_amd'
call psb_erractionsave(err_act)
#if defined(HAVE_AMD) && !defined(INT_I8_L8)
#if defined(HAVE_AMD) && defined(IPK4)
info = psb_success_
nr = a%get_nrows()

@ -316,7 +316,7 @@ contains
integer(psb_ipk_), allocatable :: irpl(:),jal(:),gvl(:)
real(psb_spk_),allocatable :: wgh_(:)
#if defined(HAVE_METIS) && !defined(INT_I8_L8)
#if defined(HAVE_METIS) && defined(IPK4)
interface
! subroutine METIS_PartGraphKway(n,ixadj,iadj,ivwg,iajw,&
! & wgflag,numflag,nparts,weights,iopt,nedc,part) bind(c)

@ -268,7 +268,7 @@ contains
name = 'mat_renum_amd'
call psb_erractionsave(err_act)
#if defined(HAVE_AMD) && !defined(INT_I8_L8)
#if defined(HAVE_AMD) && defined(IPK4)
info = psb_success_
nr = a%get_nrows()

@ -267,7 +267,7 @@ contains
name = 'mat_renum_amd'
call psb_erractionsave(err_act)
#if defined(HAVE_AMD) && !defined(INT_I8_L8)
#if defined(HAVE_AMD) && defined(IPK4)
info = psb_success_
nr = a%get_nrows()

Loading…
Cancel
Save