|
|
@ -73,6 +73,9 @@ program amg_d_pde2d
|
|
|
|
use amg_d_pde2d_exp_mod
|
|
|
|
use amg_d_pde2d_exp_mod
|
|
|
|
use amg_d_pde2d_box_mod
|
|
|
|
use amg_d_pde2d_box_mod
|
|
|
|
use amg_d_genpde_mod
|
|
|
|
use amg_d_genpde_mod
|
|
|
|
|
|
|
|
#if defined(OPENMP)
|
|
|
|
|
|
|
|
use omp_lib
|
|
|
|
|
|
|
|
#endif
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
! input parameters
|
|
|
|
! input parameters
|
|
|
@ -93,7 +96,7 @@ program amg_d_pde2d
|
|
|
|
type(psb_d_vect_type) :: x,b,r
|
|
|
|
type(psb_d_vect_type) :: x,b,r
|
|
|
|
! parallel environment
|
|
|
|
! parallel environment
|
|
|
|
type(psb_ctxt_type) :: ctxt
|
|
|
|
type(psb_ctxt_type) :: ctxt
|
|
|
|
integer(psb_ipk_) :: iam, np
|
|
|
|
integer(psb_ipk_) :: iam, np, nth
|
|
|
|
|
|
|
|
|
|
|
|
! solver parameters
|
|
|
|
! solver parameters
|
|
|
|
integer(psb_ipk_) :: iter, itmax,itrace, istopc, irst, nlv
|
|
|
|
integer(psb_ipk_) :: iter, itmax,itrace, istopc, irst, nlv
|
|
|
@ -197,6 +200,15 @@ program amg_d_pde2d
|
|
|
|
|
|
|
|
|
|
|
|
call psb_init(ctxt)
|
|
|
|
call psb_init(ctxt)
|
|
|
|
call psb_info(ctxt,iam,np)
|
|
|
|
call psb_info(ctxt,iam,np)
|
|
|
|
|
|
|
|
#if defined(OPENMP)
|
|
|
|
|
|
|
|
!$OMP parallel shared(nth)
|
|
|
|
|
|
|
|
!$OMP master
|
|
|
|
|
|
|
|
nth = omp_get_num_threads()
|
|
|
|
|
|
|
|
!$OMP end master
|
|
|
|
|
|
|
|
!$OMP end parallel
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
nth = 1
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
if (iam < 0) then
|
|
|
|
if (iam < 0) then
|
|
|
|
! This should not happen, but just in case
|
|
|
|
! This should not happen, but just in case
|
|
|
@ -451,7 +463,9 @@ program amg_d_pde2d
|
|
|
|
call psb_sum(ctxt,precsize)
|
|
|
|
call psb_sum(ctxt,precsize)
|
|
|
|
call prec%descr(info,iout=psb_out_unit)
|
|
|
|
call prec%descr(info,iout=psb_out_unit)
|
|
|
|
if (iam == psb_root_) then
|
|
|
|
if (iam == psb_root_) then
|
|
|
|
write(psb_out_unit,'("Computed solution on ",i8," processors")') np
|
|
|
|
write(psb_out_unit,'("Computed solution on ",i8," processors")') np
|
|
|
|
|
|
|
|
write(psb_out_unit,'("Number of threads : ",i12)') nth
|
|
|
|
|
|
|
|
write(psb_out_unit,'("Total number of tasks : ",i12)') nth*np
|
|
|
|
write(psb_out_unit,'("Linear system size : ",i12)') system_size
|
|
|
|
write(psb_out_unit,'("Linear system size : ",i12)') system_size
|
|
|
|
write(psb_out_unit,'("PDE Coefficients : ",a)') trim(pdecoeff)
|
|
|
|
write(psb_out_unit,'("PDE Coefficients : ",a)') trim(pdecoeff)
|
|
|
|
write(psb_out_unit,'("Krylov method : ",a)') trim(s_choice%kmethd)
|
|
|
|
write(psb_out_unit,'("Krylov method : ",a)') trim(s_choice%kmethd)
|