This is an archive of the discontinued LLVM Phabricator instance.

[test-suite] Adding miniGMG
ClosedPublic

Authored by jiseung on Aug 14 2017, 10:42 AM.

Details

Summary

miniGMG is a compact benchmark for understanding the performance challenges associated with geometric multigrid solvers found in applications built from AMR MG frameworks like CHOMBO or BoxLib when running on modern multi- and manycore-based supercomputers. It includes both productive reference examples as well as highly-optimized implementations for CPUs and GPUs. It is sufficiently general that it has been used to evaluate a broad range of research topics including PGAS programming models and algorithmic tradeoffs inherit in multigrid. miniGMG was developed under the CACHE Joint Math-CS Institute.

homepage
original tarball

On Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz:

compile_time: 22.3845 
exec_time: 7.9860 
Maximum resident set size (kbytes): 1012464

Diff Detail

Repository
rL LLVM

Event Timeline

jiseung created this revision.Aug 14 2017, 10:42 AM
jiseung edited the summary of this revision. (Show Details)Aug 15 2017, 10:51 AM
hfinkel added inline comments.Aug 15 2017, 11:30 AM
MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG/timer.x86.c
9 ↗(On Diff #111010)

This is going to work only on x86. Given that we're not going to time things in the test suite like this, you might just do something like:

#ifdef USE_CYCLE_COUNTER
  <original function body>
#else
  return 0;
#endif

Clang also has a nice builtin that we can use instead of the inline assembly. We could add that as well in case anyone would like to enable timing:

#ifndef __has_builtin
#define __has_builtin(x) 0
#endif

#if !defined(USE_CYCLE_COUNTER)
  return 0;
#elif __has_builtin(__builtin_readcyclecounter)
  return __builtin_readcyclecounter();
#else
  <original function body>
#endif
jiseung updated this revision to Diff 111242.Aug 15 2017, 1:40 PM

Changed timer.x86.c as commented and also adjusted for the rand/srand function usage

hfinkel edited edge metadata.Aug 15 2017, 5:31 PM

Changed timer.x86.c as commented and also adjusted for the rand/srand function usage

We can probably rename the file to just timer.c (as it will now work on more than x86). Also, I don't see any uses of rand, so you can get rid of the rand implementation files (I do see one use, but it is commented out).

jiseung updated this revision to Diff 111343.EditedAug 16 2017, 7:55 AM

Oh, haha I see. I didn't catch the commented out part.

Added Makefile, renamed the timer file, and removed unnecessary rand def

MatzeB accepted this revision.Aug 31 2017, 6:59 PM

Integration LGTM.

This revision is now accepted and ready to land.Aug 31 2017, 6:59 PM
This revision was automatically updated to reflect the committed changes.