From cb5cf51d845b7f853a54ad299a8ae4f26a6fb02a Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Thu, 12 Apr 2018 15:36:21 +0100 Subject: [PATCH] Library compiles (except CBIND). --- Makefile | 4 +- .../{psb_c_mat_mod.f90 => psb_c_mat_mod.F90} | 67 ++++++++++++++++++- .../{psb_d_mat_mod.f90 => psb_d_mat_mod.F90} | 67 ++++++++++++++++++- .../{psb_s_mat_mod.f90 => psb_s_mat_mod.F90} | 67 ++++++++++++++++++- .../{psb_z_mat_mod.f90 => psb_z_mat_mod.F90} | 67 ++++++++++++++++++- util/psb_c_mat_dist_impl.f90 | 6 +- util/psb_d_mat_dist_impl.f90 | 6 +- util/psb_s_mat_dist_impl.f90 | 6 +- util/psb_z_mat_dist_impl.f90 | 6 +- 9 files changed, 274 insertions(+), 22 deletions(-) rename base/modules/serial/{psb_c_mat_mod.f90 => psb_c_mat_mod.F90} (94%) rename base/modules/serial/{psb_d_mat_mod.f90 => psb_d_mat_mod.F90} (94%) rename base/modules/serial/{psb_s_mat_mod.f90 => psb_s_mat_mod.F90} (94%) rename base/modules/serial/{psb_z_mat_mod.f90 => psb_z_mat_mod.F90} (94%) diff --git a/Makefile b/Makefile index 325fa854..a8360aeb 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ include Make.inc -all: libd based precd kryld utild cbindd +all: libd based precd kryld utild @echo "=====================================" @echo "PSBLAS libraries Compilation Successful." - +#cbindd based: libd precd utild: based kryld: precd based diff --git a/base/modules/serial/psb_c_mat_mod.f90 b/base/modules/serial/psb_c_mat_mod.F90 similarity index 94% rename from base/modules/serial/psb_c_mat_mod.f90 rename to base/modules/serial/psb_c_mat_mod.F90 index 0db3d3f3..578cbd9f 100644 --- a/base/modules/serial/psb_c_mat_mod.f90 +++ b/base/modules/serial/psb_c_mat_mod.F90 @@ -127,7 +127,12 @@ module psb_c_mat_mod procedure, pass(a) :: csgetptn => psb_c_csgetptn procedure, pass(a) :: csgetrow => psb_c_csgetrow procedure, pass(a) :: csgetblk => psb_c_csgetblk - generic, public :: csget => csgetptn, csgetrow, csgetblk + generic, public :: csget => csgetptn, csgetrow, csgetblk +#if defined(INT_I4_L8) + procedure, pass(a) :: lcsgetptn => psb_c_lcsgetptn + procedure, pass(a) :: lcsgetrow => psb_c_lcsgetrow + generic, public :: csget => lcsgetptn, lcsgetrow +#endif procedure, pass(a) :: tril => psb_c_tril procedure, pass(a) :: triu => psb_c_triu procedure, pass(a) :: m_csclip => psb_c_csclip @@ -1292,5 +1297,63 @@ contains end subroutine psb_c_clean_zeros - +#if defined(INT_I4_L8) + subroutine psb_c_lcsgetptn(imin,imax,a,nz,ia,ja,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + implicit none + class(psb_cspmat_type), intent(in) :: a + integer(psb_ipk_), intent(in) :: imin,imax + integer(psb_ipk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) + integer(psb_ipk_),intent(out) :: info + logical, intent(in), optional :: append + integer(psb_ipk_), intent(in), optional :: iren(:) + integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + logical, intent(in), optional :: rscale,cscale + + ! Local + integer(psb_ipk_), allocatable :: lia(:), lja(:) + + if (allocated(ia)) then + lia = ia + end if + if (allocated(ja)) then + lja = ja + end if + call a%csget(imin,imax,nz,lia,lja,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + ia = lia + ja = lja + + end subroutine psb_c_lcsgetptn + + subroutine psb_c_lcsgetrow(imin,imax,a,nz,ia,ja,val,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + implicit none + class(psb_cspmat_type), intent(in) :: a + integer(psb_ipk_), intent(in) :: imin,imax + integer(psb_ipk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) + complex(psb_spk_), allocatable, intent(inout) :: val(:) + integer(psb_ipk_),intent(out) :: info + logical, intent(in), optional :: append + integer(psb_ipk_), intent(in), optional :: iren(:) + integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + logical, intent(in), optional :: rscale,cscale + ! Local + integer(psb_ipk_), allocatable :: lia(:), lja(:) + + if (allocated(ia)) then + lia = ia + end if + if (allocated(ja)) then + lja = ja + end if + call a%csget(imin,imax,nz,lia,lja,val,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + ia = lia + ja = lja + + end subroutine psb_c_lcsgetrow +#endif end module psb_c_mat_mod diff --git a/base/modules/serial/psb_d_mat_mod.f90 b/base/modules/serial/psb_d_mat_mod.F90 similarity index 94% rename from base/modules/serial/psb_d_mat_mod.f90 rename to base/modules/serial/psb_d_mat_mod.F90 index d069e8b6..d484b634 100644 --- a/base/modules/serial/psb_d_mat_mod.f90 +++ b/base/modules/serial/psb_d_mat_mod.F90 @@ -127,7 +127,12 @@ module psb_d_mat_mod procedure, pass(a) :: csgetptn => psb_d_csgetptn procedure, pass(a) :: csgetrow => psb_d_csgetrow procedure, pass(a) :: csgetblk => psb_d_csgetblk - generic, public :: csget => csgetptn, csgetrow, csgetblk + generic, public :: csget => csgetptn, csgetrow, csgetblk +#if defined(INT_I4_L8) + procedure, pass(a) :: lcsgetptn => psb_d_lcsgetptn + procedure, pass(a) :: lcsgetrow => psb_d_lcsgetrow + generic, public :: csget => lcsgetptn, lcsgetrow +#endif procedure, pass(a) :: tril => psb_d_tril procedure, pass(a) :: triu => psb_d_triu procedure, pass(a) :: m_csclip => psb_d_csclip @@ -1292,5 +1297,63 @@ contains end subroutine psb_d_clean_zeros - +#if defined(INT_I4_L8) + subroutine psb_d_lcsgetptn(imin,imax,a,nz,ia,ja,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + implicit none + class(psb_dspmat_type), intent(in) :: a + integer(psb_ipk_), intent(in) :: imin,imax + integer(psb_ipk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) + integer(psb_ipk_),intent(out) :: info + logical, intent(in), optional :: append + integer(psb_ipk_), intent(in), optional :: iren(:) + integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + logical, intent(in), optional :: rscale,cscale + + ! Local + integer(psb_ipk_), allocatable :: lia(:), lja(:) + + if (allocated(ia)) then + lia = ia + end if + if (allocated(ja)) then + lja = ja + end if + call a%csget(imin,imax,nz,lia,lja,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + ia = lia + ja = lja + + end subroutine psb_d_lcsgetptn + + subroutine psb_d_lcsgetrow(imin,imax,a,nz,ia,ja,val,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + implicit none + class(psb_dspmat_type), intent(in) :: a + integer(psb_ipk_), intent(in) :: imin,imax + integer(psb_ipk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) + real(psb_dpk_), allocatable, intent(inout) :: val(:) + integer(psb_ipk_),intent(out) :: info + logical, intent(in), optional :: append + integer(psb_ipk_), intent(in), optional :: iren(:) + integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + logical, intent(in), optional :: rscale,cscale + ! Local + integer(psb_ipk_), allocatable :: lia(:), lja(:) + + if (allocated(ia)) then + lia = ia + end if + if (allocated(ja)) then + lja = ja + end if + call a%csget(imin,imax,nz,lia,lja,val,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + ia = lia + ja = lja + + end subroutine psb_d_lcsgetrow +#endif end module psb_d_mat_mod diff --git a/base/modules/serial/psb_s_mat_mod.f90 b/base/modules/serial/psb_s_mat_mod.F90 similarity index 94% rename from base/modules/serial/psb_s_mat_mod.f90 rename to base/modules/serial/psb_s_mat_mod.F90 index 9c6facd6..1bcc8a53 100644 --- a/base/modules/serial/psb_s_mat_mod.f90 +++ b/base/modules/serial/psb_s_mat_mod.F90 @@ -127,7 +127,12 @@ module psb_s_mat_mod procedure, pass(a) :: csgetptn => psb_s_csgetptn procedure, pass(a) :: csgetrow => psb_s_csgetrow procedure, pass(a) :: csgetblk => psb_s_csgetblk - generic, public :: csget => csgetptn, csgetrow, csgetblk + generic, public :: csget => csgetptn, csgetrow, csgetblk +#if defined(INT_I4_L8) + procedure, pass(a) :: lcsgetptn => psb_s_lcsgetptn + procedure, pass(a) :: lcsgetrow => psb_s_lcsgetrow + generic, public :: csget => lcsgetptn, lcsgetrow +#endif procedure, pass(a) :: tril => psb_s_tril procedure, pass(a) :: triu => psb_s_triu procedure, pass(a) :: m_csclip => psb_s_csclip @@ -1292,5 +1297,63 @@ contains end subroutine psb_s_clean_zeros - +#if defined(INT_I4_L8) + subroutine psb_s_lcsgetptn(imin,imax,a,nz,ia,ja,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + implicit none + class(psb_sspmat_type), intent(in) :: a + integer(psb_ipk_), intent(in) :: imin,imax + integer(psb_ipk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) + integer(psb_ipk_),intent(out) :: info + logical, intent(in), optional :: append + integer(psb_ipk_), intent(in), optional :: iren(:) + integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + logical, intent(in), optional :: rscale,cscale + + ! Local + integer(psb_ipk_), allocatable :: lia(:), lja(:) + + if (allocated(ia)) then + lia = ia + end if + if (allocated(ja)) then + lja = ja + end if + call a%csget(imin,imax,nz,lia,lja,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + ia = lia + ja = lja + + end subroutine psb_s_lcsgetptn + + subroutine psb_s_lcsgetrow(imin,imax,a,nz,ia,ja,val,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + implicit none + class(psb_sspmat_type), intent(in) :: a + integer(psb_ipk_), intent(in) :: imin,imax + integer(psb_ipk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) + real(psb_spk_), allocatable, intent(inout) :: val(:) + integer(psb_ipk_),intent(out) :: info + logical, intent(in), optional :: append + integer(psb_ipk_), intent(in), optional :: iren(:) + integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + logical, intent(in), optional :: rscale,cscale + ! Local + integer(psb_ipk_), allocatable :: lia(:), lja(:) + + if (allocated(ia)) then + lia = ia + end if + if (allocated(ja)) then + lja = ja + end if + call a%csget(imin,imax,nz,lia,lja,val,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + ia = lia + ja = lja + + end subroutine psb_s_lcsgetrow +#endif end module psb_s_mat_mod diff --git a/base/modules/serial/psb_z_mat_mod.f90 b/base/modules/serial/psb_z_mat_mod.F90 similarity index 94% rename from base/modules/serial/psb_z_mat_mod.f90 rename to base/modules/serial/psb_z_mat_mod.F90 index 1ddc975e..7bcf71c7 100644 --- a/base/modules/serial/psb_z_mat_mod.f90 +++ b/base/modules/serial/psb_z_mat_mod.F90 @@ -127,7 +127,12 @@ module psb_z_mat_mod procedure, pass(a) :: csgetptn => psb_z_csgetptn procedure, pass(a) :: csgetrow => psb_z_csgetrow procedure, pass(a) :: csgetblk => psb_z_csgetblk - generic, public :: csget => csgetptn, csgetrow, csgetblk + generic, public :: csget => csgetptn, csgetrow, csgetblk +#if defined(INT_I4_L8) + procedure, pass(a) :: lcsgetptn => psb_z_lcsgetptn + procedure, pass(a) :: lcsgetrow => psb_z_lcsgetrow + generic, public :: csget => lcsgetptn, lcsgetrow +#endif procedure, pass(a) :: tril => psb_z_tril procedure, pass(a) :: triu => psb_z_triu procedure, pass(a) :: m_csclip => psb_z_csclip @@ -1292,5 +1297,63 @@ contains end subroutine psb_z_clean_zeros - +#if defined(INT_I4_L8) + subroutine psb_z_lcsgetptn(imin,imax,a,nz,ia,ja,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + implicit none + class(psb_zspmat_type), intent(in) :: a + integer(psb_ipk_), intent(in) :: imin,imax + integer(psb_ipk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) + integer(psb_ipk_),intent(out) :: info + logical, intent(in), optional :: append + integer(psb_ipk_), intent(in), optional :: iren(:) + integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + logical, intent(in), optional :: rscale,cscale + + ! Local + integer(psb_ipk_), allocatable :: lia(:), lja(:) + + if (allocated(ia)) then + lia = ia + end if + if (allocated(ja)) then + lja = ja + end if + call a%csget(imin,imax,nz,lia,lja,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + ia = lia + ja = lja + + end subroutine psb_z_lcsgetptn + + subroutine psb_z_lcsgetrow(imin,imax,a,nz,ia,ja,val,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + implicit none + class(psb_zspmat_type), intent(in) :: a + integer(psb_ipk_), intent(in) :: imin,imax + integer(psb_ipk_), intent(out) :: nz + integer(psb_lpk_), allocatable, intent(inout) :: ia(:), ja(:) + complex(psb_dpk_), allocatable, intent(inout) :: val(:) + integer(psb_ipk_),intent(out) :: info + logical, intent(in), optional :: append + integer(psb_ipk_), intent(in), optional :: iren(:) + integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin + logical, intent(in), optional :: rscale,cscale + ! Local + integer(psb_ipk_), allocatable :: lia(:), lja(:) + + if (allocated(ia)) then + lia = ia + end if + if (allocated(ja)) then + lja = ja + end if + call a%csget(imin,imax,nz,lia,lja,val,info,& + & jmin,jmax,iren,append,nzin,rscale,cscale) + ia = lia + ja = lja + + end subroutine psb_z_lcsgetrow +#endif end module psb_z_mat_mod diff --git a/util/psb_c_mat_dist_impl.f90 b/util/psb_c_mat_dist_impl.f90 index 0df855f6..60c34be2 100644 --- a/util/psb_c_mat_dist_impl.f90 +++ b/util/psb_c_mat_dist_impl.f90 @@ -88,11 +88,11 @@ subroutine psb_cmatdist(a_glob, a, ictxt, desc_a,& ! local variables logical :: use_parts, use_v integer(psb_ipk_) :: np, iam, np_sharing - integer(psb_ipk_) :: i_count, j_count,& - & k_count, root, liwork, nrow, ncol, nnzero, nrhs,& + integer(psb_ipk_) :: k_count, root, liwork, nnzero, nrhs,& & i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5) + integer(psb_lpk_) :: i_count, j_count, nrow, ncol, ig integer(psb_ipk_), allocatable :: iwork(:), iwrk2(:) - integer(psb_ipk_), allocatable :: irow(:),icol(:) + integer(psb_lpk_), allocatable :: irow(:),icol(:) complex(psb_spk_), allocatable :: val(:) integer(psb_ipk_), parameter :: nb=30 real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 diff --git a/util/psb_d_mat_dist_impl.f90 b/util/psb_d_mat_dist_impl.f90 index 97ed77be..90ed9497 100644 --- a/util/psb_d_mat_dist_impl.f90 +++ b/util/psb_d_mat_dist_impl.f90 @@ -88,11 +88,11 @@ subroutine psb_dmatdist(a_glob, a, ictxt, desc_a,& ! local variables logical :: use_parts, use_v integer(psb_ipk_) :: np, iam, np_sharing - integer(psb_ipk_) :: i_count, j_count,& - & k_count, root, liwork, nrow, ncol, nnzero, nrhs,& + integer(psb_ipk_) :: k_count, root, liwork, nnzero, nrhs,& & i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5) + integer(psb_lpk_) :: i_count, j_count, nrow, ncol, ig integer(psb_ipk_), allocatable :: iwork(:), iwrk2(:) - integer(psb_ipk_), allocatable :: irow(:),icol(:) + integer(psb_lpk_), allocatable :: irow(:),icol(:) real(psb_dpk_), allocatable :: val(:) integer(psb_ipk_), parameter :: nb=30 real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 diff --git a/util/psb_s_mat_dist_impl.f90 b/util/psb_s_mat_dist_impl.f90 index 51cb057d..165e7bb8 100644 --- a/util/psb_s_mat_dist_impl.f90 +++ b/util/psb_s_mat_dist_impl.f90 @@ -88,11 +88,11 @@ subroutine psb_smatdist(a_glob, a, ictxt, desc_a,& ! local variables logical :: use_parts, use_v integer(psb_ipk_) :: np, iam, np_sharing - integer(psb_ipk_) :: i_count, j_count,& - & k_count, root, liwork, nrow, ncol, nnzero, nrhs,& + integer(psb_ipk_) :: k_count, root, liwork, nnzero, nrhs,& & i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5) + integer(psb_lpk_) :: i_count, j_count, nrow, ncol, ig integer(psb_ipk_), allocatable :: iwork(:), iwrk2(:) - integer(psb_ipk_), allocatable :: irow(:),icol(:) + integer(psb_lpk_), allocatable :: irow(:),icol(:) real(psb_spk_), allocatable :: val(:) integer(psb_ipk_), parameter :: nb=30 real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 diff --git a/util/psb_z_mat_dist_impl.f90 b/util/psb_z_mat_dist_impl.f90 index e096c414..3de2f155 100644 --- a/util/psb_z_mat_dist_impl.f90 +++ b/util/psb_z_mat_dist_impl.f90 @@ -88,11 +88,11 @@ subroutine psb_zmatdist(a_glob, a, ictxt, desc_a,& ! local variables logical :: use_parts, use_v integer(psb_ipk_) :: np, iam, np_sharing - integer(psb_ipk_) :: i_count, j_count,& - & k_count, root, liwork, nrow, ncol, nnzero, nrhs,& + integer(psb_ipk_) :: k_count, root, liwork, nnzero, nrhs,& & i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5) + integer(psb_lpk_) :: i_count, j_count, nrow, ncol, ig integer(psb_ipk_), allocatable :: iwork(:), iwrk2(:) - integer(psb_ipk_), allocatable :: irow(:),icol(:) + integer(psb_lpk_), allocatable :: irow(:),icol(:) complex(psb_dpk_), allocatable :: val(:) integer(psb_ipk_), parameter :: nb=30 real(psb_dpk_) :: t0, t1, t2, t3, t4, t5