benchmark Program

Uses

  • program~~benchmark~~UsesGraph program~benchmark benchmark fortime fortime program~benchmark->fortime kinds kinds program~benchmark->kinds module~forpca forpca program~benchmark->module~forpca module~forpca->kinds foreig foreig module~forpca->foreig

Calls

program~~benchmark~~CallsGraph program~benchmark benchmark proc~deallocate_tpca forpca::tpca%deallocate_tpca program~benchmark->proc~deallocate_tpca proc~pca forpca::tpca%pca program~benchmark->proc~pca timer_start timer_start program~benchmark->timer_start timer_stop timer_stop program~benchmark->timer_stop proc~cmp_explained_variance forpca::tpca%cmp_explained_variance proc~pca->proc~cmp_explained_variance proc~compute_coeff forpca::tpca%compute_coeff proc~pca->proc~compute_coeff proc~compute_score forpca::tpca%compute_score proc~pca->proc~compute_score proc~initialize forpca::tpca%initialize proc~pca->proc~initialize proc~reconstruct_data forpca::tpca%reconstruct_data proc~pca->proc~reconstruct_data eig eig proc~compute_coeff->eig mask mask proc~compute_coeff->mask order order proc~compute_coeff->order svd svd proc~compute_coeff->svd

Variables

Type Attributes Name Initial
real(kind=rk), dimension(:,:), allocatable :: matrix
real(kind=rk), dimension(:,:), allocatable :: matrix_app
real(kind=rk), dimension(:,:), allocatable :: coeff
real(kind=rk), dimension(:,:), allocatable :: score
real(kind=rk), dimension(:), allocatable :: latent
real(kind=rk), dimension(:), allocatable :: explained
type(tpca) :: p
type(timer) :: t

Source Code

program benchmark

   use kinds
   use forpca, only: tpca
   use fortime, only: timer

   implicit none

   real(rk), dimension(:,:), allocatable :: matrix
   real(rk), dimension(:,:), allocatable :: matrix_app
   real(rk), dimension(:,:), allocatable :: coeff
   real(rk), dimension(:,:), allocatable :: score
   real(rk), dimension(:),   allocatable :: latent
   real(rk), dimension(:),   allocatable :: explained
   type(tpca)                            :: p
   type(timer)                           :: t

   allocate(matrix(200,200))

#if defined(USE_COARRAY)
   sync all
   call t%timer_start()
   call p%pca(matrix, 50, 'svd', coeff, score, latent, explained, matrix_app)
   call t%timer_stop(message=' Elapsed time (benchmark: pca, coarray):')
   sync all
   call p%finalize()
#else
   call t%timer_start()
   call p%pca(matrix, 50, 'svd', coeff, score, latent, explained, matrix_app)
   call t%timer_stop(message=' Elapsed time (benchmark: pca):')   
#endif

end program benchmark