mirror of
https://github.com/pfloos/quack
synced 2025-01-03 01:56:09 +01:00
few modifs
This commit is contained in:
parent
e43a56e042
commit
1a091a0707
@ -32,6 +32,7 @@ subroutine phRRPA(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,
|
|||||||
integer :: i
|
integer :: i
|
||||||
integer :: ispin
|
integer :: ispin
|
||||||
logical :: dRPA
|
logical :: dRPA
|
||||||
|
double precision :: t1, t2
|
||||||
double precision :: lambda
|
double precision :: lambda
|
||||||
double precision,allocatable :: Aph(:,:)
|
double precision,allocatable :: Aph(:,:)
|
||||||
double precision,allocatable :: Bph(:,:)
|
double precision,allocatable :: Bph(:,:)
|
||||||
@ -72,10 +73,16 @@ subroutine phRRPA(dotest,TDA,doACFDT,exchange_kernel,singlet,triplet,nBas,nC,nO,
|
|||||||
|
|
||||||
ispin = 1
|
ispin = 1
|
||||||
|
|
||||||
|
!call wall_time(t1)
|
||||||
call phLR_A(ispin,dRPA,nBas,nC,nO,nV,nR,nS,lambda,eHF,ERI,Aph)
|
call phLR_A(ispin,dRPA,nBas,nC,nO,nV,nR,nS,lambda,eHF,ERI,Aph)
|
||||||
|
!call wall_time(t2)
|
||||||
|
!print *, "wall time for A on CPU (sec) = ", t2 - t1
|
||||||
if(.not.TDA) call phLR_B(ispin,dRPA,nBas,nC,nO,nV,nR,nS,lambda,ERI,Bph)
|
if(.not.TDA) call phLR_B(ispin,dRPA,nBas,nC,nO,nV,nR,nS,lambda,ERI,Bph)
|
||||||
|
|
||||||
|
!call wall_time(t1)
|
||||||
call phLR(TDA,nS,Aph,Bph,EcRPA(ispin),Om,XpY,XmY)
|
call phLR(TDA,nS,Aph,Bph,EcRPA(ispin),Om,XpY,XmY)
|
||||||
|
!call wall_time(t2)
|
||||||
|
!print *, "wall time diag A on CPU (sec) = ", t2 - t1
|
||||||
call print_excitation_energies('phRPA@RHF','singlet',nS,Om)
|
call print_excitation_energies('phRPA@RHF','singlet',nS,Om)
|
||||||
call phLR_transition_vectors(.true.,nBas,nC,nO,nV,nR,nS,dipole_int,Om,XpY,XmY)
|
call phLR_transition_vectors(.true.,nBas,nC,nO,nV,nR,nS,dipole_int,Om,XpY,XmY)
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ extern "C" void diag_dn_dsyevd(int n, int *info, double *W, double *A) {
|
|||||||
cusolverDnHandle_t cusolverH = NULL;
|
cusolverDnHandle_t cusolverH = NULL;
|
||||||
cusolverEigMode_t jobz = CUSOLVER_EIG_MODE_VECTOR; // Compute eigenvalues and eigenvectors
|
cusolverEigMode_t jobz = CUSOLVER_EIG_MODE_VECTOR; // Compute eigenvalues and eigenvectors
|
||||||
cublasFillMode_t uplo = CUBLAS_FILL_MODE_UPPER; // Upper triangular part of the matrix is stored
|
cublasFillMode_t uplo = CUBLAS_FILL_MODE_UPPER; // Upper triangular part of the matrix is stored
|
||||||
|
//cublasFillMode_t uplo = CUBLAS_FILL_MODE_LOWER; // Upper triangular part of the matrix is stored
|
||||||
|
|
||||||
int lwork = 0;
|
int lwork = 0;
|
||||||
double *work = NULL;
|
double *work = NULL;
|
||||||
|
@ -83,10 +83,6 @@ void ph_drpa_tda_sing(int nO, int nBas, int nS, double *h_eps, double *h_ERI,
|
|||||||
"cudaMemcpy", __FILE__, __LINE__);
|
"cudaMemcpy", __FILE__, __LINE__);
|
||||||
check_Cuda_Errors(cudaMemcpy(h_Omega, d_Omega, nS * sizeof(double), cudaMemcpyDeviceToHost),
|
check_Cuda_Errors(cudaMemcpy(h_Omega, d_Omega, nS * sizeof(double), cudaMemcpyDeviceToHost),
|
||||||
"cudaMemcpy", __FILE__, __LINE__);
|
"cudaMemcpy", __FILE__, __LINE__);
|
||||||
|
|
||||||
cudaEventRecord(start, 0);
|
|
||||||
diag_dn_dsyevd(nS, d_info, d_Omega, d_A);
|
|
||||||
check_Cuda_Errors(cudaGetLastError(), "cudaGetLastError", __FILE__, __LINE__);
|
|
||||||
cudaEventRecord(stop, 0);
|
cudaEventRecord(stop, 0);
|
||||||
cudaEventSynchronize(stop);
|
cudaEventSynchronize(stop);
|
||||||
cudaEventElapsedTime(&elapsedTime, start, stop);
|
cudaEventElapsedTime(&elapsedTime, start, stop);
|
||||||
|
@ -20,7 +20,7 @@ subroutine read_dipole_integrals(working_dir,nBas,R)
|
|||||||
|
|
||||||
double precision,intent(out) :: R(nBas,nBas,ncart)
|
double precision,intent(out) :: R(nBas,nBas,ncart)
|
||||||
|
|
||||||
integer :: status, ios
|
integer :: ios
|
||||||
character(len=256) :: file_path
|
character(len=256) :: file_path
|
||||||
|
|
||||||
|
|
||||||
@ -29,9 +29,9 @@ subroutine read_dipole_integrals(working_dir,nBas,R)
|
|||||||
R(:,:,:) = 0d0
|
R(:,:,:) = 0d0
|
||||||
|
|
||||||
file_path = trim(working_dir) // '/int/x.dat'
|
file_path = trim(working_dir) // '/int/x.dat'
|
||||||
open(unit=21, file=file_path, status='old', action='read', iostat=status)
|
open(unit=21, file=file_path, status='old', action='read', iostat=ios)
|
||||||
|
|
||||||
if(status /= 0) then
|
if(ios /= 0) then
|
||||||
|
|
||||||
print *, "Error opening file: ", file_path
|
print *, "Error opening file: ", file_path
|
||||||
stop
|
stop
|
||||||
@ -39,7 +39,7 @@ subroutine read_dipole_integrals(working_dir,nBas,R)
|
|||||||
else
|
else
|
||||||
|
|
||||||
do
|
do
|
||||||
read(21, '(I5, I5, E25.17)', iostat=ios) mu, nu, Dip
|
read(21, '(I7, I7, E25.17)', iostat=ios) mu, nu, Dip
|
||||||
if(ios /= 0) exit
|
if(ios /= 0) exit
|
||||||
R(mu,nu,1) = Dip
|
R(mu,nu,1) = Dip
|
||||||
R(nu,mu,1) = Dip
|
R(nu,mu,1) = Dip
|
||||||
@ -52,9 +52,9 @@ subroutine read_dipole_integrals(working_dir,nBas,R)
|
|||||||
! ---
|
! ---
|
||||||
|
|
||||||
file_path = trim(working_dir) // '/int/y.dat'
|
file_path = trim(working_dir) // '/int/y.dat'
|
||||||
open(unit=22, file=file_path, status='old', action='read', iostat=status)
|
open(unit=22, file=file_path, status='old', action='read', iostat=ios)
|
||||||
|
|
||||||
if(status /= 0) then
|
if(ios /= 0) then
|
||||||
|
|
||||||
print *, "Error opening file: ", file_path
|
print *, "Error opening file: ", file_path
|
||||||
stop
|
stop
|
||||||
@ -62,7 +62,7 @@ subroutine read_dipole_integrals(working_dir,nBas,R)
|
|||||||
else
|
else
|
||||||
|
|
||||||
do
|
do
|
||||||
read(22, '(I5, I5, E25.17)', iostat=ios) mu, nu, Dip
|
read(22, '(I7, I7, E25.17)', iostat=ios) mu, nu, Dip
|
||||||
if(ios /= 0) exit
|
if(ios /= 0) exit
|
||||||
R(mu,nu,2) = Dip
|
R(mu,nu,2) = Dip
|
||||||
R(nu,mu,2) = Dip
|
R(nu,mu,2) = Dip
|
||||||
@ -75,9 +75,9 @@ subroutine read_dipole_integrals(working_dir,nBas,R)
|
|||||||
! ---
|
! ---
|
||||||
|
|
||||||
file_path = trim(working_dir) // '/int/z.dat'
|
file_path = trim(working_dir) // '/int/z.dat'
|
||||||
open(unit=23, file=file_path, status='old', action='read', iostat=status)
|
open(unit=23, file=file_path, status='old', action='read', iostat=ios)
|
||||||
|
|
||||||
if(status /= 0) then
|
if(ios /= 0) then
|
||||||
|
|
||||||
print *, "Error opening file: ", file_path
|
print *, "Error opening file: ", file_path
|
||||||
stop
|
stop
|
||||||
@ -85,7 +85,7 @@ subroutine read_dipole_integrals(working_dir,nBas,R)
|
|||||||
else
|
else
|
||||||
|
|
||||||
do
|
do
|
||||||
read(23, '(I5, I5, E25.17)', iostat=ios) mu, nu, Dip
|
read(23, '(I7, I7, E25.17)', iostat=ios) mu, nu, Dip
|
||||||
if(ios /= 0) exit
|
if(ios /= 0) exit
|
||||||
R(mu,nu,3) = Dip
|
R(mu,nu,3) = Dip
|
||||||
R(nu,mu,3) = Dip
|
R(nu,mu,3) = Dip
|
||||||
|
Loading…
Reference in New Issue
Block a user