Skip to content

Commit

Permalink
Merge pull request #6405 from e-kayrakli/prk-housekeeping
Browse files Browse the repository at this point in the history
Trivial housekeeping in PRK

Addresses some of the trivial issues in #6162:

- Header comments with contributors
- Dir name updates
- Change `validate` flag to `correctness`

test/studies/prk passes with standard linux64 config

[Reviewed by @ben-albrecht]
  • Loading branch information
ben-albrecht authored Jun 8, 2017
2 parents 45c35d2 + 3832e7f commit 0f79a2d
Show file tree
Hide file tree
Showing 57 changed files with 82 additions and 48 deletions.
5 changes: 5 additions & 0 deletions test/studies/prk/DGEMM/dgemm.chpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Chapel's parallel DGEMM implementation
Contributed by Engin Kayraklioglu (GWU)
*/
use Time;
use BlockDist;
use RangeChunk;
Expand Down
9 changes: 6 additions & 3 deletions test/studies/prk/Nstream/nstream.chpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
//
// Chapel's implementation of nstream
//
/*
Chapel's parallel Nstream implementation
Contributed by Engin Kayraklioglu (GWU)
*/

use Time;
use BlockDist;

Expand Down
6 changes: 6 additions & 0 deletions test/studies/prk/PIC/pic.chpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
Chapel's parallel PIC implementation
Contributed by Engin Kayraklioglu (GWU)
*/

require "random_draw.h", "random_draw.c";
use Time;

Expand Down
5 changes: 5 additions & 0 deletions test/studies/prk/Sparse/sparse.chpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Chapel's parallel Sparse implementation
Contributed by Engin Kayraklioglu (GWU)
*/
use BlockDist;
use Time;
use LayoutCSR;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
//
// Chapel's stencil implementation
//
/*
Chapel's serial Stencil implementation
Contributed by Ben Albrecht, Ben Harshbarger (Cray Inc.)
*/

use Time;

param PRKVERSION = "2.15";
Expand All @@ -10,7 +13,7 @@ config var tileSize: int = 0;
config const iterations: int = 10,
order: int = 1000,
debug: bool = false,
validate: bool = false;
correctness: bool = false;

config param R = 2,
compact = false;
Expand Down Expand Up @@ -84,7 +87,7 @@ for i in 1..R {
//
// Print information before main loop
//
if (!validate) {
if (!correctness) {
writeln("Parallel Research Kernels Version ", PRKVERSION);
writeln("Serial stencil execution on 2D grid");
writeln("Grid size = ", order);
Expand Down Expand Up @@ -176,7 +179,7 @@ if abs(norm-referenceNorm) > epsilon then {
writeln("L1 norm = ", norm, ", Reference L1 norm = ", referenceNorm);
}

if (!validate) {
if (!correctness) {
writef("Rate (MFlops/s): %dr Avg time (s): %r\n", 1.0E-06 * flops/avgTime, avgTime);
}
}
4 changes: 4 additions & 0 deletions test/studies/prk/Stencil/stencil-serial.compopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--set correctness --set order=100 --set iterations=3
--set correctness --set order=100 --set iterations=3 --set tileSize=20
--set correctness --set order=100 --set iterations=3 --set compact=true
--set correctness --set order=100 --set iterations=3 --set tileSize=20 --set compact=true
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
//
// Chapel's parallel stencil implementation
//
/*
Chapel's parallel Stencil implementation
Contributed by Ben Albrecht, Ben Harshbarger (Cray Inc.),
Engin Kayraklioglu (GWU)
*/

/* Standard Library */
use Time;
Expand Down Expand Up @@ -33,7 +36,7 @@ config const iterations: int = 10,
/* Enable debug output, including chplvis data */
debug: bool = false,
/* Only print result of validation - used in correctness tests*/
validate: bool = false;
correctness: bool = false;

/* Size of stride for tiling; disables tiling if set to 0 */
config var tileSize: int = 0;
Expand Down Expand Up @@ -149,7 +152,7 @@ proc main() {
//
// Print information before main loop
//
if (!validate) {
if (!correctness) {
writeln("Parallel Research Kernels Version ", PRKVERSION);
writeln("Serial stencil execution on 2D grid");
writeln("Grid size = ", order);
Expand Down Expand Up @@ -283,7 +286,7 @@ proc main() {
writeln("L1 norm = ", norm, ", Reference L1 norm = ", referenceNorm);
}

if (!validate) {
if (!correctness) {
writef("Rate (MFlops/s): %dr Avg time (s): %r\n", 1.0E-06 * flops/avgTime, avgTime);
writeln("stencil time = ", stenTime/iterations);
writeln("increment time = ", incTime / iterations);
Expand Down
6 changes: 6 additions & 0 deletions test/studies/prk/Stencil/stencil.compopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--set correctness --set order=100 --set iterations=3
--set correctness --set order=100 --set iterations=3 --set tileSize=20
--set correctness --set order=100 --set iterations=3 --set compact=true
--set correctness --set order=100 --set iterations=3 --set tileSize=20 --set compact=true
--set correctness --set order=100 --set iterations=3 --set useBlockDist=true
--set correctness --set order=100 --set iterations=3 --set useStencilDist=true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions test/studies/prk/Synch_p2p/EXECOPTS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--iterations=10 --m=100 --n=10 --correctness
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//
// Chapel's serial implementation of synch_p2p
//
/*
Chapel's serial synch_p2p implementation
Contributed by Ben Albrecht (Cray Inc.)
*/
use Time;

param PRKVERSION = "2.15";
Expand All @@ -9,7 +11,7 @@ config const iterations = 10,
m = 1000,
n = 100,
debug: bool = false,
validate: bool = false;
correctness: bool = false;

//
// Process and test input configs
Expand All @@ -36,7 +38,7 @@ var vector : [outerDom] real;
//
// Print information before main loop
//
if (!validate) {
if (!correctness) {
writeln("Parallel Research Kernels version ", PRKVERSION);
writeln("Serial pipeline execution on 2D grid");
writeln("Grid sizes = ", m, ", ", n);
Expand Down Expand Up @@ -88,7 +90,7 @@ if (abs(vector[m-1, n-1] - cornerValue) / cornerValue > epsilon) {

if (debug) then writeln("Verification value = ", cornerValue);

if (!validate) {
if (!correctness) {
writeln("Rate (MFlops/s): ", 1.0e-6 * 2 * ((m-1)*(n-1)) / avgTime,
" Avg time (s): ", avgTime);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
//
// Chapel's serial implementation of transpose
//
/*
Chapel's serial Transpose implementation
Contributed by Ben Albrecht (Cray Inc.)
*/

use Time;

param PRKVERSION = "2.15";

config const iterations : int = 100,
order : int = 100,
debug: bool = false,
validate: bool = false;
correctness: bool = false;

config var tileSize: int = 0;

Expand Down Expand Up @@ -41,7 +44,7 @@ var timer: Timer,
//
// Print information before main loop
//
if (!validate) {
if (!correctness) {
writeln("Parallel Research Kernels version ", PRKVERSION);
writeln("Serial Matrix transpose: B = A^T");
writeln("Matrix order = ", order);
Expand Down Expand Up @@ -106,7 +109,7 @@ if (debug) {
// Verify correctness
if (absErr < epsilon) {
writeln("Solution validates");
if (!validate) then writeln("Rate (MB/s): ", 1.0E-06 * bytes / avgTime,
if (!correctness) then writeln("Rate (MB/s): ", 1.0E-06 * bytes / avgTime,
" Avg time (s): ", avgTime);
} else {
writeln("ERROR: Aggregate squared error", absErr,
Expand Down
2 changes: 2 additions & 0 deletions test/studies/prk/Transpose/transpose-serial.compopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--set iterations=10 --set order=200 --set tileSize=64 --set correctness
--set iterations=10 --set order=200 --set correctness
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
//
// Chapel's parallel implementation of transpose
//
/*
Chapel's parallel Transpose implementation
Contributed by Ben Albrecht (Cray Inc.),
Engin Kayraklioglu (GWU)
*/

use Time;
use BlockDist;

Expand All @@ -10,7 +14,7 @@ config param useBlockDist = false;

config const iterations = 100,
order = 100,
validate = false,
correctness = false,
debug = false;

config var tileSize = 0;
Expand Down Expand Up @@ -55,7 +59,7 @@ var timer: Timer,
//
// Print information before main loop
//
if (!validate) {
if (!correctness) {
writeln("Parallel Research Kernels version ", PRKVERSION);
writeln("Serial Matrix transpose: B = A^T");
writeln("Matrix order = ", order);
Expand Down Expand Up @@ -119,7 +123,7 @@ if (debug) {
// Verify correctness
if (absErr < epsilon) {
writeln("Solution validates");
if (!validate) then writeln("Rate (MB/s): ", 1.0E-06 * bytes / avgTime,
if (!correctness) then writeln("Rate (MB/s): ", 1.0E-06 * bytes / avgTime,
" Avg time (s): ", avgTime);
} else {
writeln("ERROR: Aggregate squared error", absErr,
Expand Down
2 changes: 2 additions & 0 deletions test/studies/prk/Transpose/transpose.compopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--set iterations=10 --set order=200 --set tileSize=64 --set correctness
--set iterations=10 --set order=200 --set correctness
File renamed without changes.
4 changes: 0 additions & 4 deletions test/studies/prk/stencil/stencil-serial.compopts

This file was deleted.

6 changes: 0 additions & 6 deletions test/studies/prk/stencil/stencil.compopts

This file was deleted.

1 change: 0 additions & 1 deletion test/studies/prk/synch_p2p/EXECOPTS

This file was deleted.

2 changes: 0 additions & 2 deletions test/studies/prk/transpose/transpose-serial.compopts

This file was deleted.

2 changes: 0 additions & 2 deletions test/studies/prk/transpose/transpose.compopts

This file was deleted.

0 comments on commit 0f79a2d

Please sign in to comment.