Commit c0697463 authored by mahe's avatar mahe
Browse files

added codes for profiling

parent e1538aab
...@@ -40,6 +40,8 @@ MODULE fourier_interpolation ...@@ -40,6 +40,8 @@ MODULE fourier_interpolation
INTEGER :: ig, i_dim INTEGER :: ig, i_dim
INTEGER :: h, k, l, hmax, kmax, lmax, hidx, kidx, lidx INTEGER :: h, k, l, hmax, kmax, lmax, hidx, kidx, lidx
! !
CALL start_clock('g2rmap')
!
nl = 0 nl = 0
! !
! Maximum Miller indexes associated to the R grid ! Maximum Miller indexes associated to the R grid
...@@ -95,6 +97,8 @@ MODULE fourier_interpolation ...@@ -95,6 +97,8 @@ MODULE fourier_interpolation
ENDDO ENDDO
ENDDO ENDDO
! !
CALL stop_clock('g2rmap')
!
END SUBROUTINE END SUBROUTINE
! !
! !
...@@ -131,6 +135,8 @@ MODULE fourier_interpolation ...@@ -131,6 +135,8 @@ MODULE fourier_interpolation
! !
! FFT is serial... ! FFT is serial...
! !
CALL start_clock('ftfw')
!
IF ( me_bgrp == 0 ) THEN IF ( me_bgrp == 0 ) THEN
! !
CALL cfft3d( fr, n1, n2, n3, n1, n2, n3, 1, -1) CALL cfft3d( fr, n1, n2, n3, n1, n2, n3, 1, -1)
...@@ -163,6 +169,8 @@ MODULE fourier_interpolation ...@@ -163,6 +169,8 @@ MODULE fourier_interpolation
! !
ENDDO ENDDO
! !
CALL stop_clock('ftfw')
!
ENDSUBROUTINE ENDSUBROUTINE
! !
! !
...@@ -197,6 +205,8 @@ MODULE fourier_interpolation ...@@ -197,6 +205,8 @@ MODULE fourier_interpolation
! !
INTEGER :: ig, idx INTEGER :: ig, idx
! !
CALL start_clock('ftinv')
!
fr = 0._DP fr = 0._DP
! !
IF( PRESENT(igk) ) THEN IF( PRESENT(igk) ) THEN
...@@ -241,6 +251,8 @@ MODULE fourier_interpolation ...@@ -241,6 +251,8 @@ MODULE fourier_interpolation
! !
ENDIF ENDIF
! !
CALL stop_clock('ftinv')
!
ENDSUBROUTINE ENDSUBROUTINE
! !
END MODULE END MODULE
...@@ -60,6 +60,8 @@ MODULE function3d ...@@ -60,6 +60,8 @@ MODULE function3d
CALL single_invfft_toArbitraryRGrid (funct3d_r_complex, nx, ny, nz, ng, ngx, nmaps, nl, funct3d_g) CALL single_invfft_toArbitraryRGrid (funct3d_r_complex, nx, ny, nz, ng, ngx, nmaps, nl, funct3d_g)
DEALLOCATE( nl ) DEALLOCATE( nl )
! !
CALL start_clock('write_d3f')
!
IF( me_bgrp == 0 ) THEN IF( me_bgrp == 0 ) THEN
! !
! 2) Encode ! 2) Encode
...@@ -127,6 +129,8 @@ MODULE function3d ...@@ -127,6 +129,8 @@ MODULE function3d
DEALLOCATE( funct3d_r_complex ) DEALLOCATE( funct3d_r_complex )
ENDIF ENDIF
! !
CALL stop_clock('write_d3f')
!
END SUBROUTINE END SUBROUTINE
! !
!----------------------------------------------------------------- !-----------------------------------------------------------------
...@@ -164,6 +168,8 @@ MODULE function3d ...@@ -164,6 +168,8 @@ MODULE function3d
INTEGER, ALLOCATABLE :: nl(:,:) INTEGER, ALLOCATABLE :: nl(:,:)
CHARACTER(LEN=:),ALLOCATABLE :: ctype CHARACTER(LEN=:),ALLOCATABLE :: ctype
! !
CALL start_clock('read_d3f')
!
IF( me_bgrp == 0 ) THEN IF( me_bgrp == 0 ) THEN
! !
OPEN(NEWUNIT=iu,FILE=TRIM(ADJUSTL(fname))) OPEN(NEWUNIT=iu,FILE=TRIM(ADJUSTL(fname)))
...@@ -261,6 +267,9 @@ MODULE function3d ...@@ -261,6 +267,9 @@ MODULE function3d
CALL mp_bcast(nx,0,intra_bgrp_comm) CALL mp_bcast(nx,0,intra_bgrp_comm)
CALL mp_bcast(ny,0,intra_bgrp_comm) CALL mp_bcast(ny,0,intra_bgrp_comm)
CALL mp_bcast(nz,0,intra_bgrp_comm) CALL mp_bcast(nz,0,intra_bgrp_comm)
!
CALL stop_clock('read_d3f')
!
IF( .NOT. ALLOCATED(funct3d_r_complex)) ALLOCATE( funct3d_r_complex(1:ndim) ) IF( .NOT. ALLOCATED(funct3d_r_complex)) ALLOCATE( funct3d_r_complex(1:ndim) )
! !
! 1) F interpolate funct3_r --> funct3d_g ! 1) F interpolate funct3_r --> funct3d_g
......
!
! Copyright (C) 2015-2017 M. Govoni
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
! Contributors to this file:
! Marco Govoni
!
!-----------------------------------------------------------------------
MODULE west_version
!-----------------------------------------------------------------------
!
IMPLICIT NONE
!
SAVE
!
CHARACTER (LEN=6) :: west_version_number = '3.1.0'
CHARACTER (LEN=12) :: west_svn_revision = 'unknown'
!
END MODULE
...@@ -20,13 +20,15 @@ PROGRAM wstat ...@@ -20,13 +20,15 @@ PROGRAM wstat
USE mp_global, ONLY : mp_startup, mp_global_end USE mp_global, ONLY : mp_startup, mp_global_end
USE west_environment, ONLY : west_environment_start, west_environment_end USE west_environment, ONLY : west_environment_start, west_environment_end
USE mp, ONLY : mp_sum,mp_barrier USE mp, ONLY : mp_sum,mp_barrier
USE mp_world, ONLY : world_comm
USE wavefunctions_module, ONLY : evc USE wavefunctions_module, ONLY : evc
USE function3d USE function3d
USE pwcom, ONLY : npw,npwx USE pwcom, ONLY : npw,npwx
USE westcom, ONLY : n_pdep_eigen
! !
IMPLICIT NONE IMPLICIT NONE
! !
INTEGER :: nx, ny, nz INTEGER :: nx, ny, nz, i
CHARACTER(LEN=9) :: code = 'WSTAT' CHARACTER(LEN=9) :: code = 'WSTAT'
! !
! *** START *** ! *** START ***
...@@ -45,6 +47,39 @@ PROGRAM wstat ...@@ -45,6 +47,39 @@ PROGRAM wstat
! !
CALL wstat_setup ( ) CALL wstat_setup ( )
! !
CALL mp_barrier( world_comm )
!
nx = n_pdep_eigen
ny = n_pdep_eigen
nz = n_pdep_eigen
!
PRINT*, 'nx, ny, nz = ', nx, ny, nz
DO i = 1, 100
!
PRINT*, 'Writing ', i, '%'
CALL write_function3d( 'wfcl.f3d', nx, ny, nz, npw, npwx, evc(:, 3))
!
ENDDO
!
CALL mp_barrier( world_comm )
!
DO i = 1, 100
!
PRINT*, 'Reading ', i, '%'
CALL read_function3d ( 'wfcl.f3d', nx, ny, nz, npw, npwx, evc(:, 3))
!
ENDDO
!
CALL mp_barrier( world_comm )
!
PRINT*, 'Reading finished'
!
CALL west_print_clocks( )
!
PRINT*, 'STOP'
!
STOP
!
CALL davidson_diago ( ) CALL davidson_diago ( )
! !
CALL exx_ungo ( ) CALL exx_ungo ( )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment