Skip to content

Commit

Permalink
Fixing compile
Browse files Browse the repository at this point in the history
  • Loading branch information
scemama committed Jun 28, 2024
1 parent 85b1035 commit a5f4f05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/ccsd/ccsd_space_orb_sub.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -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)
! energy = energy + 2.d0*e


end

! Tau
Expand Down
23 changes: 9 additions & 14 deletions src/gpu/gpu_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -365,42 +365,42 @@ subroutine gpu_upload_double6(cpu_ptr, gpu_ptr)
subroutine gpu_download_double1(gpu_ptr, cpu_ptr)
implicit none
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))
end subroutine

subroutine gpu_download_double2(gpu_ptr, cpu_ptr)
implicit none
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))
end subroutine

subroutine gpu_download_double3(gpu_ptr, cpu_ptr)
implicit none
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))
end subroutine

subroutine gpu_download_double4(gpu_ptr, cpu_ptr)
implicit none
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))
end subroutine

subroutine gpu_download_double5(gpu_ptr, cpu_ptr)
implicit none
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))
end subroutine

subroutine gpu_download_double6(gpu_ptr, cpu_ptr)
implicit none
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))
end subroutine

Expand Down Expand Up @@ -454,19 +454,16 @@ subroutine gpu_copy_double6(gpu_ptr_src, gpu_ptr_dest)
! ----------

subroutine gpu_stream_create(stream)
import
type(gpu_stream) :: stream
call gpu_stream_create_c(stream%c)
end subroutine

subroutine gpu_stream_destroy(stream)
import
type(gpu_stream) :: stream
call gpu_stream_destroy_c(stream%c)
end subroutine

subroutine gpu_set_stream(handle, stream)
import
type(gpu_blas) :: handle
type(gpu_stream) :: stream
call gpu_set_stream_c(handle%c, stream%c)
Expand All @@ -477,13 +474,11 @@ subroutine gpu_set_stream(handle, stream)
! --------

subroutine gpu_blas_create(handle)
import
type(gpu_blas) :: handle
call gpu_blas_create_c(handle%c)
end subroutine

subroutine gpu_blas_destroy(handle)
import
type(gpu_blas) :: handle
call gpu_blas_destroy_c(handle%c)
end subroutine
Expand All @@ -500,7 +495,7 @@ subroutine gpu_ddot(handle, n, dx, incx, dy, incy, res)
use gpu
type(gpu_blas), intent(in) :: handle
integer*8 :: n, incx, incy
double precision, intent(in) :: dx(*), dy(*)
double precision, target, intent(in) :: dx(*), dy(*)
double precision, intent(out) :: res
call gpu_ddot_c(handle%c, n, c_loc(dx), incx, c_loc(dy), incy, res)
end subroutine
Expand All @@ -525,7 +520,7 @@ subroutine gpu_dgeam(handle, transa, transb, m, n, alpha, a, lda, beta, &
character, intent(in) :: transa, transb
integer*8, intent(in) :: m, n, lda, ldb, ldc
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, &
c_loc(b), ldb, c_loc(c), ldc)
end subroutine
Expand All @@ -537,7 +532,7 @@ subroutine gpu_sgeam(handle, transa, transb, m, n, alpha, a, lda, beta, &
character, intent(in) :: transa, transb
integer*8, intent(in) :: m, n, lda, ldb, ldc
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, &
c_loc(b), ldb, c_loc(c), ldc)
end subroutine
Expand Down

0 comments on commit a5f4f05

Please sign in to comment.