chapel-lang/chapel — pull request #750 by bradcray (2014-11-05 04:52:34+00:00)
Title: Lulesh release bug fix and retire Sung's version

This commit retires Sung's study version of LULESH and fixes
a bug in the release version when using the 3D representation.

Sung's version of lulesh has been timing out in certain
configurations, which raised the question of whether it's
still valuable or not. Sung's version (previously Brandon's
version) was the origin of the release version, which
expanded upon it by trading the 3D-only format for a
1D or 3D with sparse or dense materials array. Comparing
the sources, the two looked very similar, so it seemed
reasonable to retire Sung's version.

However, before doing so, I wanted to make sure that the
release version outperformed Sung's and, in doing so,
found that the 3D version had a bug in the release (and has
since we introduced it). The reason we didn't notice this
is that at some point we dialed the correctness problem size
down to a 2x2x2 grid (which matched an input file that the
original authors gave us) in which every node is a boundary
case, and therefore the bug was not exhibited. By running
on even a 3x3x3 case, the bug was seen.

The fix was an off-by-one error caused by a coordinate
translation routine that wasn't debugged fully for 1D and
3D cases and turned out to be pretty easy to implement.
While taking that on, I also took out some overly complicated
code that treated 1D and 3D differently for no good reason
that I could tell. I also fixed some debug printing that had
not been made portable for the 3D case.

One of the reasons that these problems went undetected
is that the 3D version isn't really in the spirit of the benchmark,
so it's not what we've been focusing on. Thus, while this
bug was unfortunate, it doesn't invalidate any previous
experimental results that we've reported on (which focused
on 1D representations only).