mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 22:55:12 +00:00
Added comments on allocat_wrk
This commit is contained in:
@@ -1267,6 +1267,16 @@ program amg_dexample_cuda
|
|||||||
! solve Ax=b with preconditioned Krylov method
|
! solve Ax=b with preconditioned Krylov method
|
||||||
|
|
||||||
call psb_barrier(ctxt)
|
call psb_barrier(ctxt)
|
||||||
|
!
|
||||||
|
! Most preconditioners require auxiliary storage. When running
|
||||||
|
! on the HOST side, allocation/deallocation are usually very cheap
|
||||||
|
! and can be performed for every invocation of prec%apply.
|
||||||
|
! However when running on the DEVICE side, such memory management
|
||||||
|
! operations are global synchronization points, hence very costly.
|
||||||
|
! Thus the two methods below that preallocate the memory space
|
||||||
|
! prior to the invocation of the Krylov method, and release memory
|
||||||
|
! after the method has completed.
|
||||||
|
!
|
||||||
call prec%allocate_wrk(info,vmold=vmold)
|
call prec%allocate_wrk(info,vmold=vmold)
|
||||||
t1 = psb_wtime()
|
t1 = psb_wtime()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user