[PATCH] D27311: [test-suite] Add XSBench

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 10:29:12 PST 2016


hfinkel created this revision.
hfinkel added reviewers: MatzeB, jmolloy.
hfinkel added a subscriber: llvm-commits.
Herald added subscribers: mgorny, mcrosier.

The US Department of Energy (DOE) has open-sourced a significant number of so-called proxy applications (i.e. small applications, representative of our larger workloads in some respects, intended for use as benchmarks and test beds for various kind of porting exercises). Many of these are useful as compiler tests, and I'd like to add these to our test suite. Doing so will increase the representation within our test suite of HPC/scientific applications and allow us to better track how Clang/LLVM is doing in this area. Scientific applications are certainly a diverse group in themselves, and so my long term goal is to add a significant number of these proxies to ensure good coverage.

Some months ago, I compiled a list of our open-source proxy applications released by the various DOE laboratories (https://gitlab.com/llvm-doe/public/wikis/DOEProxyApps). By my estimate, of the approximately 40 proxy applications on that list, around half could be reasonably added to our test suite. We're continuing to develop new proxies, and so the number of suitable applications should grow somewhat in the future.

In any case, here's a patch to add the first one: XSBench. This is a C application with a straightforward reference output. It is designed to represent a key computational kernel of the Monte-Carlo neutronics application OpenMC. The builtin "small" test configuration is suitable for our test suite (it runs in about a minute on my build system). The only complication in adding this application is its dependence on rand(). The developer's provided known-good output will work only for glibc's implementation of rand (other rand implementation obviously may produce a different series of random numbers given the same initial seed). Luckily, the algorithm that glibc uses for rand() is reasonably well described by various web pages, and so I constructed a small independent implementation. This is in the glibc_compat_rand.{c,h} files.

As a reflection of my desire to add more of these applications, I've place this in a subdirectory named DOE-ProxyApps-C (the idea being that the C++ proxy applications will get a DOE-ProxyApps-C++ directory).

Thanks again!


https://reviews.llvm.org/D27311

Files:
  MultiSource/Benchmarks/CMakeLists.txt
  MultiSource/Benchmarks/DOE-ProxyApps-C/CMakeLists.txt
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/CMakeLists.txt
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/CalculateXS.c
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/GridInit.c
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/LICENSE
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/Main.c
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/Makefile
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/Materials.c
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/XSBench.reference_output
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/XSbench_header.h
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/XSutils.c
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/glibc_compat_rand.c
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/glibc_compat_rand.h
  MultiSource/Benchmarks/DOE-ProxyApps-C/XSBench/io.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27311.79937.patch
Type: text/x-patch
Size: 49007 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161201/36c5b545/attachment.bin>


More information about the llvm-commits mailing list