diff --git a/base/comm/psb_dgather.f90 b/base/comm/psb_dgather.f90 index c4efa929..f4516a49 100644 --- a/base/comm/psb_dgather.f90 +++ b/base/comm/psb_dgather.f90 @@ -39,7 +39,7 @@ ! locx - real,dimension(:,:). The local piece of the distributed ! matrix to be gathered. ! desc_a - type(). The communication descriptor. -! info - integer. Error code. +! info - integer. Return code. ! iroot - integer. The process that has to own the ! global matrix. If -1 all ! the processes will have a copy. @@ -210,8 +210,8 @@ end subroutine psb_dgatherm ! locx - real,dimension(:). The local piece of the ditributed ! vector to be gathered. ! desc_a - type(). The communication descriptor. -! info - integer. Error code. -! iroot - integer. The process that has to own the +! info - integer. Return code. +! root - integer. The process that has to own the ! global matrix. If -1 all ! the processes will have a copy. ! diff --git a/base/comm/psb_dhalo.f90 b/base/comm/psb_dhalo.f90 index 9779ef9f..95d01fad 100644 --- a/base/comm/psb_dhalo.f90 +++ b/base/comm/psb_dhalo.f90 @@ -37,13 +37,13 @@ ! Arguments: ! x - real,dimension(:,:). The local part of the dense matrix. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. -! alpha - real(optional). ???. +! info - integer. return code. +! alpha - real(optional). Scale factor. ! jx - integer(optional). The starting column of the global matrix. ! ik - integer(optional). The number of columns to gather. -! work - real(optional). A working area. -! tran - character(optional). ???. -! mode - integer(optional). +! work - real(optional). Work area. +! tran - character(optional). Transpose exchange. +! mode - integer(optional). Communication mode (see Swapdata) ! subroutine psb_dhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data) use psb_descriptor_type @@ -253,11 +253,11 @@ end subroutine psb_dhalom ! Arguments: ! x - real,dimension(:). The local part of the dense vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. -! alpha - real(optional). ???. -! work - real(optional). A working area. -! tran - character(optional). ???. -! mode - integer(optional). +! info - integer. Return code +! alpha - real(optional). Scale factor. +! work - real(optional). Work area. +! tran - character(optional). Transpose exchange. +! mode - integer(optional). Communication mode (see Swapdata) ! subroutine psb_dhalov(x,desc_a,info,alpha,work,tran,mode,data) use psb_descriptor_type diff --git a/base/comm/psb_dovrl.f90 b/base/comm/psb_dovrl.f90 index ecc1f790..c1b8997d 100644 --- a/base/comm/psb_dovrl.f90 +++ b/base/comm/psb_dovrl.f90 @@ -35,13 +35,16 @@ ! distributed dense matrix between all the processes. ! ! Arguments: -! x - real,dimension(:,:). The local part of the dense matrix. -! desc_a - type(). The communication descriptor. -! info - integer. A return code. -! jx - integer(optional). The starting column of the global matrix -! ik - integer(optional). The number of columns to gather. -! work - real(optional). A work area. -! update - integer(optional). ???. +! x(:,:) - real The local part of the dense matrix. +! desc_a - type(). The communication descriptor. +! info - integer. Return code. +! jx - integer(optional). The starting column of the global matrix +! ik - integer(optional). The number of columns to gather. +! work - real(optional). A work area. +! update - integer(optional). Type of update: +! psb_none_ do nothing +! psb_sum_ sum of overlaps +! psb_avg_ average of overlaps ! subroutine psb_dovrlm(x,desc_a,info,jx,ik,work,update) use psb_descriptor_type @@ -215,11 +218,6 @@ subroutine psb_dovrlm(x,desc_a,info,jx,ik,work,update) return end subroutine psb_dovrlm - - - - - !!$ !!$ Parallel Sparse BLAS v2.0 !!$ (C) Copyright 2006 Salvatore Filippone University of Rome Tor Vergata @@ -255,11 +253,14 @@ end subroutine psb_dovrlm ! distributed dense vector between all the processes. ! ! Arguments: -! x - real,dimension(:). The local part of the dense vector. -! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. -! work - real(optional). A working area. -! update - integer(optional). ???. +! x(:) - real The local part of the dense vector. +! desc_a - type(). The communication descriptor. +! info - integer. Return code. +! work - real(optional). A work area. +! update - integer(optional). Type of update: +! psb_none_ do nothing +! psb_sum_ sum of overlaps +! psb_avg_ average of overlaps ! subroutine psb_dovrlv(x,desc_a,info,work,update) use psb_descriptor_type diff --git a/base/comm/psb_ihalo.f90 b/base/comm/psb_ihalo.f90 index 65159afa..f53b65ac 100644 --- a/base/comm/psb_ihalo.f90 +++ b/base/comm/psb_ihalo.f90 @@ -38,13 +38,13 @@ ! Arguments: ! x - integer,dimension(:,:). The local part of the dense matrix. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. -! alpha - real(optional). ???. +! info - integer. Return code +! alpha - real(optional). Scale factor. ! jx - integer(optional). The starting column of the global matrix. ! ik - integer(optional). The number of columns to gather. -! work - integer(optional). A working area. -! tran - character(optional). ???. -! mode - integer(optional). +! work - real(optional). Work area. +! tran - character(optional). Transpose exchange. +! mode - integer(optional). Communication mode (see Swapdata) ! subroutine psb_ihalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data) use psb_descriptor_type @@ -255,11 +255,13 @@ end subroutine psb_ihalom ! Arguments: ! x - integer,dimension(:). The local part of the dense matrix. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. -! alpha - real(optional). ???. -! work - integer(optional). A working area. -! tran - character(optional). ???. -! mode - integer(optional). +! info - integer. Return code +! alpha - real(optional). Scale factor. +! jx - integer(optional). The starting column of the global matrix. +! ik - integer(optional). The number of columns to gather. +! work - real(optional). Work area. +! tran - character(optional). Transpose exchange. +! mode - integer(optional). Communication mode (see Swapdata) ! subroutine psb_ihalov(x,desc_a,info,alpha,work,tran,mode,data) use psb_descriptor_type diff --git a/base/comm/psb_zhalo.f90 b/base/comm/psb_zhalo.f90 index 7d8aae4b..3a2cdf5b 100644 --- a/base/comm/psb_zhalo.f90 +++ b/base/comm/psb_zhalo.f90 @@ -37,13 +37,13 @@ ! Arguments: ! x - real,dimension(:,:). The local part of the dense matrix. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. -! alpha - real(optional). ???. +! info - integer. Return code +! alpha - complex(optional). Scale factor. ! jx - integer(optional). The starting column of the global matrix. ! ik - integer(optional). The number of columns to gather. -! work - real(optional). A working area. -! tran - character(optional). ???. -! mode - integer(optional). +! work - complex(optional). Work area. +! tran - character(optional). Transpose exchange. +! mode - integer(optional). Communication mode (see Swapdata) ! subroutine psb_zhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data) use psb_descriptor_type @@ -252,11 +252,13 @@ end subroutine psb_zhalom ! Arguments: ! x - real,dimension(:). The local part of the dense vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. -! alpha - real(optional). ???. -! work - real(optional). A working area. -! tran - character(optional). ???. -! mode - integer(optional). +! info - integer. Return code +! alpha - complex(optional). Scale factor. +! jx - integer(optional). The starting column of the global matrix. +! ik - integer(optional). The number of columns to gather. +! work - complex(optional). Work area. +! tran - character(optional). Transpose exchange. +! mode - integer(optional). Communication mode (see Swapdata) ! subroutine psb_zhalov(x,desc_a,info,alpha,work,tran,mode,data) use psb_descriptor_type diff --git a/base/comm/psb_zovrl.f90 b/base/comm/psb_zovrl.f90 index 00d48f74..0b241b32 100644 --- a/base/comm/psb_zovrl.f90 +++ b/base/comm/psb_zovrl.f90 @@ -35,13 +35,16 @@ ! distributed dense matrix between all the processes. ! ! Arguments: -! x - real,dimension(:,:). The local part of the dense matrix. -! desc_a - type(). The communication descriptor. -! info - integer. Returns an output code. -! jx - integer(optional). The starting column of the global matrix. -! ik - integer(optional). The number of columns to gather. -! work - real(optional). A working area. -! update - integer(optional). ???. +! x(:,:) - complex The local part of the dense matrix. +! desc_a - type(). The communication descriptor. +! info - integer. Return code. +! jx - integer(optional). The starting column of the global matrix +! ik - integer(optional). The number of columns to gather. +! work - real(optional). A work area. +! update - integer(optional). Type of update: +! psb_none_ do nothing +! psb_sum_ sum of overlaps +! psb_avg_ average of overlaps ! subroutine psb_zovrlm(x,desc_a,info,jx,ik,work,update) use psb_descriptor_type @@ -214,12 +217,6 @@ subroutine psb_zovrlm(x,desc_a,info,jx,ik,work,update) end if return end subroutine psb_zovrlm - - - - - - !!$ !!$ Parallel Sparse BLAS v2.0 !!$ (C) Copyright 2006 Salvatore Filippone University of Rome Tor Vergata @@ -255,11 +252,15 @@ end subroutine psb_zovrlm ! distributed dense vector between all the processes. ! ! Arguments: -! x - real,dimension(:). The local part of the dense vector. -! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. -! work - real(optional). A working area. -! update - integer(optional). ???. +! x(:) - complex The local part of the dense vector. +! desc_a - type(). The communication descriptor. +! info - integer. Return code. +! work - real(optional). A work area. +! update - integer(optional). Type of update: +! psb_none_ do nothing +! psb_sum_ sum of overlaps +! psb_avg_ average of overlaps +! ! subroutine psb_zovrlv(x,desc_a,info,work,update) use psb_descriptor_type diff --git a/base/comm/psb_zscatter.F90 b/base/comm/psb_zscatter.F90 index d852a145..526ad2af 100644 --- a/base/comm/psb_zscatter.F90 +++ b/base/comm/psb_zscatter.F90 @@ -35,12 +35,13 @@ ! into pieces that are local to alle the processes. ! ! Arguments: -! globx - complex,dimension(:,:). The global matrix to scatter. -! locx - complex,dimension(:,:). The local piece of the ditributed matrix. +! globx - complex,dimension(:,:). The global matrix to scatter. +! locx - complex,dimension(:,:). The local piece of the distributed matrix. ! desc_a - type(). The communication descriptor. ! info - integer. Error code. -! iroot - integer(optional). The process that owns the global matrix. If -1 all -! the processes have a copy. Default -1 +! iroot - integer(optional). The process that owns the global matrix. +! If -1 all the processes have a copy. +! Default -1 subroutine psb_zscatterm(globx, locx, desc_a, info, iroot) use psb_descriptor_type @@ -269,7 +270,7 @@ end subroutine psb_zscatterm ! globx - complex,dimension(:). The global vector to scatter. ! locx - complex,dimension(:). The local piece of the ditributed vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! iroot - integer(optional). The process that owns the global vector. If -1 all ! the processes have a copy. ! diff --git a/base/internals/Makefile b/base/internals/Makefile index f2b1c116..5ef4c53e 100644 --- a/base/internals/Makefile +++ b/base/internals/Makefile @@ -27,6 +27,6 @@ mpfobjs: psi_gthsct_mod.o (make $(MPFOBJS) F90="$(MPF90)" FC="$(MPF90)" FCOPT="$(F90COPT)") (make $(FOBJS2) F90="$(MPF77)" FC="$(MPF77)" FCOPT="$(FCOPT)") clean: - /bin/rm -f $(MPFOBJS) $(FOBJS) $(COBJS) $(FOBJS2) $(MPFOBJS2) + /bin/rm -f $(MPFOBJS) $(FOBJS) $(COBJS) $(FOBJS2) $(MPFOBJS2) *$(.mod) veryclean: clean diff --git a/base/internals/psi_idx_cnv.f90 b/base/internals/psi_idx_cnv.f90 index 5a267c41..0de87f0f 100644 --- a/base/internals/psi_idx_cnv.f90 +++ b/base/internals/psi_idx_cnv.f90 @@ -41,7 +41,8 @@ ! desc - type(). The communication descriptor. ! info - integer. return code. ! mask(:) - logical, optional Only do the conversion for specific indices. -! owned - logical,optional Restrict to local indices, no halo (default false) +! owned - logical,optional Restrict to local indices, no halo +! (default false) subroutine psi_idx_cnv1(nv,idxin,desc,info,mask,owned) use psb_descriptor_type use psb_serial_mod @@ -195,7 +196,8 @@ end subroutine psi_idx_cnv1 ! desc - type(). The communication descriptor. ! info - integer. return code. ! mask(:) - logical, optional Only do the conversion for specific indices. -! owned - logical,optional Restrict to local indices, no halo (default false) +! owned - logical,optional Restrict to local indices, no halo +! (default false) subroutine psi_idx_cnv2(nv,idxin,idxout,desc,info,mask,owned) use psb_descriptor_type use psb_serial_mod @@ -416,7 +418,8 @@ end subroutine psi_idx_cnv2 ! desc - type(). The communication descriptor. ! info - integer. return code. ! mask - logical, optional Only do the conversion if true. -! owned - logical,optional Restrict to local indices, no halo (default false) +! owned - logical,optional Restrict to local indices, no halo +! (default false) subroutine psi_idx_cnvs(idxin,idxout,desc,info,mask,owned) use psi_mod, psb_protect_name => psi_idx_cnvs diff --git a/base/internals/psi_ldsc_pre_halo.f90 b/base/internals/psi_ldsc_pre_halo.f90 index 1a150ba9..a24a21f6 100644 --- a/base/internals/psi_ldsc_pre_halo.f90 +++ b/base/internals/psi_ldsc_pre_halo.f90 @@ -28,6 +28,25 @@ !!$ POSSIBILITY OF SUCH DAMAGE. !!$ !!$ +! +! File: psi_ldsc_pre_halo.f90 +! +! Subroutine: psi_ldsc_pre_halo +! Build initial versions of data exchange lists. +! When the descriptor is for a large index space, we cannot build +! the data exchange lists "on-the-fly", but we also want to keep using the +! same format conversion routines we use in the small index space case, +! hence this adapter routine. +! Since it also convers the AVL tree data structure into the hashed list +! of ordered lists, it may be called to do just that; perhaps we should +! cut away that functionality and put it somewhere else... +! +! +! Arguments: +! desc - type(). The communication descriptor. +! ext_hv - logical Should we work on the halo_index. +! info - integer. return code. +! subroutine psi_ldsc_pre_halo(desc,ext_hv,info) use psb_descriptor_type use psb_serial_mod diff --git a/base/modules/psb_check_mod.f90 b/base/modules/psb_check_mod.f90 index ad078eae..f5b7a033 100644 --- a/base/modules/psb_check_mod.f90 +++ b/base/modules/psb_check_mod.f90 @@ -62,7 +62,7 @@ contains ! jx - integer. X's global column index, which points to the beginning ! of the dense submatrix which is to be operated on. ! desc_dec - integer,dimension(:). Is the matrix_data array. - ! info - integer. Eventually returns an error code. + ! info - integer. Return code ! iix - integer(optional). The local rows starting index of the submatrix. ! jjx - integer(optional). The local columns starting index of the submatrix. subroutine psb_chkvect( m, n, lldx, ix, jx, desc_dec, info, iix, jjx) @@ -188,7 +188,7 @@ contains ! jx - integer. X's global column index, which points to the beginning ! of the dense submatrix which is to be operated on. ! desc_dec - integer,dimension(:). Is the matrix_data array. - ! info - integer. Eventually returns an error code. + ! info - integer. Return code ! subroutine psb_chkglobvect( m, n, lldx, ix, jx, desc_dec, info) @@ -309,7 +309,7 @@ contains ! ja - integer. a's global column index, which points to the beginning ! of the submatrix which is to be operated on. ! desc_dec - integer,dimension(:). Is the matrix_data array. - ! info - integer. Eventually returns an error code. + ! info - integer. Return code ! iia - integer(optional). The local rows starting index of the submatrix. ! jja - integer(optional). The local columns starting index of the submatrix. ! diff --git a/base/psblas/psb_damax.f90 b/base/psblas/psb_damax.f90 index fd2530fb..5ac4eb65 100644 --- a/base/psblas/psb_damax.f90 +++ b/base/psblas/psb_damax.f90 @@ -40,7 +40,7 @@ ! Arguments: ! x - real,dimension(:,:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset. ! function psb_damax (x,desc_a, info, jx) @@ -167,7 +167,7 @@ end function psb_damax ! Arguments: ! x - real,dimension(:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! function psb_damaxv (x,desc_a, info) use psb_penv_mod @@ -289,7 +289,7 @@ end function psb_damaxv ! res - real. The result. ! x - real,dimension(:,:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset. ! subroutine psb_damaxvs (res,x,desc_a, info) @@ -411,7 +411,7 @@ end subroutine psb_damaxvs ! res - real. The result. ! x - real,dimension(:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_dmamaxs (res,x,desc_a, info,jx) use psb_penv_mod diff --git a/base/psblas/psb_dasum.f90 b/base/psblas/psb_dasum.f90 index 48b7b10b..17361092 100644 --- a/base/psblas/psb_dasum.f90 +++ b/base/psblas/psb_dasum.f90 @@ -40,7 +40,7 @@ ! Arguments: ! x - real,dimension(:,:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset. ! function psb_dasum (x,desc_a, info, jx) @@ -185,7 +185,7 @@ end function psb_dasum ! Arguments: ! x - real,dimension(:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! function psb_dasumv (x,desc_a, info) @@ -323,7 +323,7 @@ end function psb_dasumv ! res - real. The result. ! x - real,dimension(:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset. ! subroutine psb_dasumvs (res,x,desc_a, info) diff --git a/base/psblas/psb_daxpby.f90 b/base/psblas/psb_daxpby.f90 index 1a61fece..0c6613e4 100644 --- a/base/psblas/psb_daxpby.f90 +++ b/base/psblas/psb_daxpby.f90 @@ -45,7 +45,7 @@ ! beta - real. The scalar used to multiply each component of sub( Y ). ! y - real,dimension(:,:). The input vector containing the entries of sub( Y ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset for sub( X ). ! jy - integer(optional). The column offset for sub( Y ). ! @@ -201,7 +201,7 @@ end subroutine psb_daxpby ! beta - real. The scalar used to multiply each component of Y. ! y - real,dimension(:). The input vector containing the entries of Y. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_daxpbyv(alpha, x, beta,y,desc_a,info) use psb_descriptor_type diff --git a/base/psblas/psb_ddot.f90 b/base/psblas/psb_ddot.f90 index fa15e24e..0a6f6539 100644 --- a/base/psblas/psb_ddot.f90 +++ b/base/psblas/psb_ddot.f90 @@ -43,7 +43,7 @@ ! x - real,dimension(:,:). The input vector containing the entries of sub( X ). ! y - real,dimension(:,:). The input vector containing the entries of sub( Y ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset for sub( X ). ! jy - integer(optional). The column offset for sub( Y ). ! @@ -200,7 +200,7 @@ end function psb_ddot ! x - real,dimension(:). The input vector containing the entries of X. ! y - real,dimension(:). The input vector containing the entries of Y. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! function psb_ddotv(x, y,desc_a, info) use psb_descriptor_type @@ -338,7 +338,7 @@ end function psb_ddotv ! x - real,dimension(:). The input vector containing the entries of X. ! y - real,dimension(:). The input vector containing the entries of Y. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_ddotvs(res, x, y,desc_a, info) use psb_descriptor_type @@ -479,7 +479,7 @@ end subroutine psb_ddotvs ! x - real,dimension(:,:). The input vector containing the entries of sub( X ). ! y - real,dimension(:,:). The input vector containing the entries of sub( Y ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_dmdots(res, x, y, desc_a, info) use psb_descriptor_type diff --git a/base/psblas/psb_dnrm2.f90 b/base/psblas/psb_dnrm2.f90 index 883dd1e6..ff216134 100644 --- a/base/psblas/psb_dnrm2.f90 +++ b/base/psblas/psb_dnrm2.f90 @@ -40,7 +40,7 @@ ! Arguments: ! x - real,dimension(:,:). The input vector containing the entries of sub( X ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset for sub( X ). ! function psb_dnrm2(x, desc_a, info, jx) @@ -179,7 +179,7 @@ end function psb_dnrm2 ! Arguments: ! x - real,dimension(:). The input vector containing the entries of X. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! function psb_dnrm2v(x, desc_a, info) use psb_descriptor_type @@ -314,7 +314,7 @@ end function psb_dnrm2v ! res - real. The result. ! x - real,dimension(:). The input vector containing the entries of X. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_dnrm2vs(res, x, desc_a, info) use psb_descriptor_type diff --git a/base/psblas/psb_dnrmi.f90 b/base/psblas/psb_dnrmi.f90 index f58852f6..a5b1d6ad 100644 --- a/base/psblas/psb_dnrmi.f90 +++ b/base/psblas/psb_dnrmi.f90 @@ -38,7 +38,7 @@ ! Arguments: ! a - type(). The sparse matrix containing A. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! function psb_dnrmi(a,desc_a,info) use psb_descriptor_type diff --git a/base/psblas/psb_dspmm.f90 b/base/psblas/psb_dspmm.f90 index 66716825..1299f550 100644 --- a/base/psblas/psb_dspmm.f90 +++ b/base/psblas/psb_dspmm.f90 @@ -69,7 +69,7 @@ ! beta - real. The scalar beta. ! y - real,dimension(:,:). The input vector containing the entries of sub( Y ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! trans - character(optional). Whether A or A'. If not present 'N' is assumed. ! k - integer(optional). The number of right-hand sides. ! jx - integer(optional). The column offset for sub( X ). If not present 1 is assumed. @@ -409,7 +409,7 @@ end subroutine psb_dspmm ! beta - real. The scalar beta. ! y - real,dimension(:. The input vector containing the entries of Y. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! trans - character(optional). Whether A or A'. If not present 'N' is assumed. ! work - real,dimension(:)(optional). Working area. ! doswap - integer(optional). Whether to performe halo updates. diff --git a/base/psblas/psb_dspsm.f90 b/base/psblas/psb_dspsm.f90 index a8cbaf28..a6af92a6 100644 --- a/base/psblas/psb_dspsm.f90 +++ b/base/psblas/psb_dspsm.f90 @@ -61,7 +61,7 @@ ! beta - real. The scalar beta. ! y - real,dimension(:,:). The input vector containing the entries of sub( Y ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! trans - character(optional). Whether A or A'. If not present 'N' is assumed. ! unitd - character(optional). Specify some type of operation with the diagonal matrix D. ! choice - integer(optional). The kind of update to perform on overlap elements. @@ -371,7 +371,7 @@ end subroutine psb_dspsm ! beta - real. The scalar beta. ! y - real,dimension(:). The input vector containing the entries of Y. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! trans - character(optional). Whether A or A'. If not present 'N' is assumed. ! unitd - character(optional). Specify some type of operation with the diagonal matrix D. ! choice - integer(optional). The kind of update to perform on overlap elements. diff --git a/base/psblas/psb_zamax.f90 b/base/psblas/psb_zamax.f90 index e350fa88..af023eb3 100644 --- a/base/psblas/psb_zamax.f90 +++ b/base/psblas/psb_zamax.f90 @@ -40,7 +40,7 @@ ! Arguments: ! x - real,dimension(:,:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset. ! function psb_zamax (x,desc_a, info, jx) @@ -170,7 +170,7 @@ end function psb_zamax ! Arguments: ! x - real,dimension(:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! function psb_zamaxv (x,desc_a, info) use psb_penv_mod @@ -297,7 +297,7 @@ end function psb_zamaxv ! res - real. The result. ! x - real,dimension(:,:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset. ! subroutine psb_zamaxvs (res,x,desc_a, info) @@ -423,7 +423,7 @@ end subroutine psb_zamaxvs ! res - real. The result. ! x - real,dimension(:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_zmamaxs (res,x,desc_a, info,jx) use psb_penv_mod diff --git a/base/psblas/psb_zasum.f90 b/base/psblas/psb_zasum.f90 index 76822619..378dc47b 100644 --- a/base/psblas/psb_zasum.f90 +++ b/base/psblas/psb_zasum.f90 @@ -40,7 +40,7 @@ ! Arguments: ! x - real,dimension(:,:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset. ! function psb_zasum (x,desc_a, info, jx) @@ -190,7 +190,7 @@ end function psb_zasum ! Arguments: ! x - real,dimension(:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! function psb_zasumv (x,desc_a, info) @@ -334,7 +334,7 @@ end function psb_zasumv ! res - real. The result. ! x - real,dimension(:). The input vector. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset. ! subroutine psb_zasumvs (res,x,desc_a, info) diff --git a/base/psblas/psb_zaxpby.f90 b/base/psblas/psb_zaxpby.f90 index b17b61e8..d3528119 100644 --- a/base/psblas/psb_zaxpby.f90 +++ b/base/psblas/psb_zaxpby.f90 @@ -45,7 +45,7 @@ ! beta - real. The scalar used to multiply each component of sub( Y ). ! y - real,dimension(:,:). The input vector containing the entries of sub( Y ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset for sub( X ). ! jy - integer(optional). The column offset for sub( Y ). ! @@ -199,7 +199,7 @@ end subroutine psb_zaxpby ! beta - real. The scalar used to multiply each component of Y. ! y - real,dimension(:). The input vector containing the entries of Y. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_zaxpbyv(alpha, x, beta,y,desc_a,info) use psb_descriptor_type diff --git a/base/psblas/psb_zdot.f90 b/base/psblas/psb_zdot.f90 index bd67e275..9feb4a0c 100644 --- a/base/psblas/psb_zdot.f90 +++ b/base/psblas/psb_zdot.f90 @@ -43,7 +43,7 @@ ! x - real,dimension(:,:). The input vector containing the entries of sub( X ). ! y - real,dimension(:,:). The input vector containing the entries of sub( Y ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset for sub( X ). ! jy - integer(optional). The column offset for sub( Y ). ! @@ -199,7 +199,7 @@ end function psb_zdot ! x - real,dimension(:). The input vector containing the entries of X. ! y - real,dimension(:). The input vector containing the entries of Y. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! function psb_zdotv(x, y,desc_a, info) use psb_descriptor_type @@ -337,7 +337,7 @@ end function psb_zdotv ! x - real,dimension(:). The input vector containing the entries of X. ! y - real,dimension(:). The input vector containing the entries of Y. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_zdotvs(res, x, y,desc_a, info) use psb_descriptor_type @@ -477,7 +477,7 @@ end subroutine psb_zdotvs ! x - real,dimension(:,:). The input vector containing the entries of sub( X ). ! y - real,dimension(:,:). The input vector containing the entries of sub( Y ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_zmdots(res, x, y, desc_a, info) use psb_descriptor_type diff --git a/base/psblas/psb_znrm2.f90 b/base/psblas/psb_znrm2.f90 index 03b5faea..2f2787be 100644 --- a/base/psblas/psb_znrm2.f90 +++ b/base/psblas/psb_znrm2.f90 @@ -40,7 +40,7 @@ ! Arguments: ! x - real,dimension(:,:). The input vector containing the entries of sub( X ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! jx - integer(optional). The column offset for sub( X ). ! function psb_znrm2(x, desc_a, info, jx) @@ -178,7 +178,7 @@ end function psb_znrm2 ! Arguments: ! x - real,dimension(:). The input vector containing the entries of X. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! function psb_znrm2v(x, desc_a, info) use psb_descriptor_type @@ -313,7 +313,7 @@ end function psb_znrm2v ! res - real. The result. ! x - real,dimension(:). The input vector containing the entries of X. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_znrm2vs(res, x, desc_a, info) use psb_descriptor_type diff --git a/base/psblas/psb_znrmi.f90 b/base/psblas/psb_znrmi.f90 index 7d3614d5..9b4410c5 100644 --- a/base/psblas/psb_znrmi.f90 +++ b/base/psblas/psb_znrmi.f90 @@ -38,7 +38,7 @@ ! Arguments: ! a - type(). The sparse matrix containing A. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! function psb_znrmi(a,desc_a,info) use psb_descriptor_type diff --git a/base/psblas/psb_zspmm.f90 b/base/psblas/psb_zspmm.f90 index def80d4a..91eb4955 100644 --- a/base/psblas/psb_zspmm.f90 +++ b/base/psblas/psb_zspmm.f90 @@ -69,7 +69,7 @@ ! beta - real. The scalar beta. ! y - real,dimension(:,:). The input vector containing the entries of sub( Y ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! trans - character(optional). Whether A or A'. If not present 'N' is assumed. ! k - integer(optional). The number of right-hand sides. ! jx - integer(optional). The column offset for sub( X ). If not present 1 is assumed. @@ -403,7 +403,7 @@ end subroutine psb_zspmm ! beta - real. The scalar beta. ! y - real,dimension(:. The input vector containing the entries of Y. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! trans - character(optional). Whether A or A'. If not present 'N' is assumed. ! work - real,dimension(:)(optional). Working area. ! doswap - integer(optional). Whether to performe halo updates. diff --git a/base/psblas/psb_zspsm.f90 b/base/psblas/psb_zspsm.f90 index 3f4a1adc..a30060b4 100644 --- a/base/psblas/psb_zspsm.f90 +++ b/base/psblas/psb_zspsm.f90 @@ -61,7 +61,7 @@ ! beta - real. The scalar beta. ! y - real,dimension(:,:). The input vector containing the entries of sub( Y ). ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! trans - character(optional). Whether A or A'. If not present 'N' is assumed. ! unitd - character(optional). Specify some type of operation with the diagonal matrix D. ! choice - integer(optional). The kind of update to perform on overlap elements. @@ -374,7 +374,7 @@ end subroutine psb_zspsm ! beta - real. The scalar beta. ! y - real,dimension(:). The input vector containing the entries of Y. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! trans - character(optional). Whether A or A'. If not present 'N' is assumed. ! unitd - character(optional). Specify some type of operation with the diagonal matrix D. ! choice - integer(optional). The kind of update to perform on overlap elements. diff --git a/base/serial/psb_dspcnv.f90 b/base/serial/psb_dspcnv.f90 index a26f01b2..4acefc92 100644 --- a/base/serial/psb_dspcnv.f90 +++ b/base/serial/psb_dspcnv.f90 @@ -37,7 +37,7 @@ ! Arguments: ! a - type(). The input matrix to be assembled. ! b - type(). The assembled output matrix. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! ifc - integer(optional). ??? ! check - character(optional). ??? ! trans - character(optional). ??? diff --git a/base/serial/psb_zspcnv.f90 b/base/serial/psb_zspcnv.f90 index 194ac682..d43d681f 100644 --- a/base/serial/psb_zspcnv.f90 +++ b/base/serial/psb_zspcnv.f90 @@ -37,7 +37,7 @@ ! Arguments: ! a - type(). The input matrix to be assembled. ! b - type(). The assembled output matrix. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! ifc - integer(optional). ??? ! check - character(optional). ??? ! trans - character(optional). ??? diff --git a/base/tools/psb_cd_inloc.f90 b/base/tools/psb_cd_inloc.f90 index bffe5dc4..9ea04f8c 100644 --- a/base/tools/psb_cd_inloc.f90 +++ b/base/tools/psb_cd_inloc.f90 @@ -189,7 +189,19 @@ subroutine psb_cd_inloc(v, ictxt, desc_a, info) itmpov = 0 temp_ovrlap(:) = -1 + ! + ! We have to decide whether we have a "large" index space. + ! if (psb_cd_choose_large_state(ictxt,m)) then + ! + ! Yes, we do have a large index space. Therefore we are + ! keeping on the local process a map of only the global + ! indices ending up here; this map is stored in an AVL + ! tree during the build stage, so as to guarantee log-time + ! serch and insertion of new items. At assembly time it + ! is transferred to a series of ordered linear lists, + ! hashed by the low order bits of the entries. + ! do i=1,m if (((tmpgidx(i,1)-flag_) > np-1).or.((tmpgidx(i,1)-flag_) < 0)) then @@ -253,6 +265,16 @@ subroutine psb_cd_inloc(v, ictxt, desc_a, info) else + ! + ! No, we don't have a large index space. Therefore we can + ! afford to keep on the local process a map of all global + ! indices; for those we know are here we immediately store + ! the corresponding local index, for the others we encode + ! the index of the process owning them, so that during the + ! insertion phase we can use the information to build the + ! data exchange lists "on-the-fly". + ! + do i=1,m if (((tmpgidx(i,1)-flag_) > np-1).or.((tmpgidx(i,1)-flag_) < 0)) then diff --git a/base/tools/psb_cdals.f90 b/base/tools/psb_cdals.f90 index d1532b62..df07f418 100644 --- a/base/tools/psb_cdals.f90 +++ b/base/tools/psb_cdals.f90 @@ -146,9 +146,21 @@ subroutine psb_cdals(m, n, parts, ictxt, desc_a, info) counter = 0 itmpov = 0 temp_ovrlap(:) = -1 + ! + ! We have to decide whether we have a "large" index space. + ! if (psb_cd_choose_large_state(ictxt,m)) then + ! + ! Yes, we do have a large index space. Therefore we are + ! keeping on the local process a map of only the global + ! indices ending up here; this map is stored in an AVL + ! tree during the build stage, so as to guarantee log-time + ! serch and insertion of new items. At assembly time it + ! is transferred to a series of ordered linear lists, + ! hashed by the low order bits of the entries. + ! loc_col = (m+np-1)/np - allocate(desc_a%loc_to_glob(loc_col), desc_a%lprm(1),& + allocate(desc_a%loc_to_glob(loc_col), desc_a%lprm(1),& & desc_a%ptree(2),stat=info) if (info == 0) call InitPairSearchTree(desc_a%ptree,info) if (info /= 0) then @@ -241,6 +253,16 @@ subroutine psb_cdals(m, n, parts, ictxt, desc_a, info) else + ! + ! No, we don't have a large index space. Therefore we can + ! afford to keep on the local process a map of all global + ! indices; for those we know are here we immediately store + ! the corresponding local index, for the others we encode + ! the index of the process owning them, so that during the + ! insertion phase we can use the information to build the + ! data exchange lists "on-the-fly". + ! + do i=1,m if (info == 0) then call parts(i,m,np,prc_v,nprocs) diff --git a/base/tools/psb_cdalv.f90 b/base/tools/psb_cdalv.f90 index 2ebdf95f..3944f522 100644 --- a/base/tools/psb_cdalv.f90 +++ b/base/tools/psb_cdalv.f90 @@ -159,7 +159,19 @@ subroutine psb_cdalv(v, ictxt, desc_a, info, flag) itmpov = 0 temp_ovrlap(:) = -1 + ! + ! We have to decide whether we have a "large" index space. + ! if (psb_cd_choose_large_state(ictxt,m)) then + ! + ! Yes, we do have a large index space. Therefore we are + ! keeping on the local process a map of only the global + ! indices ending up here; this map is stored in an AVL + ! tree during the build stage, so as to guarantee log-time + ! serch and insertion of new items. At assembly time it + ! is transferred to a series of ordered linear lists, + ! hashed by the low order bits of the entries. + ! do i=1,m @@ -224,6 +236,16 @@ subroutine psb_cdalv(v, ictxt, desc_a, info, flag) else + + ! + ! No, we don't have a large index space. Therefore we can + ! afford to keep on the local process a map of all global + ! indices; for those we know are here we immediately store + ! the corresponding local index, for the others we encode + ! the index of the process owning them, so that during the + ! insertion phase we can use the information to build the + ! data exchange lists "on-the-fly". + ! do i=1,m if (((v(i)-flag_) > np-1).or.((v(i)-flag_) < 0)) then diff --git a/base/tools/psb_cdins.f90 b/base/tools/psb_cdins.f90 index 99e30cac..6afcf479 100644 --- a/base/tools/psb_cdins.f90 +++ b/base/tools/psb_cdins.f90 @@ -32,15 +32,17 @@ ! ! Subroutine: psb_cdins ! Takes as input a cloud of points and updates the descriptor accordingly. +! Note: entries with a row index not belonging to the current process are +! ignored (see usage of ila_ as mask in the call to psb_idx_ins_cnv). ! ! Arguments: ! nz - integer. The number of points to insert. -! ia - integer,dimension(:). The row indices of the points. -! ja - integer,dimension(:). The column indices of the points. +! ia(:) - integer The row indices of the points. +! ja(:) - integer The column indices of the points. ! desc_a - type(). The communication descriptor to be freed. ! info - integer. Return code. -! ila - integer,dimension(:). The row indices in local numbering -! jla - integer,dimension(:). The col indices in local numbering +! ila(:) - integer, optional The row indices in local numbering +! jla(:) - integer, optional The col indices in local numbering ! subroutine psb_cdins(nz,ia,ja,desc_a,info,ila,jla) diff --git a/base/tools/psb_cdren.f90 b/base/tools/psb_cdren.f90 index 35e9932c..be04d24c 100644 --- a/base/tools/psb_cdren.f90 +++ b/base/tools/psb_cdren.f90 @@ -41,7 +41,7 @@ ! iperm - integer,dimension(:). The renumbering scheme. ! desc_a - type(). The communication descriptor ! to be updated. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! subroutine psb_cdren(trans,iperm,desc_a,info) use psb_descriptor_type diff --git a/base/tools/psb_cdrep.f90 b/base/tools/psb_cdrep.f90 index e9dd9187..dbec4430 100644 --- a/base/tools/psb_cdrep.f90 +++ b/base/tools/psb_cdrep.f90 @@ -182,8 +182,8 @@ subroutine psb_cdrep(m, ictxt, desc_a, info) call psb_errpush(info,name,i_err=int_err,a_err='integer') goto 9999 endif - ! If the index space is replicated there's no point in having - ! the AVL tree structure.... + ! If the index space is replicated there's no point in not having + ! the full map on the current process. desc_a%matrix_data(psb_desc_size_) = psb_desc_normal_ diff --git a/krylov/psb_dbicg.f90 b/krylov/psb_dbicg.f90 index d63903d4..af08c1fe 100644 --- a/krylov/psb_dbicg.f90 +++ b/krylov/psb_dbicg.f90 @@ -66,7 +66,7 @@ ! x - real,dimension(:). The vector of unknowns. ! eps - real. The error tolerance. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! itmax - integer(optional). The maximum number of iterations. ! iter - integer(optional). The number of iterations performed. ! err - real(optional). The error on return. diff --git a/krylov/psb_dcg.f90 b/krylov/psb_dcg.f90 index 73b0687b..450e8d36 100644 --- a/krylov/psb_dcg.f90 +++ b/krylov/psb_dcg.f90 @@ -66,7 +66,7 @@ ! x - real,dimension(:). The vector of unknowns. ! eps - real. The error tolerance. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! itmax - integer(optional). The maximum number of iterations. ! iter - integer(optional). The number of iterations performed. ! err - real(optional). The error on return. diff --git a/krylov/psb_dcgs.f90 b/krylov/psb_dcgs.f90 index bca18db2..1304643a 100644 --- a/krylov/psb_dcgs.f90 +++ b/krylov/psb_dcgs.f90 @@ -64,7 +64,7 @@ ! x - real,dimension(:). The vector of unknowns. ! eps - real. The error tolerance. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! itmax - integer(optional). The maximum number of iterations. ! iter - integer(optional). The number of iterations performed. ! err - real(optional). The error on return. diff --git a/krylov/psb_dcgstab.F90 b/krylov/psb_dcgstab.F90 index 190d93ee..b8e0cb63 100644 --- a/krylov/psb_dcgstab.F90 +++ b/krylov/psb_dcgstab.F90 @@ -65,7 +65,7 @@ ! x - real,dimension(:). The vector of unknowns. ! eps - real. The error tolerance. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! itmax - integer(optional). The maximum number of iterations. ! iter - integer(optional). The number of iterations performed. ! err - real(optional). The error on return. diff --git a/krylov/psb_dcgstabl.f90 b/krylov/psb_dcgstabl.f90 index ad19c72a..4b908bff 100644 --- a/krylov/psb_dcgstabl.f90 +++ b/krylov/psb_dcgstabl.f90 @@ -71,7 +71,7 @@ ! x - real,dimension(:). The vector of unknowns. ! eps - real. The error tolerance. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! itmax - integer(optional). The maximum number of iterations. ! iter - integer(optional). The number of iterations performed. ! err - real(optional). The error on return. diff --git a/krylov/psb_dgmresr.f90 b/krylov/psb_dgmresr.f90 index 1c4416da..890d7d82 100644 --- a/krylov/psb_dgmresr.f90 +++ b/krylov/psb_dgmresr.f90 @@ -77,7 +77,7 @@ ! x - real,dimension(:). The vector of unknowns. ! eps - real. The error tolerance. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! itmax - integer(optional). The maximum number of iterations. ! iter - integer(optional). The number of iterations performed. ! err - real(optional). The error on return. diff --git a/krylov/psb_zcgs.f90 b/krylov/psb_zcgs.f90 index d12e66ca..1452b3f0 100644 --- a/krylov/psb_zcgs.f90 +++ b/krylov/psb_zcgs.f90 @@ -64,7 +64,7 @@ ! x - real,dimension(:). The vector of unknowns. ! eps - real. The error tolerance. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! itmax - integer(optional). The maximum number of iterations. ! iter - integer(optional). The number of iterations performed. ! err - real(optional). The error on return. diff --git a/krylov/psb_zcgstab.f90 b/krylov/psb_zcgstab.f90 index 95d15f92..7b0b516e 100644 --- a/krylov/psb_zcgstab.f90 +++ b/krylov/psb_zcgstab.f90 @@ -66,7 +66,7 @@ ! x - real,dimension(:). The vector of unknowns. ! eps - real. The error tolerance. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! itmax - integer(optional). The maximum number of iterations. ! iter - integer(optional). The number of iterations performed. ! err - real(optional). The error on return. diff --git a/krylov/psb_zgmresr.f90 b/krylov/psb_zgmresr.f90 index 7c2d7835..696caab8 100644 --- a/krylov/psb_zgmresr.f90 +++ b/krylov/psb_zgmresr.f90 @@ -77,7 +77,7 @@ ! x - real,dimension(:). The vector of unknowns. ! eps - real. The error tolerance. ! desc_a - type(). The communication descriptor. -! info - integer. Eventually returns an error code. +! info - integer. Return code ! itmax - integer(optional). The maximum number of iterations. ! iter - integer(optional). The number of iterations performed. ! err - real(optional). The error on return.