base/modules/psb_hash_map_mod.f90
 base/tools/psb_cd_inloc.f90
 docs/psblas-3.0.pdf
 docs/src/toolsrout.tex
 test/pargen/ppde3d.f90

Changed cdall/hash_map to take out duplicates but keep the original
order among the entries.
Added LOCAL for spins/geins to the documentation.
psblas-3.0-maint
Salvatore Filippone 13 years ago
parent f646aae2bc
commit 53c63b288f

@ -646,7 +646,7 @@ contains
! To be implemented ! To be implemented
integer(psb_mpik_) :: iam, np integer(psb_mpik_) :: iam, np
integer(psb_ipk_) :: i, nlu, nl, m, nrt,int_err(5) integer(psb_ipk_) :: i, nlu, nl, m, nrt,int_err(5)
integer(psb_ipk_), allocatable :: vlu(:) integer(psb_ipk_), allocatable :: vlu(:), ix(:)
character(len=20), parameter :: name='hash_map_init_vl' character(len=20), parameter :: name='hash_map_init_vl'
info = 0 info = 0
@ -664,7 +664,7 @@ contains
call psb_sum(ictxt,nrt) call psb_sum(ictxt,nrt)
call psb_max(ictxt,m) call psb_max(ictxt,m)
allocate(vlu(nl), stat=info) allocate(vlu(nl), ix(nl), stat=info)
if (info /= 0) then if (info /= 0) then
info = -1 info = -1
return return
@ -687,16 +687,21 @@ contains
& ' Warning: globalcheck=.false., but there is a mismatch' & ' Warning: globalcheck=.false., but there is a mismatch'
write(psb_err_unit,*) trim(name),& write(psb_err_unit,*) trim(name),&
& ' : in the global sizes!',m,nrt & ' : in the global sizes!',m,nrt
end if end if
!
! Now sort the input items, and check for duplicates call psb_msort(vlu,ix)
! (unlikely, but possible) nlu = 1
! do i=2,nl
call psb_msort_unique(vlu,nlu) if (vlu(i) /= vlu(nlu)) then
if (nlu /= nl) then nlu = nlu + 1
write(0,*) 'Warning: duplicates in input' vlu(nlu) = vlu(i)
ix(nlu) = ix(i)
end if end if
end do
call psb_msort(ix(1:nlu),vlu(1:nlu),flag=psb_sort_keep_idx_)
nlu = nl
call hash_init_vlu(idxmap,ictxt,m,nlu,vlu,info) call hash_init_vlu(idxmap,ictxt,m,nlu,vlu,info)
end subroutine hash_init_vl end subroutine hash_init_vl

@ -61,7 +61,7 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck)
& npr_ov, itmpov, i_pnt, nrt & npr_ov, itmpov, i_pnt, nrt
integer(psb_ipk_) :: int_err(5),exch(3) integer(psb_ipk_) :: int_err(5),exch(3)
integer(psb_ipk_), allocatable :: temp_ovrlap(:), tmpgidx(:,:), vl(:),& integer(psb_ipk_), allocatable :: temp_ovrlap(:), tmpgidx(:,:), vl(:),&
& nov(:), ov_idx(:,:) & nov(:), ov_idx(:,:), ix(:)
integer(psb_ipk_) :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_mpik_) :: iictxt integer(psb_mpik_) :: iictxt
logical :: check_, islarge logical :: check_, islarge
@ -139,7 +139,7 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck)
islarge = psb_cd_choose_large_state(ictxt,m) islarge = psb_cd_choose_large_state(ictxt,m)
allocate(vl(loc_row),stat=info) allocate(vl(loc_row),ix(loc_row),stat=info)
if (info /= psb_success_) then if (info /= psb_success_) then
info=psb_err_alloc_dealloc_ info=psb_err_alloc_dealloc_
call psb_errpush(info,name,i_err=int_err) call psb_errpush(info,name,i_err=int_err)
@ -224,16 +224,19 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck)
goto 9999 goto 9999
end if end if
! ! Sort, eliminate duplicates, then
! Now sort the input items, and check for duplicates ! scramble back into original position.
! (unlikely, but possible) call psb_msort(vl,ix)
! nlu = 1
call psb_msort_unique(vl,nlu) do i=2,loc_row
if (loc_row /= nlu) then if (vl(i) /= vl(nlu)) then
info = psb_err_dupl_cd_vl nlu = nlu + 1
call psb_errpush(info,name) vl(nlu) = vl(i)
goto 9999 ix(nlu) = ix(i)
end if end if
end do
call psb_msort(ix(1:nlu),vl(1:nlu),flag=psb_sort_keep_idx_)
call psb_nullify_desc(desc) call psb_nullify_desc(desc)
@ -355,7 +358,7 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck)
call psi_bld_tmpovrl(temp_ovrlap,desc,info) call psi_bld_tmpovrl(temp_ovrlap,desc,info)
if (info == psb_success_) deallocate(temp_ovrlap,vl,stat=info) if (info == psb_success_) deallocate(temp_ovrlap,vl,ix,stat=info)
if ((info == psb_success_).and.(allocated(tmpgidx)))& if ((info == psb_success_).and.(allocated(tmpgidx)))&
& deallocate(tmpgidx,stat=info) & deallocate(tmpgidx,stat=info)
if ((info == psb_success_) .and.(allocated(ov_idx))) & if ((info == psb_success_) .and.(allocated(ov_idx))) &

File diff suppressed because one or more lines are too long

@ -64,8 +64,8 @@ Type:{\bf optional}.\\
Intent: {\bf in}.\\ Intent: {\bf in}.\\
Specified as: an integer value. May be specified together with Specified as: an integer value. May be specified together with
\verb|vl|. \verb|vl|.
\item[repl] Data allocation: build a replicated index space (i.e. all \item[repl] Data allocation: build a replicated index space
processes own all indices).\\ (i.e. all processes own all indices).\\
Scope:{\bf global}.\\ Scope:{\bf global}.\\
Type:{\bf optional}.\\ Type:{\bf optional}.\\
Intent: {\bf in}.\\ Intent: {\bf in}.\\
@ -242,6 +242,12 @@ An integer value; 0 means no error has been detected.
\item This routine automatically ignores edges that do not \item This routine automatically ignores edges that do not
insist on the current process, i.e. edges for which neither the starting insist on the current process, i.e. edges for which neither the starting
nor the end vertex belong to the current process. nor the end vertex belong to the current process.
\item There exists another interface for this routine
\begin{verbatim}
call psb_cdins(nz, ja, desc_a, info)
\end{verbatim}
which will digest all entries in \verb|ja| and add them to the
communication requirements.
\end{enumerate} \end{enumerate}
@ -552,7 +558,7 @@ An integer value; 0 means no error has been detected.
\addcontentsline{toc}{subsection}{psb\_spins} \addcontentsline{toc}{subsection}{psb\_spins}
\begin{verbatim} \begin{verbatim}
call psb_spins(nz, ia, ja, val, a, desc_a, info) call psb_spins(nz, ia, ja, val, a, desc_a, info [,local])
\end{verbatim} \end{verbatim}
\begin{description} \begin{description}
@ -584,6 +590,12 @@ Scope: {\bf local}. \\
Type: {\bf required}.\\ Type: {\bf required}.\\
Intent: {\bf inout}.\\ Intent: {\bf inout}.\\
Specified as: a variable of type \descdata.\\ Specified as: a variable of type \descdata.\\
\item[local] Whether the entries in the indices vectors \verb|ia|,
\verb|ja| are already in local numbering. \\
Scope:{\bf local}.\\
Type:{\bf optional}.\\
Specified as: a logical value; default: \verb|.false.|.
%% \item[is] the starting row on matrix $a$.\\ %% \item[is] the starting row on matrix $a$.\\
%% Scope:{\bf local}.\\ %% Scope:{\bf local}.\\
%% Type:{\bf optional}.\\ %% Type:{\bf optional}.\\
@ -927,7 +939,7 @@ An integer value; 0 means no error has been detected.
\addcontentsline{toc}{subsection}{psb\_geins} \addcontentsline{toc}{subsection}{psb\_geins}
\begin{verbatim} \begin{verbatim}
call psb_geins(m, irw, val, x, desc_a, info,dupl) call psb_geins(m, irw, val, x, desc_a, info [,dupl,local])
\end{verbatim} \end{verbatim}
\begin{description} \begin{description}
@ -962,6 +974,12 @@ Type: {\bf optional}.\\
Intent: {\bf in}.\\ Intent: {\bf in}.\\
Specified as: integer, possible values: \verb|psb_dupl_ovwrt_|, Specified as: integer, possible values: \verb|psb_dupl_ovwrt_|,
\verb|psb_dupl_add_|. \verb|psb_dupl_add_|.
\item[local] Whether the entries in the index vector \verb|irw|,
are already in local numbering. \\
Scope:{\bf local}.\\
Type:{\bf optional}.\\
Specified as: a logical value; default: \verb|.false.|.
\end{description} \end{description}
\begin{description} \begin{description}

@ -167,6 +167,7 @@ program ppde3d
if(psb_get_errstatus() /= 0) goto 9999 if(psb_get_errstatus() /= 0) goto 9999
name='pde3d90' name='pde3d90'
call psb_set_errverbosity(itwo) call psb_set_errverbosity(itwo)
call psb_cd_set_large_threshold(itwo)
! !
! Hello world ! Hello world
! !

Loading…
Cancel
Save