Snapshot -- got 3D working, but broke 1D
This version works for 1D and 3D again
Fix overlapping memory in memcpy() reported by valgrind.

This was a slam-dunk.  I replaced every direct call to memcpy() in our runtime code with a
call to chpl_memcpy(), then defined the latter as an always-inlined function that calls
through to the real memcpy().

The symptoms of the valgrind error are that the source and destination address are the
same (as I suspected).  So I added an assert for that error case and tracked down the
caller.  In chpl_gen_comm_get, there is the possibility that the source and destination
address are the same, if the data being fetched resides on the same locale.  That is where
I fixed the problem.

It would be possible to also fix the problem in the calling module code, but there we
would have to add a primitive to perform pointer comparison.  It is far easier to do this
in the runtime code.

I concluded that it would be helpful to leave the chpl_memcpy wrapper in place.  If NDEBUG
is true, then the assert will expand to nothing, and the whole routine will inline to a
direct call to memcpy.  So the runtime cost of this extra code should be nil (with
optimizations enabled).
Cleanup.  Now passes testing.
Can't see why 1D and 3D should be treated differently here.
Add case to lock in 3x3x3 error that's been around forever
Removing debug printing from today's session
Removing Sung's lulesh studies test

With the bug fixes of the earlier commits here, I verified that the
release version subsumes Sung's version and outperforms it when
compiled in the similar configuration (probably due to using atomics
rather than syncs).  Given that this test is now redundant and that
we're getting timeouts on it in many configurations, I think it's time
to remove it.
Updated according to comments from gbt:

Moved the src==dest test out of chpl_gen_comm_get() and into chpl_memcpy().

Adjusted indentation in chpl-cache.c, due to wider function name (chpl_memcpy vs. memcpy).

diff --git a/runtime/include/chpl-comm-compiler-macros.h b/runtime/include/chpl-comm-compiler-macros.h
Skip testing multilocale lammps/lsms files under comm=none.
Merge branch 'fixMemcpyOverlap' of github.com:hildeth/chapel into fixMemcpyOverlap

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Merge pull request #750 from bradcray/lulesh-bugfix

Lulesh release bug fix and retire Sung's version

[reviewed by sungeun]

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).
Updates based on today's runs
Updating stories based on what I think is passing
Merge pull request #757 from bradcray/triage-sep-blc

Updating REGRESSIONS from past 24 hours or so

New errors
----------
* LeakedMemory5 is now not finding its suppression (probably fixed with
  Lydia's baseline string leaks fix -- have alerted her)


Resolved errors
---------------
* Removed pervasive I/O sporadic failures from x?-wb.* category, as they
  seem to be cleared up (thanks Mike!!!)

* Removed lulesh failures from x?-wb.prgenv-cray as they seem to have
  self-resolved (due to the above?  Or something else?  Thanks masked man!)

* Removed baseline failures due to different amounts of string data leaked
  (thanks Lydia!)

* StringImpl/memLeaks/promotion also seems fixed (thanks Lydia!)


Misc
----
* moved StringImpl/memLeaks/coforall down to gasnet.fifo as that's the only
  place I ever see it fail

* noted compopts addition to parSafeMember test
Merge pull request #746 from hildeth/fixMemcpyOverlap

Fix overlapping memory in memcpy() reported by valgrind.

Replaced every direct call to memcpy() in our runtime code with a
call to chpl_memcpy(), then defined the latter to return the dest argument if dest == src and otherwise call the real memcpy().
Update .good/.prediff for chown file to support cygwin platform.

On cygwin, chown is reporting an "Invalid argument" error instead of the
expected "Operation not permitted" error. The new prediff replaces both
of these with "SYS_ERR", which is what the .good file now expects.
Back dest==src test out of chpl_memcpy().

When -Werror=uninitialized is tossed, GCC complains about the version of chpl_memcpy()
where memcpy() is called only if dest and src differ.  It apparently does not reason that
dest is valid since it is already equal to src.  So I backed out the aggressive
conditional call to the system memcpy, and instead moved the dest != src test back to
chpl_gen_comm_get().

I also noticed that code used in building the launcher cannot see the definition of
chpl_memcpy(), so I reverted those calls to being direct calls to the system memcpy().

TODO: We may still get hung up on the assert, in which case we can address the cases
proactively rather than waiting for valgrind to flag them.
Merge branch 'master' into fixMemcpyOverlap
Merge pull request #759 from hildeth/fixMemcpyOverlap

Fix memcpy overlap tail

Greg's suggested change did not work with CHPL_COMM=gasnet, so I backed it out.

Also, when building launcher code, chpl_memcpy is not defined, so I reverted the memcpy --> chpl_memcpy change as needed.