Skip to content

Commit

Permalink
GREPOS: Intel overoptimizes unless inimap separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Apr 9, 2024
1 parent eb15beb commit b9d6d90
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
7 changes: 7 additions & 0 deletions packages/seacas/applications/grepos/gp_inimap.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SUBROUTINE INIMAP(LEN, MAP)
INTEGER MAP(*)
DO I=1, LEN
MAP(I) = I
end do
end

20 changes: 17 additions & 3 deletions packages/seacas/applications/grepos/gp_mapvar.f
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,30 @@ subroutine mapvar(nold, nnew, nvar, map, vars, scr)
real vars(*)
c real vars(nold, nvar)
real scr(*)
logical isseq

C ... VARS should really be a doubly-dimensioned array (NOLD, NVAR),
C The dimensions need to be in this order so we can read them
C in using exgev and exgnv. But, this order doesn't work very
C in using exgnv. But, this order doesn't work very
C well when trying to reduce the size of NOLD

C ... TODO: Need to use the truth table to make sure variables
C exist for each element.
isseq = .false.
if (nold .eq. nnew) then
isseq = .true.
do i=1, nnew
if (map(i) .ne. i) then
isseq = .false.
end if
end do
end if

if (isseq .eq. .true.) then
return
end if

do 30 ivar = 1, nvar
do 10 i = 1, nnew
write (*,*) i, map(i)
scr(i) = vars(map(i) + nold * (ivar-1) )
10 continue

Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/applications/grepos/gp_qainfo.blk
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ C See packages/seacas/LICENSE for details

C -*- Mode: fortran -*-
QAINFO(1) = 'Grepos '
QAINFO(2) = '2024/03/19 '
QAINFO(3) = ' 1.94 '
QAINFO(2) = '2024/04/09 '
QAINFO(3) = ' 1.95 '
6 changes: 0 additions & 6 deletions packages/seacas/applications/grepos/grepos.f
Original file line number Diff line number Diff line change
Expand Up @@ -1292,12 +1292,6 @@ PROGRAM GREPOS
$ /,9x,'if you need this capability.')
END

SUBROUTINE INIMAP(LEN, MAP)
INTEGER MAP(*)
DO 10 I=1, LEN
MAP(I) = I
10 CONTINUE
END
subroutine exgqaw(ndb, qarec, ierr)
include 'gp_params.blk'
character*(mxstln) qarec(4, *)
Expand Down

0 comments on commit b9d6d90

Please sign in to comment.