9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-07-27 12:57:24 +02:00

Fixing compile

This commit is contained in:
Anthony Scemama 2024-06-28 17:39:43 +02:00
parent 85b1035cfb
commit a5f4f0516e
2 changed files with 9 additions and 15 deletions

View File

@ -306,7 +306,6 @@ subroutine ccsd_energy_space_x(nO,nV,d_cc_space_v_oovv,d_cc_space_f_vo,tau_x,t1,
! call gpu_ddot(blas_handle, nO*nV*1_8, d_cc_space_f_vo, 1, t1, 1, e) ! call gpu_ddot(blas_handle, nO*nV*1_8, d_cc_space_f_vo, 1, t1, 1, e)
! energy = energy + 2.d0*e ! energy = energy + 2.d0*e
end end
! Tau ! Tau

View File

@ -365,42 +365,42 @@ module gpu
subroutine gpu_download_double1(gpu_ptr, cpu_ptr) subroutine gpu_download_double1(gpu_ptr, cpu_ptr)
implicit none implicit none
type(gpu_double1), intent(in) :: gpu_ptr type(gpu_double1), intent(in) :: gpu_ptr
double precision, intent(in) :: cpu_ptr(:) double precision, target, intent(in) :: cpu_ptr(:)
call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*size(gpu_ptr%f)) call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*size(gpu_ptr%f))
end subroutine end subroutine
subroutine gpu_download_double2(gpu_ptr, cpu_ptr) subroutine gpu_download_double2(gpu_ptr, cpu_ptr)
implicit none implicit none
type(gpu_double2), intent(in) :: gpu_ptr type(gpu_double2), intent(in) :: gpu_ptr
double precision, intent(in) :: cpu_ptr(:,:) double precision, target, intent(in) :: cpu_ptr(:,:)
call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*product(shape(gpu_ptr%f)*1_8)) call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*product(shape(gpu_ptr%f)*1_8))
end subroutine end subroutine
subroutine gpu_download_double3(gpu_ptr, cpu_ptr) subroutine gpu_download_double3(gpu_ptr, cpu_ptr)
implicit none implicit none
type(gpu_double3), intent(in) :: gpu_ptr type(gpu_double3), intent(in) :: gpu_ptr
double precision, intent(in) :: cpu_ptr(:,:,:) double precision, target, intent(in) :: cpu_ptr(:,:,:)
call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*product(shape(gpu_ptr%f)*1_8)) call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*product(shape(gpu_ptr%f)*1_8))
end subroutine end subroutine
subroutine gpu_download_double4(gpu_ptr, cpu_ptr) subroutine gpu_download_double4(gpu_ptr, cpu_ptr)
implicit none implicit none
type(gpu_double4), intent(in) :: gpu_ptr type(gpu_double4), intent(in) :: gpu_ptr
double precision, intent(in) :: cpu_ptr(:,:,:,:) double precision, target, intent(in) :: cpu_ptr(:,:,:,:)
call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*product(shape(gpu_ptr%f)*1_8)) call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*product(shape(gpu_ptr%f)*1_8))
end subroutine end subroutine
subroutine gpu_download_double5(gpu_ptr, cpu_ptr) subroutine gpu_download_double5(gpu_ptr, cpu_ptr)
implicit none implicit none
type(gpu_double5), intent(in) :: gpu_ptr type(gpu_double5), intent(in) :: gpu_ptr
double precision, intent(in) :: cpu_ptr(:,:,:,:,:) double precision, target, intent(in) :: cpu_ptr(:,:,:,:,:)
call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*product(shape(gpu_ptr%f)*1_8)) call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*product(shape(gpu_ptr%f)*1_8))
end subroutine end subroutine
subroutine gpu_download_double6(gpu_ptr, cpu_ptr) subroutine gpu_download_double6(gpu_ptr, cpu_ptr)
implicit none implicit none
type(gpu_double6), intent(in) :: gpu_ptr type(gpu_double6), intent(in) :: gpu_ptr
double precision, intent(in) :: cpu_ptr(:,:,:,:,:,:) double precision, target, intent(in) :: cpu_ptr(:,:,:,:,:,:)
call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*product(shape(gpu_ptr%f)*1_8)) call gpu_download_c(gpu_ptr%c, c_loc(cpu_ptr), 8_8*product(shape(gpu_ptr%f)*1_8))
end subroutine end subroutine
@ -454,19 +454,16 @@ module gpu
! ---------- ! ----------
subroutine gpu_stream_create(stream) subroutine gpu_stream_create(stream)
import
type(gpu_stream) :: stream type(gpu_stream) :: stream
call gpu_stream_create_c(stream%c) call gpu_stream_create_c(stream%c)
end subroutine end subroutine
subroutine gpu_stream_destroy(stream) subroutine gpu_stream_destroy(stream)
import
type(gpu_stream) :: stream type(gpu_stream) :: stream
call gpu_stream_destroy_c(stream%c) call gpu_stream_destroy_c(stream%c)
end subroutine end subroutine
subroutine gpu_set_stream(handle, stream) subroutine gpu_set_stream(handle, stream)
import
type(gpu_blas) :: handle type(gpu_blas) :: handle
type(gpu_stream) :: stream type(gpu_stream) :: stream
call gpu_set_stream_c(handle%c, stream%c) call gpu_set_stream_c(handle%c, stream%c)
@ -477,13 +474,11 @@ module gpu
! -------- ! --------
subroutine gpu_blas_create(handle) subroutine gpu_blas_create(handle)
import
type(gpu_blas) :: handle type(gpu_blas) :: handle
call gpu_blas_create_c(handle%c) call gpu_blas_create_c(handle%c)
end subroutine end subroutine
subroutine gpu_blas_destroy(handle) subroutine gpu_blas_destroy(handle)
import
type(gpu_blas) :: handle type(gpu_blas) :: handle
call gpu_blas_destroy_c(handle%c) call gpu_blas_destroy_c(handle%c)
end subroutine end subroutine
@ -500,7 +495,7 @@ subroutine gpu_ddot(handle, n, dx, incx, dy, incy, res)
use gpu use gpu
type(gpu_blas), intent(in) :: handle type(gpu_blas), intent(in) :: handle
integer*8 :: n, incx, incy integer*8 :: n, incx, incy
double precision, intent(in) :: dx(*), dy(*) double precision, target, intent(in) :: dx(*), dy(*)
double precision, intent(out) :: res double precision, intent(out) :: res
call gpu_ddot_c(handle%c, n, c_loc(dx), incx, c_loc(dy), incy, res) call gpu_ddot_c(handle%c, n, c_loc(dx), incx, c_loc(dy), incy, res)
end subroutine end subroutine
@ -525,7 +520,7 @@ subroutine gpu_dgeam(handle, transa, transb, m, n, alpha, a, lda, beta, &
character, intent(in) :: transa, transb character, intent(in) :: transa, transb
integer*8, intent(in) :: m, n, lda, ldb, ldc integer*8, intent(in) :: m, n, lda, ldb, ldc
double precision, intent(in) :: alpha, beta double precision, intent(in) :: alpha, beta
double precision :: a(lda,*), b(ldb,*), c(ldc,*) double precision, target :: a(lda,*), b(ldb,*), c(ldc,*)
call gpu_dgeam_c(handle%c, transa, transb, m, n, alpha, c_loc(a), lda, beta, & call gpu_dgeam_c(handle%c, transa, transb, m, n, alpha, c_loc(a), lda, beta, &
c_loc(b), ldb, c_loc(c), ldc) c_loc(b), ldb, c_loc(c), ldc)
end subroutine end subroutine
@ -537,7 +532,7 @@ subroutine gpu_sgeam(handle, transa, transb, m, n, alpha, a, lda, beta, &
character, intent(in) :: transa, transb character, intent(in) :: transa, transb
integer*8, intent(in) :: m, n, lda, ldb, ldc integer*8, intent(in) :: m, n, lda, ldb, ldc
real, intent(in) :: alpha, beta real, intent(in) :: alpha, beta
real :: a(lda,*), b(ldb,*), c(ldc,*) real, target :: a(lda,*), b(ldb,*), c(ldc,*)
call gpu_sgeam_c(handle%c, transa, transb, m, n, alpha, c_loc(a), lda, beta, & call gpu_sgeam_c(handle%c, transa, transb, m, n, alpha, c_loc(a), lda, beta, &
c_loc(b), ldb, c_loc(c), ldc) c_loc(b), ldb, c_loc(c), ldc)
end subroutine end subroutine