This software contains various versions of a stencil computation represented by a simplified heat dissipation program. This code belongs to the CHIUW ‘19 paper: “Implementing Stencil Problems in Chapel: An Experience Report” that is accepted for publication.
The paper has been written in two stages. In the first stage, we implemented several versions, such as sequential versions, parallel versions on a single locale, parallel global view versions and parallel local view versions. In the second stage, we received feedback from the Chapel team and implemented several versions to understand the performance issues that we perceived.
More concretely, the versions on which the paper is based are all the C versions and for Chapel:
seq/*par-global-single/originalpar-global-multi/originalpar-local-multi/original
The versions that test the feedback from the Chapel team are:
par-global-multi/cache-remotepar-global-multi/control-threadspar-global-multi/local-accesspar-global-multi/mpipar-global-multi/ofipar-global-multi/segment-fastpar-global-multi/swap-in-procpar-global-multi/udppar-local-multi/control-threadspar-local-multi/local-access
Each of these versions contain a README that explains the rationale.
This project assumes that a C compiler is available, the convert
command from ImageMagick to create the input files, and two Chapel
runtimes of Chapel 1.19, one configured for single locale execution
and one for multi-locale execution.
More specifically, the Makefiles for Chapel have been configured to use the following configurations (can be overridden by setting the environment variable RT_FLAGS):
For the single-locale runtime:
CHPL_LAUNCHER=slurm-sbatchFor the multi-locale runtime:
CHPL_LAUNCHER=slurm-gasnetrun_ibv
CHPL_COMM=gasnet
CHPL_COMM_SUBSTRATE=ibvThe ‘stage 2’ versions may use different run times. The Makefiles
contain a flag RT_FLAGS that should also be used to build the run
time of Chapel.
This project assumes that the environment variable HEAT_DISSIPATION_CHAPEL has been set to the directory that contains this README:
export HEAT_DISSIPATION_CHAPEL=/path/to/this/dirTo run the versions of the code, it is necessary to create the input
data first. Currently, we use the files plasma_8192x8192.pgm and
pat2_8192x8192.pgm, that can be obtained using the following
commands:
cd $HEAT_DISSIPATION_CHAPEL/images
make plasma_8192x8192.pgm
make pat2_8192x8192.pgmPlease note that creating these images is not deterministic, which means that runs of the various versions in this code should produce the same output with the exact same input files. However, if the input files are recreated with the above commands, the output will most likely be different from the output with the previous input files.
We can now go into one of the versions in directories c or chapel
and perform the following to build the binary:
makeTo run the program, we can use:
./runTo control the threads for single-locale versions:
./run --dataParTasksPerLocale=8Or for multi-locale versions:
./run -nl 2Some of the stage 2 versions have a separate run command because jobs are launched in a different way:
./chpl2cluster -nl 2This code is released under Apache License 2.0.
Copyright 2019 Vrije Universiteit Amsterdam, University of Amsterdam, Per Fuchs.
Per Fuchs, Pieter Hijma, Clemens Grelck. 2019. Implementing Stencil Problems in Chapel: An Experience Report. In Proceedings of the ACM SIGPLAN 6th Chapel Implementers and Users Workshop (CHIUW ‘19) June 22, 2019, Phoenix AZ, USA, New York, NY, USA, 10 pages. https://doi.org/10.1145/3329722.3330146