Merge branch 'development' into cmake

This commit is contained in:
Luca Pepè Sciarria
2025-03-28 09:44:02 +01:00
345 changed files with 3350 additions and 3093 deletions
+14 -14
View File
@@ -558,7 +558,7 @@ program pdgenmv
use psb_base_mod
use psb_util_mod
use psb_ext_mod
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
use psb_cuda_mod
#endif
#ifdef HAVE_RSB
@@ -583,7 +583,7 @@ program pdgenmv
type(psb_desc_type) :: desc_a
! dense matrices
type(psb_d_vect_type), target :: xv, bv, xg, bg
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
type(psb_d_vect_cuda) :: vmold
type(psb_i_vect_cuda) :: imold
#endif
@@ -605,10 +605,10 @@ program pdgenmv
#ifdef HAVE_RSB
type(psb_d_rsb_sparse_mat), target :: arsb
#endif
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
type(psb_d_cuda_elg_sparse_mat), target :: aelg
type(psb_d_cuda_csrg_sparse_mat), target :: acsrg
#if CUDA_SHORT_VERSION <= 10
#if PSB_CUDA_SHORT_VERSION <= 10
type(psb_d_cuda_hybg_sparse_mat), target :: ahybg
#endif
type(psb_d_cuda_hlg_sparse_mat), target :: ahlg
@@ -629,7 +629,7 @@ program pdgenmv
call psb_init(ctxt)
call psb_info(ctxt,iam,np)
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
call psb_cuda_init(ctxt)
#endif
#ifdef HAVE_RSB
@@ -650,7 +650,7 @@ program pdgenmv
write(*,*) 'Welcome to PSBLAS version: ',psb_version_string_
write(*,*) 'This is the ',trim(name),' sample program'
end if
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
write(*,*) 'Process ',iam,' running on device: ', psb_cuda_getDevice(),' out of', psb_cuda_getDeviceCount()
write(*,*) 'Process ',iam,' device ', psb_cuda_getDevice(),' is a: ', trim(psb_cuda_DeviceName())
#endif
@@ -709,7 +709,7 @@ program pdgenmv
stop
end if
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
select case(psb_toupper(agfmt))
case('ELG')
agmold => aelg
@@ -721,7 +721,7 @@ program pdgenmv
agmold => acsrg
case('DNSG')
agmold => adnsg
#if CUDA_SHORT_VERSION <= 10
#if PSB_CUDA_SHORT_VERSION <= 10
case('HYBG')
agmold => ahybg
#endif
@@ -764,7 +764,7 @@ program pdgenmv
call xv%bld(x0)
call psb_geasb(bv,desc_a,info,scratch=.true.)
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
call aux_a%cscnv(agpu,info,mold=acoo)
call xg%bld(x0,mold=vmold)
@@ -791,7 +791,7 @@ program pdgenmv
t2 = psb_wtime() - t1
call psb_amx(ctxt,t2)
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
call xg%set(x0)
! FIXME: cache flush needed here
@@ -887,7 +887,7 @@ program pdgenmv
tflops = flops
gflops = flops * ngpu
write(psb_out_unit,'("Storage type for A: ",a)') a%get_fmt()
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
write(psb_out_unit,'("Storage type for AGPU: ",a)') agpu%get_fmt()
write(psb_out_unit,'("Time to convert A from COO to CPU (1): ",F20.9)')&
& tcnvc1
@@ -917,7 +917,7 @@ program pdgenmv
& t2*1.d3/(1.d0*ntests)
write(psb_out_unit,'("MFLOPS (CPU) : ",F20.3)')&
& flops/1.d6
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
write(psb_out_unit,'("Time for ",i6," products (s) (xGPU) : ",F20.3)')&
& ntests, tt2
write(psb_out_unit,'("Time per product (ms) (xGPU) : ",F20.3)')&
@@ -942,7 +942,7 @@ program pdgenmv
bdwdth = ntests*nbytes/(t2*1.d6)
write(psb_out_unit,*)
write(psb_out_unit,'("MBYTES/S sust. effective bandwidth (CPU) : ",F20.3)') bdwdth
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
bdwdth = ngpu*ntests*nbytes/(gt2*1.d6)
write(psb_out_unit,'("MBYTES/S sust. effective bandwidth (GPU) : ",F20.3)') bdwdth
bdwdth = psb_cuda_MemoryPeakBandwidth()
@@ -967,7 +967,7 @@ program pdgenmv
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
call psb_cuda_exit()
#endif
call psb_exit(ctxt)
+14 -14
View File
@@ -547,7 +547,7 @@ program pdgenmv
use psb_base_mod
use psb_util_mod
use psb_ext_mod
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
use psb_cuda_mod
#endif
use psb_s_pde3d_mod
@@ -569,7 +569,7 @@ program pdgenmv
type(psb_desc_type) :: desc_a
! dense matrices
type(psb_s_vect_type), target :: xv,bv, xg, bg
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
type(psb_s_vect_cuda) :: vmold
type(psb_i_vect_cuda) :: imold
#endif
@@ -588,10 +588,10 @@ program pdgenmv
type(psb_s_hll_sparse_mat), target :: ahll
type(psb_s_dia_sparse_mat), target :: adia
type(psb_s_hdia_sparse_mat), target :: ahdia
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
type(psb_s_cuda_elg_sparse_mat), target :: aelg
type(psb_s_cuda_csrg_sparse_mat), target :: acsrg
#if CUDA_SHORT_VERSION <= 10
#if PSB_CUDA_SHORT_VERSION <= 10
type(psb_s_cuda_hybg_sparse_mat), target :: ahybg
#endif
type(psb_s_cuda_hlg_sparse_mat), target :: ahlg
@@ -612,7 +612,7 @@ program pdgenmv
call psb_init(ctxt)
call psb_info(ctxt,iam,np)
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
call psb_cuda_init(ctxt)
#endif
#ifdef HAVE_RSB
@@ -633,7 +633,7 @@ program pdgenmv
write(*,*) 'Welcome to PSBLAS version: ',psb_version_string_
write(*,*) 'This is the ',trim(name),' sample program'
end if
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
write(*,*) 'Process ',iam,' running on device: ', psb_cuda_getDevice(),' out of', psb_cuda_getDeviceCount()
write(*,*) 'Process ',iam,' device ', psb_cuda_getDevice(),' is a: ', trim(psb_cuda_DeviceName())
#endif
@@ -692,7 +692,7 @@ program pdgenmv
stop
end if
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
select case(psb_toupper(agfmt))
case('ELG')
agmold => aelg
@@ -704,7 +704,7 @@ program pdgenmv
agmold => acsrg
case('DNSG')
agmold => adnsg
#if CUDA_SHORT_VERSION <= 10
#if PSB_CUDA_SHORT_VERSION <= 10
case('HYBG')
agmold => ahybg
#endif
@@ -747,7 +747,7 @@ program pdgenmv
call xv%bld(x0)
call psb_geasb(bv,desc_a,info,scratch=.true.)
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
call aux_a%cscnv(agpu,info,mold=acoo)
call xg%bld(x0,mold=vmold)
@@ -774,7 +774,7 @@ program pdgenmv
t2 = psb_wtime() - t1
call psb_amx(ctxt,t2)
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
call xg%set(x0)
! FIXME: cache flush needed here
@@ -870,7 +870,7 @@ program pdgenmv
tflops = flops
gflops = flops * ngpu
write(psb_out_unit,'("Storage type for A: ",a)') a%get_fmt()
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
write(psb_out_unit,'("Storage type for AGPU: ",a)') agpu%get_fmt()
write(psb_out_unit,'("Time to convert A from COO to CPU (1): ",F20.9)')&
& tcnvc1
@@ -900,7 +900,7 @@ program pdgenmv
& t2*1.d3/(1.d0*ntests)
write(psb_out_unit,'("MFLOPS (CPU) : ",F20.3)')&
& flops/1.d6
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
write(psb_out_unit,'("Time for ",i6," products (s) (xGPU) : ",F20.3)')&
& ntests, tt2
write(psb_out_unit,'("Time per product (ms) (xGPU) : ",F20.3)')&
@@ -925,7 +925,7 @@ program pdgenmv
bdwdth = ntests*nbytes/(t2*1.d6)
write(psb_out_unit,*)
write(psb_out_unit,'("MBYTES/S sust. effective bandwidth (CPU) : ",F20.3)') bdwdth
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
bdwdth = ngpu*ntests*nbytes/(gt2*1.d6)
write(psb_out_unit,'("MBYTES/S sust. effective bandwidth (GPU) : ",F20.3)') bdwdth
bdwdth = psb_cuda_MemoryPeakBandwidth()
@@ -949,7 +949,7 @@ program pdgenmv
call psb_errpush(info,name,a_err=ch_err)
goto 9999
end if
#ifdef HAVE_CUDA
#ifdef PSB_HAVE_CUDA
call psb_cuda_exit()
#endif
call psb_exit(ctxt)
+1 -1
View File
@@ -198,7 +198,7 @@ contains
read(inp_unit,*) kmethd
read(inp_unit,*) ptype
read(inp_unit,*) afmt
read(inp_unit,*) ipart
read(inp_unit,*) part
call psb_bcast(ctxt,mtrx_file)
+6 -6
View File
@@ -172,7 +172,7 @@ contains
& f,amold,vmold,imold,partition,nrl,iv)
use psb_base_mod
use psb_util_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
!
@@ -332,7 +332,7 @@ contains
! A nifty MPI function will split the process list
npdims = 0
#if defined(SERIAL_MPI)
#if defined(PSB_SERIAL_MPI)
npdims = 1
#else
call mpi_dims_create(np,3,npdims,info)
@@ -459,7 +459,7 @@ contains
integer(psb_lpk_), allocatable :: irow(:),icol(:)
real(psb_dpk_), allocatable :: val(:)
real(psb_dpk_) :: x,y,z, zt(nb)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
nth = omp_get_num_threads()
ith = omp_get_thread_num()
#else
@@ -562,7 +562,7 @@ contains
endif
end do
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!!$ write(0,*) omp_get_thread_num(),' Check insertion ',&
!!$ & irow(1:icoeff-1),':',icol(1:icoeff-1)
#endif
@@ -661,7 +661,7 @@ program psb_d_pde3d
use psb_linsolve_mod
use psb_util_mod
use psb_d_pde3d_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
implicit none
@@ -710,7 +710,7 @@ program psb_d_pde3d
call psb_init(ctxt)
call psb_info(ctxt,iam,np)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!$OMP parallel shared(nth)
!$OMP master
nth = omp_get_num_threads()
+4 -4
View File
@@ -172,7 +172,7 @@ contains
& f,amold,vmold,imold,partition,nrl,iv)
use psb_base_mod
use psb_util_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
!
@@ -332,7 +332,7 @@ contains
! A nifty MPI function will split the process list
npdims = 0
#if defined(SERIAL_MPI)
#if defined(PSB_SERIAL_MPI)
npdims = 1
#else
call mpi_dims_create(np,3,npdims,info)
@@ -458,7 +458,7 @@ contains
integer(psb_lpk_), allocatable :: irow(:),icol(:)
real(psb_dpk_), allocatable :: val(:)
real(psb_dpk_) :: x,y,z, zt(nb)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
nth = omp_get_num_threads()
ith = omp_get_thread_num()
#else
@@ -557,7 +557,7 @@ contains
endif
end do
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!!$ write(0,*) omp_get_thread_num(),' Check insertion ',&
!!$ & irow(1:icoeff-1),':',icol(1:icoeff-1)
#endif
-8
View File
@@ -1,8 +0,0 @@
localhost
localhost
localhost
localhost
localhost
localhost
localhost
localhost
@@ -156,7 +156,7 @@ contains
& f,amold,vmold,imold,partition,nrl,iv)
use psb_base_mod
use psb_util_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
!
@@ -281,6 +281,7 @@ contains
! contiguous rows
!
call psb_cdall(ctxt,desc_a,info,nl=nr)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -308,6 +309,7 @@ contains
! process that owns it
!
call psb_cdall(ctxt,desc_a,info,vg=iv)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -316,7 +318,7 @@ contains
! A nifty MPI function will split the process list
npdims = 0
#if defined(SERIAL_MPI)
#if defined(PSB_SERIAL_MPI)
npdims = 1
#else
call mpi_dims_create(np,2,npdims,info)
@@ -357,6 +359,7 @@ contains
! the set of global indices it owns.
!
call psb_cdall(ctxt,desc_a,info,vl=myidx)
if (info /=0) goto 9999
!
! Specify process topology
@@ -422,7 +425,10 @@ contains
call psb_barrier(ctxt)
t1 = psb_wtime()
#if 0
!Disable parallel generation for the time being
!$omp parallel shared(deltah,myidx,a,desc_a)
#endif
!
block
integer(psb_ipk_) :: i,j,k,ii,ib,icoeff, ix,iy, ith,nth
@@ -430,7 +436,7 @@ contains
integer(psb_lpk_), allocatable :: irow(:),icol(:)
real(psb_dpk_), allocatable :: val(:)
real(psb_dpk_) :: x,y, zt(nb)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
nth = omp_get_num_threads()
ith = omp_get_thread_num()
#else
@@ -445,7 +451,10 @@ contains
!goto 9999
endif
#if 0
!Disable parallel generation for the time being
!$omp do schedule(dynamic)
#endif
!
do ii=1, nlr,nb
if(info /= psb_success_) cycle
@@ -509,7 +518,7 @@ contains
endif
end do
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!!$ write(0,*) omp_get_thread_num(),' Check insertion ',&
!!$ & irow(1:icoeff-1),':',icol(1:icoeff-1)
#endif
@@ -521,10 +530,16 @@ contains
call psb_geins(ib,myidx(ii:ii+ib-1),zt(1:ib),xv,desc_a,info)
if(info /= psb_success_) cycle
end do
#if 0
!Disable parallel generation for the time being
!$omp end do
#endif
deallocate(val,irow,icol)
end block
#if 0
!Disable parallel generation for the time being
!$omp end parallel
#endif
tgen = psb_wtime()-t1
@@ -598,7 +613,7 @@ program psb_d_pde2d
use psb_linsolve_mod
use psb_util_mod
use psb_d_pde2d_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
implicit none
@@ -647,7 +662,7 @@ program psb_d_pde2d
call psb_init(ctxt)
call psb_info(ctxt,iam,np)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!$OMP parallel shared(nth)
!$OMP master
nth = omp_get_num_threads()
@@ -172,7 +172,7 @@ contains
& f,amold,vmold,imold,partition,nrl,iv)
use psb_base_mod
use psb_util_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
!
@@ -297,6 +297,7 @@ contains
! contiguous rows
!
call psb_cdall(ctxt,desc_a,info,nl=nr)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -324,6 +325,7 @@ contains
! process that owns it
!
call psb_cdall(ctxt,desc_a,info,vg=iv)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -332,7 +334,7 @@ contains
! A nifty MPI function will split the process list
npdims = 0
#if defined(SERIAL_MPI)
#if defined(PSB_SERIAL_MPI)
npdims = 1
#else
call mpi_dims_create(np,3,npdims,info)
@@ -378,6 +380,7 @@ contains
! the set of global indices it owns.
!
call psb_cdall(ctxt,desc_a,info,vl=myidx)
if (info /=0) goto 9999
!
! Specify process topology
@@ -450,7 +453,10 @@ contains
call psb_barrier(ctxt)
t1 = psb_wtime()
#if 0
!Disable parallel generation for the time being
!$omp parallel shared(deltah,myidx,a,desc_a)
#endif
!
block
integer(psb_ipk_) :: i,j,k,ii,ib,icoeff, ix,iy,iz, ith,nth
@@ -458,7 +464,7 @@ contains
integer(psb_lpk_), allocatable :: irow(:),icol(:)
real(psb_dpk_), allocatable :: val(:)
real(psb_dpk_) :: x,y,z, zt(nb)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
nth = omp_get_num_threads()
ith = omp_get_thread_num()
#else
@@ -473,7 +479,10 @@ contains
!goto 9999
endif
#if 0
!Disable parallel generation for the time being
!$omp do schedule(dynamic)
#endif
!
do ii=1, nlr, nb
if(info /= psb_success_) cycle
@@ -557,7 +566,7 @@ contains
endif
end do
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!!$ write(0,*) omp_get_thread_num(),' Check insertion ',&
!!$ & irow(1:icoeff-1),':',icol(1:icoeff-1)
#endif
@@ -569,11 +578,16 @@ contains
call psb_geins(ib,myidx(ii:ii+ib-1),zt(1:ib),xv,desc_a,info)
if(info /= psb_success_) cycle
end do
#if 0
!Disable parallel generation for the time being
!$omp end do
#endif
deallocate(val,irow,icol)
end block
#if 0
!Disable parallel generation for the time being
!$omp end parallel
#endif
tgen = psb_wtime()-t1
if(info /= psb_success_) then
info=psb_err_from_subroutine_
@@ -656,7 +670,7 @@ program psb_d_pde3d
use psb_linsolve_mod
use psb_util_mod
use psb_d_pde3d_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
implicit none
@@ -705,7 +719,7 @@ program psb_d_pde3d
call psb_init(ctxt)
call psb_info(ctxt,iam,np)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!$OMP parallel shared(nth)
!$OMP master
nth = omp_get_num_threads()
@@ -156,7 +156,7 @@ contains
& f,amold,vmold,imold,partition,nrl,iv)
use psb_base_mod
use psb_util_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
!
@@ -281,6 +281,7 @@ contains
! contiguous rows
!
call psb_cdall(ctxt,desc_a,info,nl=nr)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -308,6 +309,7 @@ contains
! process that owns it
!
call psb_cdall(ctxt,desc_a,info,vg=iv)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -316,7 +318,7 @@ contains
! A nifty MPI function will split the process list
npdims = 0
#if defined(SERIAL_MPI)
#if defined(PSB_SERIAL_MPI)
npdims = 1
#else
call mpi_dims_create(np,2,npdims,info)
@@ -357,6 +359,7 @@ contains
! the set of global indices it owns.
!
call psb_cdall(ctxt,desc_a,info,vl=myidx)
if (info /=0) goto 9999
!
! Specify process topology
@@ -422,7 +425,10 @@ contains
call psb_barrier(ctxt)
t1 = psb_wtime()
#if 0
!Disable parallel generation for the time being
!$omp parallel shared(deltah,myidx,a,desc_a)
#endif
!
block
integer(psb_ipk_) :: i,j,k,ii,ib,icoeff, ix,iy, ith,nth
@@ -430,7 +436,7 @@ contains
integer(psb_lpk_), allocatable :: irow(:),icol(:)
real(psb_spk_), allocatable :: val(:)
real(psb_spk_) :: x,y, zt(nb)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
nth = omp_get_num_threads()
ith = omp_get_thread_num()
#else
@@ -445,7 +451,10 @@ contains
!goto 9999
endif
#if 0
!Disable parallel generation for the time being
!$omp do schedule(dynamic)
#endif
!
do ii=1, nlr,nb
if(info /= psb_success_) cycle
@@ -509,7 +518,7 @@ contains
endif
end do
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!!$ write(0,*) omp_get_thread_num(),' Check insertion ',&
!!$ & irow(1:icoeff-1),':',icol(1:icoeff-1)
#endif
@@ -521,10 +530,16 @@ contains
call psb_geins(ib,myidx(ii:ii+ib-1),zt(1:ib),xv,desc_a,info)
if(info /= psb_success_) cycle
end do
#if 0
!Disable parallel generation for the time being
!$omp end do
#endif
deallocate(val,irow,icol)
end block
#if 0
!Disable parallel generation for the time being
!$omp end parallel
#endif
tgen = psb_wtime()-t1
@@ -598,7 +613,7 @@ program psb_s_pde2d
use psb_linsolve_mod
use psb_util_mod
use psb_s_pde2d_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
implicit none
@@ -647,7 +662,7 @@ program psb_s_pde2d
call psb_init(ctxt)
call psb_info(ctxt,iam,np)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!$OMP parallel shared(nth)
!$OMP master
nth = omp_get_num_threads()
@@ -172,7 +172,7 @@ contains
& f,amold,vmold,imold,partition,nrl,iv)
use psb_base_mod
use psb_util_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
!
@@ -297,6 +297,7 @@ contains
! contiguous rows
!
call psb_cdall(ctxt,desc_a,info,nl=nr)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -324,6 +325,7 @@ contains
! process that owns it
!
call psb_cdall(ctxt,desc_a,info,vg=iv)
if (info /=0) goto 9999
myidx = desc_a%get_global_indices()
nlr = size(myidx)
@@ -332,7 +334,7 @@ contains
! A nifty MPI function will split the process list
npdims = 0
#if defined(SERIAL_MPI)
#if defined(PSB_SERIAL_MPI)
npdims = 1
#else
call mpi_dims_create(np,3,npdims,info)
@@ -378,6 +380,7 @@ contains
! the set of global indices it owns.
!
call psb_cdall(ctxt,desc_a,info,vl=myidx)
if (info /=0) goto 9999
!
! Specify process topology
@@ -450,7 +453,10 @@ contains
call psb_barrier(ctxt)
t1 = psb_wtime()
#if 0
!Disable parallel generation for the time being
!$omp parallel shared(deltah,myidx,a,desc_a)
#endif
!
block
integer(psb_ipk_) :: i,j,k,ii,ib,icoeff, ix,iy,iz, ith,nth
@@ -458,7 +464,7 @@ contains
integer(psb_lpk_), allocatable :: irow(:),icol(:)
real(psb_spk_), allocatable :: val(:)
real(psb_spk_) :: x,y,z, zt(nb)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
nth = omp_get_num_threads()
ith = omp_get_thread_num()
#else
@@ -473,7 +479,10 @@ contains
!goto 9999
endif
#if 0
!Disable parallel generation for the time being
!$omp do schedule(dynamic)
#endif
!
do ii=1, nlr, nb
if(info /= psb_success_) cycle
@@ -557,7 +566,7 @@ contains
endif
end do
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!!$ write(0,*) omp_get_thread_num(),' Check insertion ',&
!!$ & irow(1:icoeff-1),':',icol(1:icoeff-1)
#endif
@@ -569,11 +578,16 @@ contains
call psb_geins(ib,myidx(ii:ii+ib-1),zt(1:ib),xv,desc_a,info)
if(info /= psb_success_) cycle
end do
#if 0
!Disable parallel generation for the time being
!$omp end do
#endif
deallocate(val,irow,icol)
end block
#if 0
!Disable parallel generation for the time being
!$omp end parallel
#endif
tgen = psb_wtime()-t1
if(info /= psb_success_) then
info=psb_err_from_subroutine_
@@ -656,7 +670,7 @@ program psb_s_pde3d
use psb_linsolve_mod
use psb_util_mod
use psb_s_pde3d_mod
#if defined(OPENMP)
#if defined(PSB_OPENMP)
use omp_lib
#endif
implicit none
@@ -705,7 +719,7 @@ program psb_s_pde3d
call psb_init(ctxt)
call psb_info(ctxt,iam,np)
#if defined(OPENMP)
#if defined(PSB_OPENMP)
!$OMP parallel shared(nth)
!$OMP master
nth = omp_get_num_threads()
+18
View File
@@ -0,0 +1,18 @@
17 Number of entries below this
BICGSTAB Iterative method BICGSTAB CGS BICG BICGSTABL RGMRES FCG CGR RICHARDSON
BJAC Preconditioner NONE DIAG BJAC
CSR Storage format for matrix A: CSR COO
300 Domain size (acutal system is **2 (pde2d) )
3 Partition: 1 BLOCK 3 3D
2 Stopping criterion 1 2
0300 MAXIT
10 ITRACE
002 IRST restart for RGMRES and BiCGSTABL
INVK Block Solver ILU,ILUT,INVK,INVT,AINV
NONE If ILU : MILU or NONE othewise ignored
NONE Scaling if ILUT: NONE, MAXVAL otherwise ignored
0 Level of fill for forward factorization
1 Level of fill for inverse factorization (only INVK,INVT)
1E-1 Threshold for forward factorization
1E-1 Threshold for inverse factorization (Only INVK, INVT)
LLK What orthogonalization algorithm? (Only AINV)
@@ -2,7 +2,7 @@
BICGSTAB Iterative method BICGSTAB CGS BICG BICGSTABL RGMRES FCG CGR RICHARDSON
BJAC Preconditioner NONE DIAG BJAC
CSR Storage format for matrix A: CSR COO
200 Domain size (acutal system is this**3 (pde3d) or **2 (pde2d) )
100 Domain size (acutal system is this**3 (pde3d) )
3 Partition: 1 BLOCK 3 3D
2 Stopping criterion 1 2
0200 MAXIT