Commit ef056692 authored by Andreas Marek's avatar Andreas Marek
Browse files

Pinned memory in elpa2_trans_ev_band_to_full

parent 1b3148e9
......@@ -218,6 +218,7 @@
successCUDA = cuda_malloc_host(hvm_host,max_local_rows*cwy_blocking*size_of_datatype)
check_host_alloc_cuda("trans_ev_band_to_full: hvm_host", successCUDA)
call c_f_pointer(hvm_host, hvm, (/max_local_rows,cwy_blocking/))
else ! useGPU
allocate(tmp1(max_local_cols*cwy_blocking), stat=istat, errmsg=errorMessage)
if (istat .ne. 0) then
......@@ -260,6 +261,13 @@
stop 1
endif
if (useGPU) then
successCUDA = cuda_host_register(int(loc(tmat_complete),kind=c_intptr_t), &
cwy_blocking * cwy_blocking * size_of_datatype,&
cudaHostRegisterDefault)
check_host_register_cuda("trans_ev_band_to_full: tmat_complete", successCUDA)
endif
if (blocking_factor > 1) then
allocate(t_tmp(cwy_blocking,nbw), stat=istat, errmsg=errorMessage)
if (istat .ne. 0) then
......@@ -536,6 +544,9 @@
successCUDA = cuda_free_host(hvm_host)
check_host_dealloc_cuda("trans_ev_band_to_full: hvm_host", successCUDA)
successCUDA = cuda_host_unregister(int(loc(tmat_complete),kind=c_intptr_t))
check_host_unregister_cuda("trans_ev_band_to_full: tmat_complete", successCUDA)
else ! useGPU
deallocate(tmp1, stat=istat, errmsg=errorMessage)
if (istat .ne. 0) then
......
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