Commit 40de4b47 authored by Andreas Marek's avatar Andreas Marek

Keep tmat on device

parent 16300a2e
......@@ -1973,15 +1973,15 @@
endif
!#ifdef WITH_MPI
! it should be possible to keep tmat dev on the device and not copy it arround
! this is not necessary tmat_dev is passed (unchanged) from one routine to the other
successCUDA = cuda_free(tmat_dev)
if (.not.(successCUDA)) then
print *,"bandred_&
&MATH_DATATYPE&
&: error in cudaFree"
stop
endif
!! it should be possible to keep tmat dev on the device and not copy it arround
!! this is not necessary tmat_dev is passed (unchanged) from one routine to the other
! successCUDA = cuda_free(tmat_dev)
! if (.not.(successCUDA)) then
! print *,"bandred_&
! &MATH_DATATYPE&
! &: error in cudaFree"
! stop
! endif
!#endif
successCUDA = cuda_free(vav_dev)
......
......@@ -281,22 +281,22 @@
endif
!#ifdef WITH_MPI
! it should be possible to keep tmat dev on the device and not copy it around
! already existent on GPU
successCUDA = cuda_malloc(tmat_dev, nbw*nbw* &
#if REALCASE == 1
size_of_PRECISION_real)
#endif
#if COMPLEXCASE == 1
size_of_PRECISION_complex)
#endif
if (.not.(successCUDA)) then
print *,"trans_ev_band_to_full_&
&MATH_DATATYPE&
&: error in cudaMalloc"
stop
endif
!! it should be possible to keep tmat dev on the device and not copy it around
!! already existent on GPU
! successCUDA = cuda_malloc(tmat_dev, nbw*nbw* &
!#if REALCASE == 1
! size_of_PRECISION_real)
!#endif
!#if COMPLEXCASE == 1
! size_of_PRECISION_complex)
!#endif
!
! if (.not.(successCUDA)) then
! print *,"trans_ev_band_to_full_&
! &MATH_DATATYPE&
! &: error in cudaMalloc"
! stop
! endif
!#endif
#if REALCASE == 1
......@@ -564,24 +564,24 @@
#endif /* WITH_MPI */
!#ifdef WITH_MPI
! it should be possible to keep tmat on the device and not copy it aroud
! ! copy to device, maybe this can be avoided tmat is input from bandred_real
successCUDA = cuda_memcpy(tmat_dev, loc(tmat(1,1,istep)), nbw*nbw* &
#if REALCASE == 1
size_of_PRECISION_real, &
#endif
#if COMPLEXCASE == 1
size_of_PRECISION_complex, &
#endif
cudaMemcpyHostToDevice)
if (.not.(successCUDA)) then
print *,"trans_ev_band_to_full_&
&MATH_DATATYPE&
&: error in cudaMemcpy"
stop
endif
!! it should be possible to keep tmat on the device and not copy it aroud
!! ! copy to device, maybe this can be avoided tmat is input from bandred_real
!
! successCUDA = cuda_memcpy(tmat_dev, loc(tmat(1,1,istep)), nbw*nbw* &
!#if REALCASE == 1
! size_of_PRECISION_real, &
!#endif
!#if COMPLEXCASE == 1
! size_of_PRECISION_complex, &
!#endif
! cudaMemcpyHostToDevice)
!
! if (.not.(successCUDA)) then
! print *,"trans_ev_band_to_full_&
! &MATH_DATATYPE&
! &: error in cudaMemcpy"
! stop
! endif
!#endif /* WITH_MPI */
call timer%start("cublas")
......
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