mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 04:42:08 +00:00
psblas3:
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.
This commit is contained in:
@@ -646,7 +646,7 @@ contains
|
||||
! To be implemented
|
||||
integer(psb_mpik_) :: iam, np
|
||||
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'
|
||||
|
||||
info = 0
|
||||
@@ -664,7 +664,7 @@ contains
|
||||
call psb_sum(ictxt,nrt)
|
||||
call psb_max(ictxt,m)
|
||||
|
||||
allocate(vlu(nl), stat=info)
|
||||
allocate(vlu(nl), ix(nl), stat=info)
|
||||
if (info /= 0) then
|
||||
info = -1
|
||||
return
|
||||
@@ -687,16 +687,21 @@ contains
|
||||
& ' Warning: globalcheck=.false., but there is a mismatch'
|
||||
write(psb_err_unit,*) trim(name),&
|
||||
& ' : in the global sizes!',m,nrt
|
||||
end if
|
||||
!
|
||||
! Now sort the input items, and check for duplicates
|
||||
! (unlikely, but possible)
|
||||
!
|
||||
call psb_msort_unique(vlu,nlu)
|
||||
if (nlu /= nl) then
|
||||
write(0,*) 'Warning: duplicates in input'
|
||||
|
||||
end if
|
||||
|
||||
call psb_msort(vlu,ix)
|
||||
nlu = 1
|
||||
do i=2,nl
|
||||
if (vlu(i) /= vlu(nlu)) then
|
||||
nlu = nlu + 1
|
||||
vlu(nlu) = vlu(i)
|
||||
ix(nlu) = ix(i)
|
||||
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)
|
||||
|
||||
end subroutine hash_init_vl
|
||||
|
||||
+16
-13
@@ -61,7 +61,7 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck)
|
||||
& npr_ov, itmpov, i_pnt, nrt
|
||||
integer(psb_ipk_) :: int_err(5),exch(3)
|
||||
integer(psb_ipk_), allocatable :: temp_ovrlap(:), tmpgidx(:,:), vl(:),&
|
||||
& nov(:), ov_idx(:,:)
|
||||
& nov(:), ov_idx(:,:), ix(:)
|
||||
integer(psb_ipk_) :: debug_level, debug_unit
|
||||
integer(psb_mpik_) :: iictxt
|
||||
logical :: check_, islarge
|
||||
@@ -139,7 +139,7 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck)
|
||||
|
||||
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
|
||||
info=psb_err_alloc_dealloc_
|
||||
call psb_errpush(info,name,i_err=int_err)
|
||||
@@ -224,16 +224,19 @@ subroutine psb_cd_inloc(v, ictxt, desc, info, globalcheck)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
!
|
||||
! Now sort the input items, and check for duplicates
|
||||
! (unlikely, but possible)
|
||||
!
|
||||
call psb_msort_unique(vl,nlu)
|
||||
if (loc_row /= nlu) then
|
||||
info = psb_err_dupl_cd_vl
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
! Sort, eliminate duplicates, then
|
||||
! scramble back into original position.
|
||||
call psb_msort(vl,ix)
|
||||
nlu = 1
|
||||
do i=2,loc_row
|
||||
if (vl(i) /= vl(nlu)) then
|
||||
nlu = nlu + 1
|
||||
vl(nlu) = vl(i)
|
||||
ix(nlu) = ix(i)
|
||||
end if
|
||||
end do
|
||||
call psb_msort(ix(1:nlu),vl(1:nlu),flag=psb_sort_keep_idx_)
|
||||
|
||||
|
||||
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)
|
||||
|
||||
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)))&
|
||||
& deallocate(tmpgidx,stat=info)
|
||||
if ((info == psb_success_) .and.(allocated(ov_idx))) &
|
||||
|
||||
+12515
-7337
File diff suppressed because one or more lines are too long
+22
-4
@@ -64,8 +64,8 @@ Type:{\bf optional}.\\
|
||||
Intent: {\bf in}.\\
|
||||
Specified as: an integer value. May be specified together with
|
||||
\verb|vl|.
|
||||
\item[repl] Data allocation: build a replicated index space (i.e. all
|
||||
processes own all indices).\\
|
||||
\item[repl] Data allocation: build a replicated index space
|
||||
(i.e. all processes own all indices).\\
|
||||
Scope:{\bf global}.\\
|
||||
Type:{\bf optional}.\\
|
||||
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
|
||||
insist on the current process, i.e. edges for which neither the starting
|
||||
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}
|
||||
|
||||
|
||||
@@ -552,7 +558,7 @@ An integer value; 0 means no error has been detected.
|
||||
\addcontentsline{toc}{subsection}{psb\_spins}
|
||||
|
||||
\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}
|
||||
|
||||
\begin{description}
|
||||
@@ -584,6 +590,12 @@ Scope: {\bf local}. \\
|
||||
Type: {\bf required}.\\
|
||||
Intent: {\bf inout}.\\
|
||||
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$.\\
|
||||
%% Scope:{\bf local}.\\
|
||||
%% Type:{\bf optional}.\\
|
||||
@@ -927,7 +939,7 @@ An integer value; 0 means no error has been detected.
|
||||
\addcontentsline{toc}{subsection}{psb\_geins}
|
||||
|
||||
\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}
|
||||
|
||||
\begin{description}
|
||||
@@ -962,6 +974,12 @@ Type: {\bf optional}.\\
|
||||
Intent: {\bf in}.\\
|
||||
Specified as: integer, possible values: \verb|psb_dupl_ovwrt_|,
|
||||
\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}
|
||||
|
||||
\begin{description}
|
||||
|
||||
@@ -167,6 +167,7 @@ program ppde3d
|
||||
if(psb_get_errstatus() /= 0) goto 9999
|
||||
name='pde3d90'
|
||||
call psb_set_errverbosity(itwo)
|
||||
call psb_cd_set_large_threshold(itwo)
|
||||
!
|
||||
! Hello world
|
||||
!
|
||||
|
||||
Reference in New Issue
Block a user