Atomic starting wavefunctions can be computed on GPU: the code already exists.

This commit is contained in:
Paolo Giannozzi 2021-05-01 14:30:38 +02:00
parent 2c0c4816b1
commit 4d1a7c9787
1 changed files with 1 additions and 7 deletions

View File

@ -238,7 +238,6 @@ SUBROUTINE init_wfc_gpu ( ik )
REAL(DP), ALLOCATABLE :: etatom_d(:) ! atomic eigenvalues
!
COMPLEX(DP), ALLOCATABLE :: wfcatom_d(:,:,:) ! atomic wfcs for initialization (device)
COMPLEX(DP), ALLOCATABLE :: wfcatom_h(:,:,:) ! atomic wfcs for initialization (host)
REAL(DP), ALLOCATABLE :: randy_d(:) ! data for random
!
! Auxiliary variables for CUDA version
@ -273,15 +272,10 @@ SUBROUTINE init_wfc_gpu ( ik )
!
IF ( starting_wfc(1:6) == 'atomic' ) THEN
!
ALLOCATE( wfcatom_h( npwx, npol, n_starting_wfc ) )
CALL start_clock_gpu( 'wfcinit:atomic' ); !write(*,*) 'start wfcinit:atomic' ; FLUSH(6)
CALL atomic_wfc( ik, wfcatom_h )
CALL atomic_wfc_gpu( ik, wfcatom_d )
CALL stop_clock_gpu( 'wfcinit:atomic' ); !write(*,*) 'stop wfcinit:atomic' ; FLUSH(6)
!
! Sync to GPU
wfcatom_d = wfcatom_h
DEALLOCATE( wfcatom_h )
!
IF ( starting_wfc == 'atomic+random' .AND. &
n_starting_wfc == n_starting_atomic_wfc ) THEN
!