Various functionalities are implemented as additional methods of the preconditioner object.
call p%dump(info[,istart,iend,prefix,head,ac,rp,smoother,solver,global_num])
Dump on file.
Arguments
info | integer, intent(out). |
| Error code. If no error, 0 is returned. See Section 7 for details. |
amold | class(psb_x_base_sparse_mat), intent(in), optional. |
| The desired dynamic type for internal matrix components; this allows e.g. running on GPUs; it needs not be the same on all processes. See the PSBLAS User’s Guide for details [17]. |
call p%clone(pout,info)
Create a (deep) copy of the preconditioner object.
Arguments
pout | type(amg_xprec_type), intent(out). |
| The copy of the preconditioner data structure. Note that x must be chosen according to the real/complex, single/double precision version of AMG4PSBLAS under use. |
info | integer, intent(out). |
| Error code. If no error, 0 is returned. See Section 7 for details. |
sz = p%sizeof()
Return memory footprint in bytes.
call p%allocate_wrk(info[, vmold])
Allocate internal work vectors. Each application of the preconditioner uses a number of work vectors which are allocated internally as necessary; therefore allocation and deallocation of memory occurs multiple times during the execution of a Krylov method. In most cases this strategy is perfectly acceptable, but on some platforms, most notably GPUs, memory allocation is a slow operation, and the default behaviour would lead to a slowdown. This method allows to trade space for time by preallocating the internal workspace outside of the invocation of a Krylov method. When using GPUs or other specialized devices, the vmold argument is also necessary to ensure the internal work vectors are of the appropriate dynamic type to exploit the accelerator hardware; when allocation occurs internally this is taken care of based on the dynamic type of the x argument to the apply method.
Arguments
info | integer, intent(out). |
| Error code. If no error, 0 is returned. See Section 7 for details. |
vmold | class(psb_x_base_vect_type), intent(in), optional. |
| The desired dynamic type for internal vector components; this allows e.g. running on GPUs. |
call p%free_wrk(info)
Deallocate internal work vectors.
Arguments
info | integer, intent(out). |
| Error code. If no error, 0 is returned. See Section 7 for details. |