This is a set of simple programs that can be used to explore the features of a parallel platform.
Clone or download
jeffhammond Fix Travis issues (#365)
* fix Julia syntax issue

"1./" is a syntax error now.  change to "1.0/"

* fix issue with array += scalar
Latest commit 1144a49 Sep 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github try out issue/PR templates Jan 10, 2018
AMPI MPI comm are not C int Dec 3, 2017
C1z deprecate Cilk (#357) Jun 4, 2018
CHARM++ Fix spacing in Charm++ Stencil Makefile (#362) Jun 18, 2018
Cxx11 improve stencil code generator (#364) Sep 14, 2018
FENIX Finalizing Fenix Transpose kernel. Jun 1, 2017
FG_MPI use MPI_UINT64_T with uint64_t data Mar 28, 2017
FORTRAN Fix GCC-8 warnings (#352) Jun 4, 2018
GRAPPA Fixing makefile comment about default shape for stencils. Mar 19, 2017
JULIA Fix Travis issues (#365) Sep 15, 2018
LEGION Turn on barrier migration again Jan 23, 2017
MPI1 MPI comm are not C int Dec 3, 2017
MPIOPENMP increase max threads to 512 [ci skip] Jul 30, 2017
MPIRMA Fixing makefile comment about default shape for stencils. Mar 19, 2017
MPISHM Fixing makefile comment about default shape for stencils. Mar 19, 2017
OCTAVE add type to zeros May 29, 2017
OPENMP Fix misleading comments (#327) Apr 9, 2018
PYTHON fix Travis XFAIL MPI1, Python, Charm++, AMPI (#360) Jun 5, 2018
RUST refactor Rust files to use Cargo (#351) Jun 4, 2018
SERIAL i hate trailing whitespace Jan 2, 2018
SHMEM merge non-C++ diff w/ master by brute force Jul 24, 2017
UPC remove explicit -O3 and trailing whitespace Mar 28, 2017
common deprecate Cilk (#357) Jun 4, 2018
doc Updating documentation. Oct 28, 2016
include merge non-C++ diff w/ master by brute force Jul 24, 2017
scripts Adding the new Fenix-fortified codes to the standard Maekfile and the… Jun 3, 2017
travis improve stencil code generator (#364) Sep 14, 2018
.gitignore remove STL usage from OpenMP codes (#363) Jul 22, 2018
.travis.yml fix Travis XFAIL MPI1, Python, Charm++, AMPI (#360) Jun 5, 2018
CODEOWNERS add CBLAS transpose (#350) May 31, 2018
CONTRIBUTING.md Create CONTRIBUTING.md Jun 17, 2017
COPYING remove exec bit from non-exec files Dec 17, 2015
Makefile add target for C1z/C++1z/F08 Aug 2, 2017
README.md add CBLAS transpose (#350) May 31, 2018
README.special merge in 2.16 changes from devel repo Dec 17, 2015
SUPPORT.md Rename SUPPORT to SUPPORT.md Dec 2, 2017

README.md

license Travis-CI Status GitHub contributors GitHub language count GitHub top language

Overview

This suite contains a number of kernel operations, called Parallel Research Kernels, plus a simple build system intended for a Linux-compatible environment. Most of the code relies on open standard programming models and thus can be executed on many computing systems.

These programs should not be used as benchmarks. They are operations to explore features of a hardware platform, but they do not define fixed problems that can be used to rank systems. Furthermore they have not been optimimzed for the features of any particular system.

Build Instructions

To build the codes the user needs to make certain changes by editing text files. Assuming the source tree is untarred in directory $PRK, the following file needs to be copied to $PRK/common/make.defs and edited.

$PRK/common/make.defs.in -- This file specifies the names of the C compiler (CC), and of the MPI (Message Passing Interface) compiler MPICC or compile script. If MPI is not going to be used, the user can ignore the value of MPICC. The compilers should already be in your path. That is, if you define CC=icc, then typing which icc should show a valid path where that compiler is installed. Special instructions for building and running codes using Charm++, Grappa, OpenSHMEM, or Fine-Grain MPI are in README.special.

We provide examples of working examples for a number of programming environments

File (in ./common/) Environment
make.defs.cray Cray compilers on Cray XC systems.
make.defs.cuda GCC with the CUDA compiler (only used in C++/CUDA implementation).
make.defs.gcc GCC compiler tool chain, which supports essentially all implementations.
make.defs.ibmbg IBM Blue Gene/Q compiler toolchain (infrequently tested).
make.defs.intel Intel compiler tool chain, which supports most implementations.
make.defs.llvm LLVM compiler tool chain, which supports most implementations.
make.defs.musl GCC compiler toolchain with MUSL as the C standard library, which is required to use C11 threads.
make.defs.pgi PGI compiler toolchain (infrequently tested).

Some of the C++ implementations require you to install Boost, RAJA, KOKKOS, Parallel STL, respectively, and then modify make.defs appropriately. Please see the documentation in the C++ subdirectory.

Because we test essentially everything in Travis CI, you can refer to the $PRK/travis subdirectory for install scripts that can be readily modified to install any of the dependencies in your local environment.

Supported Programming Models

The suite of kernels currently has complete parallel implementations in OpenMP, MPI, Adaptive MPI and Fine-Grain MPI. There is also a SERIAL reference implementation.

The suite is currently being extended to include Charm++, MPI+OpenMP, OpenSHMEM, UPC, and Grappa, Fortran with coarrays, as well as three new variations of MPI:

  1. MPI with one-sided communications (MPIRMA)
  2. MPI with direct use of shared memory inside coherency domains (MPISHM)
  3. MPI with OpenMP inside coherency domains (MPIOPENMP) These extensions are not yet complete.

More recently, we have implemented many single-node programming models in modern languages.

Modern C++

y = yes

i = in-progress, incomplete, or incorrect

f = see footnotes

Parallelism p2p stencil transpose nstream sparse dgemm
None y y y y y y
C++11 threads, async y
OpenMP y y y y
OpenMP tasks y y y y
OpenMP target y y y y
OpenCL 1.x i y y y
SYCL y y y
Boost.Compute y
Parallel STL y y y y
Thrust y
TBB y y y y
Kokkos y y y y
RAJA y y y y
CUDA i y y y
CUBLAS y y y
CBLAS y y
OpenACC y

Modern C

Parallelism p2p stencil transpose nstream sparse
None y y y
C11 threads y
OpenMP y y y
OpenMP tasks y y y
OpenMP target y y y
Cilk y y
ISPC y

Modern Fortran

Parallelism p2p stencil transpose nstream sparse dgemm
None y y y y y
Intrinsics y y y
coarrays y y y
OpenMP y y y y y
OpenMP tasks y y y y
OpenMP target y y y y
OpenACC y y y

By intrinsics, we mean the language built-in features, such as colon notation or the TRANSPOSE intrinsic. We use DO CONCURRENT in a few places.

Other languages

x = externally supported (in the Chapel repo)

Parallelism p2p stencil transpose nstream sparse dgemm
Python 3 y y y y y y
Python 3 w/ Numpy y y y y y y
Julia y y y
Octave (Matlab) y y y
Chapel x x x

Global make

Please run make help in the top directory for the latest information.

To build all available kernels of a certain version, type in the root directory:

Command Effect
make all builds all kernels.
make allserial builds all serial kernels.
make allopenmp builds all OpenMP kernels.
make allmpi builds all conventional two-sided MPI kernels.
make allmpi1 builds all MPI kernels.
make allfgmpi builds all Fine-Grain MPI kernels.
make allampi builds all Adaptive MPI kernels.
make allmpiopenmp builds all hybrid MPI+OpenMP kernels.
make allmpirma builds all MPI-3 kernels with one-sided communications.
make allmpishm builds all kernels with MPI-3 shared memory.
make allshmem builds all OpenSHMEM kernels.
make allupc builds all Unified Parallel C (UPC) kernels.
make allcharm++ builds all Charm++ kernels.
make allgrappa builds all Grappa kernels.
make allfortran builds all Fortran kernels.
make allc1x builds all C99/C11 kernels.
make allcxx builds all C++11 kernels.

The global make process uses a single set of optimization flags for all kernels. For more control, the user should consider individual makes (see below), carefully choosing the right parameters in each Makefile. If a a single set of optimization flags different from the default is desired, the command line can be adjusted: make all<version> default_opt_flags=<list of optimization flags>

The global make process uses some defaults for the Branch kernel (see Makefile in that directory). These can be overridden by adjusting the command line: make all<version> matrix_rank=<n> number_of_functions=<m> Note that no new values for matrix_rank or number_of_functions will be used unless a make veryclean has been issued.

Individual make

Descend into the desired sub-tree and cd to the kernel(s) of interest. Each kernel has its own Makefile. There are a number of parameters that determine the behavior of the kernel that need to be known at compile time. These are explained succinctly in the Makefile itself. Edit the Makefile to activate certain parameters, and/or to set their values.

Typing make without parameters in each leaf directory will prompt the user for the correct parameter syntax. Once the code has been built, typing the name of the executable without any parameters will prompt the user for the correct parameter syntax.

Running test suite

After the desired kernels have been built, they can be tested by executing scripts in the 'scripts' subdirectory from the root of the kernels package. Currently two types of run scripts are supported. scripts/small: tests only very small examples that should complete in just a few seconds. This merely tests functionality of kernels and installed runtimes scripts/wide: tests examples that will take up most memory on a single node with 64 GB of memory.

Only a few parameters can be changed globally; for rigorous testing, the user should run each kernel individually, carefully choosing the right parameters. This may involve editing the individual Makefiles and rerunning the kernels.

Example build and runs

make all default_opt_flags="-O2" "matrix_rank=7" "number_of_functions=200" 
./scripts/small/runopenmp
./scripts/small/runmpi1
./scripts/wide/runserial
./scripts/small/runcharm++
./scripts/wide/runmpiopenmp

To exercise all kernels, type

./scripts/small/runall
./scripts/wide/runall

Quality Control

We have a rather massive test matrix running in Travis CI. Unfortunately, the Travis CI environment may vary with time and occasionally differs from what we are running locally, which makes debugging tricky. If the status of the project is not passing, please inspect the details, because this may not be an indication of an issue with our project, but rather something in Travis CI.

License

See COPYING for licensing information.

Note on stream

Note that while our nstream operations are based on the well known STREAM benchmark by John D. McCalpin, we modified the source code and do not follow the run-rules associated with this benchmark. Hence, according to the rules defined in the STREAM license (see clause 3b), you must never report the results of our nstream operations as official "STREAM Benchmark" results. The results must be clearly labled whenever they are published. Examples of proper labelling include:

  "tuned STREAM benchmark results" 
  "based on a variant of the STREAM benchmark code" 

Other comparable, clear, and reasonable labelling is acceptable.