|
|
|
@ -729,7 +729,7 @@ contains
|
|
|
|
|
if (c_associated(x%deviceVect)) then
|
|
|
|
|
nd = getMultiVecDeviceSize(x%deviceVect)
|
|
|
|
|
if (nd < nh ) then
|
|
|
|
|
call trackCudaFree(' c_vect_cuda ',x%sizeof())
|
|
|
|
|
call trackCudaFree(' c_vect_cuda 1',x%sizeof())
|
|
|
|
|
call freeMultiVecDevice(x%deviceVect)
|
|
|
|
|
x%deviceVect=c_null_ptr
|
|
|
|
|
end if
|
|
|
|
@ -790,13 +790,13 @@ contains
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
info = 0
|
|
|
|
|
if (allocated(x%v)) deallocate(x%v, stat=info)
|
|
|
|
|
if (c_associated(x%deviceVect)) then
|
|
|
|
|
!!$ write(0,*)'d_cuda_free Calling freeMultiVecDevice'
|
|
|
|
|
call trackCudaFree(' c_vect_cuda ',x%sizeof())
|
|
|
|
|
call trackCudaFree(' c_vect_cuda 2',x%sizeof())
|
|
|
|
|
call freeMultiVecDevice(x%deviceVect)
|
|
|
|
|
x%deviceVect=c_null_ptr
|
|
|
|
|
end if
|
|
|
|
|
if (allocated(x%v)) deallocate(x%v, stat=info)
|
|
|
|
|
call x%free_buffer(info)
|
|
|
|
|
call x%set_sync()
|
|
|
|
|
end subroutine c_cuda_free
|
|
|
|
|