17 common /nekmpi/ nid_,np_,nekcomm,nekgroup,nekreal
24 wsize = disp_unit*
size(dprocmapwin)
25 call mpi_win_create(dprocmapwin,
29 $ nekcomm,dprocmaph,ierr)
31 if (ierr .ne. 0 )
call exitti(
'MPI_Win_allocate failed!$',0)
34 dprocmapcache = .true.
49 if (lbuf.lt.1 .or. lbuf.gt.2)
50 $
call exitti(
'invalid lbuf!',lbuf)
54 disp = 2*(iloc-1) + ioff
56 call mpi_win_lock(mpi_lock_exclusive,nids,0,dprocmaph,ierr)
57 call mpi_put(ibuf,lbuf,mpi_integer,nids,disp,lbuf,mpi_integer,
59 call mpi_win_unlock(nids,dprocmaph,ierr)
61 call icopy(dprocmapwin(2*(ieg-1) + ioff + 1),ibuf,lbuf)
80 parameter(lc = lelt+lcr+8-mod(lelt+lcr,8))
88 parameter(im = 6075, ia = 106, ic = 1283)
90 if (icalld .eq. 0)
then
91 call ifill(cache,-1,
size(cache))
96 if (ii.gt.lc)
call exitti(
'lsearch_ur returns invalid index$',ii)
97 if (ii.gt.0 .and. ii.ne.lelt+lcr)
then
100 ibuf(2) = cache(ii,2)
105 call mpi_win_lock(mpi_lock_shared,nidt,0,dprocmaph,ierr)
106 call mpi_get(ibuf,2,mpi_integer,nidt,disp,2,mpi_integer,
108 call mpi_win_unlock(nidt,dprocmaph,ierr)
110 call icopy(ibuf,dprocmapwin(2*(ieg-1) + 1),2)
112 if (dprocmapcache)
then
113 if (ibuf(2).eq.nid)
then
116 iran = mod(iran*ia+ic,im)
117 ii = lelt + (lcr*iran)/im + 1
119 cache(ii,1) = ibuf(1)
120 cache(ii,2) = ibuf(2)
135 il = ieg - nids * nstar
136 if (ieg .gt. np*nstar)
then
137 nids = mod(ieg,np) - 1
166 data iegl, nidl /0,0/
170 if (ieg.eq.iegl)
then
188 data iegl, iell /0,0/
192 if (ieg.eq.iegl)
then
subroutine exitti(stringi, idata)
subroutine dprocmapget(ibuf, ieg)
integer function lsearch_ur(a, n, k)
subroutine dprocmapfind(il, nids, ieg)
integer function gllel(ieg)
subroutine dprocmapinit()
integer function gllnid(ieg)
subroutine dprocmapput(ibuf, lbuf, ioff, ieg)
subroutine ifill(ia, ib, n)
subroutine icopy(a, b, n)