Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Blog “2022-09-07-my-experience-teaching-performance-engineering” #165

Open
wants to merge 110 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
0377bc8
Create Blog “2022-09-07-my-experience-teaching-performance-engineering”
behoppe Sep 7, 2022
763679d
draft articles
Sep 9, 2022
e43f126
webdev folder for draft/dev content
Sep 9, 2022
42c572b
Partial draft of Cilkscale documentation page
ailiop Aug 23, 2022
44693f7
First draft of Cilkscale tutorial/guide
ailiop Aug 24, 2022
1961816
Add note about the `--help` option to `cilkscale.py`
ailiop Aug 24, 2022
0f43b25
Several structural and stylistics updates to Cilkscale guide
ailiop Aug 31, 2022
376c397
Move note on OpenCilk installation default to the top section
ailiop Aug 31, 2022
4ac9294
[Cilkscale] Create reference manual page
ailiop Sep 2, 2022
2e1cd2d
fixup! [Cilkscale] Create reference manual page
ailiop Sep 2, 2022
4a88790
[Cilkscale] Partial editing pass over user's guide
ailiop Sep 7, 2022
79751bc
[Cilkscale] Finish editing pass over user's guide
ailiop Sep 8, 2022
276757c
[Cilkscale] Minor edits in user's guide
ailiop Sep 8, 2022
cdf4bd2
[Cilkscale] Edit user's guide and reference manual
ailiop Sep 9, 2022
2cc9cfd
[Cilkscale] Minor edit (reference manual)
ailiop Sep 9, 2022
3fe9125
review users-guide/cilkscale
Sep 15, 2022
a74a6f8
[Cilkscale] Revise user's guide
ailiop Sep 16, 2022
7bb1714
[Cilkscale] Minor edits in reference page
ailiop Sep 16, 2022
0854f77
[Cilkscale] Tweak tutorial-like section on scalability (user guide)
ailiop Sep 16, 2022
8ecb55f
Merge behoppe's edits from PR #170 "tabular view and closing"
ailiop Sep 16, 2022
7266eab
[Cilkscale] Minor edits in reference page
ailiop Sep 16, 2022
2986017
[Cilkscale] Update cilkscale.py output
ailiop Sep 16, 2022
8d86363
review Cilkscale reference
Sep 19, 2022
10ec0f7
[Cilkscale] Reference & user's guide minor edits
ailiop Sep 20, 2022
3582d9a
[Cilkscale] cilkscale.py: disambiguate processor/core/worker
ailiop Sep 20, 2022
5bf8d4f
[Cilkscale] Regenerate Cilkscale reports, plots, and edit discussion
ailiop Sep 20, 2022
747c290
punctuation and image size adjustments
Sep 20, 2022
bb33fb9
[Install] Default setup example: consistent formatting
ailiop Sep 16, 2022
4ef0955
Reducer documentation
VoxSciurorum Jul 18, 2022
da68901
Rename hyperdoc to reducers
VoxSciurorum Jul 20, 2022
bac52ff
Move entity out of backquotes
VoxSciurorum Jul 20, 2022
6a80fdf
Use backquotes for code blocks
VoxSciurorum Jul 20, 2022
447f4b9
Try {%defn}
VoxSciurorum Jul 20, 2022
66eb68b
Try {%defn%}
VoxSciurorum Jul 20, 2022
90ad682
Try {% defn %}
VoxSciurorum Jul 20, 2022
53c5a24
Maybe the quotes are mandatory
VoxSciurorum Jul 20, 2022
38a5b11
Address a review comment
VoxSciurorum Jul 20, 2022
a863ae7
Claim credit or take blame
VoxSciurorum Jul 20, 2022
af8439e
Remove explicit reference tag, which is added without being requested
VoxSciurorum Jul 20, 2022
a1894a4
Fix a documentation bug and document a temporary limitation
VoxSciurorum Jul 20, 2022
5e41f48
Review comments
VoxSciurorum Jul 25, 2022
76acfc5
Fix markup
VoxSciurorum Jul 25, 2022
3344c94
Add glossary link. Avoid use of pronoun you.
VoxSciurorum Jul 25, 2022
8dda7d6
Reduce header levels to try to generate table of contents
VoxSciurorum Jul 25, 2022
9188630
Slight wording change
VoxSciurorum Aug 31, 2022
757e379
review comments
VoxSciurorum Sep 19, 2022
08b1b05
first stab at cilkarts glossary
Sep 2, 2022
0ddd3d4
entries of intel glossary (not cilkarts)
Sep 6, 2022
4007990
replace old glossary with new
Sep 7, 2022
1073ec8
defnTerms shortcode for checking glossary
Sep 15, 2022
a0d9a42
drop exit error from defnTerms
Sep 16, 2022
ea24780
glossary updates and new defns for opencilk cilk_scope and task-parallel
Sep 21, 2022
c4cc90c
lowercase
Sep 23, 2022
e2d0ec5
no marketing
Sep 23, 2022
e5e6810
.gitignore env and src/sphinx-bootstrap-theme
behoppe Sep 28, 2022
9c55501
first stab at cilkarts glossary
Sep 2, 2022
6c56452
entries of intel glossary (not cilkarts)
Sep 6, 2022
4fddcdf
replace old glossary with new
Sep 7, 2022
138cb51
glossary updates and new defns for opencilk cilk_scope and task-parallel
Sep 21, 2022
939488d
no marketing
Sep 23, 2022
eeb0f36
implement all TB and team glossary feedback
Sep 27, 2022
02cf77d
Revert "Merge branch 'main' into behoppe-cilkplus-glossary"
behoppe Sep 28, 2022
d5adf41
first stab at cilkarts glossary
Sep 2, 2022
f314944
entries of intel glossary (not cilkarts)
Sep 6, 2022
03753b8
replace old glossary with new
Sep 7, 2022
88510f8
glossary updates and new defns for opencilk cilk_scope and task-parallel
Sep 21, 2022
f5f9bcf
no marketing
Sep 23, 2022
497aede
first stab at cilkarts glossary
Sep 2, 2022
53b9532
entries of intel glossary (not cilkarts)
Sep 6, 2022
9008d4d
replace old glossary with new
Sep 7, 2022
3e01733
glossary updates and new defns for opencilk cilk_scope and task-parallel
Sep 21, 2022
3139471
no marketing
Sep 23, 2022
5a8c9fd
Undo accidental revert that deleted Cilkscale/Reducer pages
ailiop Sep 30, 2022
184bae1
Clean up after emacs
VoxSciurorum Sep 29, 2022
0c9a371
Update 2022-07-15-opencilk-2-0-released.md
neboat Sep 23, 2022
25faea3
Update 2022-07-15-opencilk-2-0-released.md
neboat Sep 24, 2022
33ac8fd
Start of work on language specification
VoxSciurorum Sep 23, 2022
bc302b9
replace closing quotation
behoppe Sep 23, 2022
aa5cd8c
Remove Intel CSS
behoppe Sep 23, 2022
ace64d2
review comments
VoxSciurorum Sep 23, 2022
7b670fa
notes
VoxSciurorum Sep 24, 2022
095f41b
review comments
VoxSciurorum Sep 29, 2022
9ecbe63
even more words
VoxSciurorum Sep 30, 2022
4dadc4b
debug a couple defn shortcodes
behoppe Sep 30, 2022
4d0d0f0
.gitignore pydata-sphinx-theme
behoppe Oct 4, 2022
7e1fe98
ignore sphinx
behoppe Oct 4, 2022
01bac1f
Remove language specification, which is still a draft
VoxSciurorum Oct 17, 2022
db69a80
preliminary teacher community
behoppe Nov 3, 2022
4da5ab8
qualtrics join us
behoppe Nov 4, 2022
9fc21bc
update lecture info
behoppe Nov 7, 2022
cc4bce1
link to join-us
behoppe Nov 13, 2022
481df11
use hubspot form
behoppe Dec 1, 2022
3cbfdfa
Create software.md
neboat Aug 4, 2022
0fd8a53
Update software.md
neboat Aug 4, 2022
fbcddd9
Update software.md
neboat Aug 4, 2022
a1cd59a
Update software.md
neboat Aug 4, 2022
7098a8b
make resources.md draft page
behoppe Dec 6, 2022
1822c1a
add encouraging text
behoppe Dec 6, 2022
cff556f
Update contribute.md
neboat Dec 2, 2022
0c6876c
standalone page for open projects
behoppe Dec 8, 2022
790713b
Update 2022-07-15-opencilk-2-0-released.md
neboat Dec 16, 2022
3565884
[Getting Started] Update outputs to match OpenCilk/tutorial updates
ailiop Feb 15, 2023
1ed94b5
Fix broken links on getting started page
behoppe Mar 2, 2023
738c608
Create Blog “2022-09-07-my-experience-teaching-performance-engineering”
behoppe Sep 7, 2022
63807d7
New opening paragraph
behoppe Mar 16, 2023
a1d770a
Merge branch 'cms/blog/2022-09-07-my-experience-teaching-performance-…
behoppe Mar 16, 2023
ca1a884
@behoppe I'm happy with this
jowens Mar 19, 2023
34ed2a0
small grammatical edit ("big picture" sentence)
behoppe Mar 20, 2023
8f70dce
update title "software performance engineering"
behoppe Mar 20, 2023
63b9644
initial checkin
jowens Jul 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ str
const featuredPosts = (post) => post.data.featured;

module.exports = function(eleventyConfig) {
eleventyConfig.setQuietMode(true);
// Reuse 11ty's built-in `slugify` filter.
const slugifyFn = eleventyConfig.getFilter("slugify");

// Support .yaml extension in _data
eleventyConfig.addDataExtension("yaml", contents => yaml.load(contents));

Expand Down Expand Up @@ -81,6 +85,29 @@ module.exports = function(eleventyConfig) {
.filter(featuredPosts);
});

// for defn things see https://github.com/11ty/eleventy/issues/2565
eleventyConfig.addCollection("defns", function (collectionApi) {
const res = [];
for (const post of collectionApi.getAll()) {
// see https://github.com/11ty/eleventy/discussions/2153, re: "Tried to use templateContent too early".
const defs = post.template.frontMatter?.content.trim().matchAll(/{% defn (?<value>.*?) %}/gi);
for (const { groups } of defs) {
const [ term, text ] = groups.value.split(",").map(s => s.trim().replace(/"/g, ""));
res.push({ url: post.url, term, text });
}
}
return res;
});

eleventyConfig.addCollection("defnTerms", function (collectionApi) {
const defns = collectionApi.getFilteredByTag("glossary");
// Possibly over-engineered here. We might really only care about the slugified title and not the unslugged version.
const data = defns.reduce((acc, { data }) => {
return Object.assign(acc, {[slugifyFn(data.title)]: data.title});
}, {});
return data;
});

eleventyConfig.addCollection('glossary', (collection) => {
return collection
.getFilteredByGlob("./src/doc/reference/glossary/*.md")
Expand Down Expand Up @@ -151,16 +178,21 @@ module.exports = function(eleventyConfig) {
function(source='', size='400') { return `<img style="margin: 0.2em 4em 0.2em 2em; max-width:${size}; max-height:${size}" src="${source}" class="img-fluid float-start"></img>` }
);

// Shortcode for glossary links
// Shortcode for glossary links (see https://github.com/11ty/eleventy/issues/2565#issuecomment-1246106301)
eleventyConfig.addShortcode(
"defn",
function(term='', text='') {
const url = "/doc/reference/glossary/#" + slugify(term)
if (text=='')
docText = term
else
docText = text
return `<a class="defn" href="${url}">${docText}</a>`
function(term='', text='') {
// Some sneaky stuff here to get the context from the `this.ctx` object so we can access
// `collections` and `page` variables from within our shortcode.
const { collections, page } = this.ctx;
const slug = slugifyFn(term);
const glossaryUrl = `/doc/reference/glossary/#${slug}`;
// If our `collections.defnTerms` does NOT include the current slug, it's likely a bad link/defn.
if (!Object.keys(collections.defnTerms).includes(slug)) {
console.error(`[${page.url}] Unknown term: "${term}" => ${glossaryUrl}`);
// process.exitCode = 1;
}
return `<a class="defn" href="${glossaryUrl}">${text || term}</a>`;
}
);

Expand Down
3 changes: 2 additions & 1 deletion .eleventyignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
README.md
README.md
src/sphinx-bootstrap-theme
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
_site/
_tmp/
.DS_Store
env
node_modules/
.vscode/
*git/
package-lock.json
.env
src/sphinx
src/sphinx-bootstrap-theme
src/pydata-sphinx-theme
*~

# Local Netlify folder
.netlify
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@11ty/eleventy": "^1.0.0",
"@11ty/eleventy-navigation": "^0.3.2",
"@11ty/eleventy-plugin-rss": "^1.1.2",
"dotenv": "^16.0.2",
"eleventy-plugin-toc": "^1.1.5",
"js-yaml": "^4.1.0",
"luxon": "^2.3.1",
Expand Down
2 changes: 1 addition & 1 deletion src/_data/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "The OpenCilk Team",
"email": "contact@opencilk.org",
"attribution": {
"cilkplus": "This work is derived from Cilk Plus documentation with permission of Intel Corporation and Cilk Arts."
"cilkplus": "This work is derived from Cilk++ documentation with permission of Intel Corporation."
},
"blog": {
"title": "Fast Code",
Expand Down
40 changes: 40 additions & 0 deletions src/_includes/code/qsort.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include <iostream>
#include <algorithm>
#include <random>
#include <cilk/cilk.h>

constexpr std::ptrdiff_t BASE_CASE_LENGTH = 32;

template <typename T>
void sample_qsort(T* begin, T* end) {
if (end - begin < BASE_CASE_LENGTH) {
std::sort(begin, end); // base case: serial sort
} else {
--end; // exclude last element (pivot) from partition
T* middle = std::partition(begin, end,
[pivot=*end](T a) { return a < pivot; });
std::swap(*end, *middle); // move pivot to middle
cilk_scope {
cilk_spawn sample_qsort(begin, middle);
sample_qsort(++middle, ++end); // exclude pivot and restore end
}
}
}

int main(int argc, char* argv[]) {
long n = 100 * 1000 * 1000;
if (argc == 2)
n = std::atoi(argv[1]);

std::default_random_engine rng;
std::uniform_int_distribution<long> dist(0,n);
std::vector<long> a(n);
std::generate(a.begin(), a.end(), [&]() { return dist(rng); });

std::cout << "Sorting " << n << " random integers" << std::endl;
sample_qsort(a.data(), a.data() + a.size());

bool pass = std::is_sorted(a.cbegin(), a.cend());
std::cout << "Sort " << ((pass) ? "succeeded" : "failed") << "\n";
return (pass) ? 0 : 1;
}
2 changes: 2 additions & 0 deletions src/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% if permalink !== false %}
<html lang="{{ site.lang}}">
{% include 'partials/header.njk' %}
<body class="thumb d-flex flex-column vh-100">
Expand Down Expand Up @@ -92,3 +93,4 @@
</div>
</body>
</html>
{% endif %}
2 changes: 1 addition & 1 deletion src/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ eleventyNavigation:
order: 5
---

OpenCilk is a community-driven open source project developed by a diverse group of contributors. [Join us](/contribute)!
OpenCilk is a community-driven open source project developed by a diverse group of contributors. [Join us](/community/join-us/)!

## Where can I get help?

Expand Down
54 changes: 54 additions & 0 deletions src/community/community.11tydata.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
require('dotenv').config();

const isDevEnv = process.env.ELEVENTY_ENV === 'development';
const todaysDate = new Date();

function showDraft(data) {
const isDraft = 'draft' in data && data.draft !== false;
const isFutureDate = data.page.date > todaysDate;
return isDevEnv || (!isDraft && !isFutureDate);
}

module.exports = function() {
return {
eleventyComputed: {
eleventyExcludeFromCollections: function(data) {
if(showDraft(data)) {
return data.eleventyExcludeFromCollections;
}
else {
return true;
}
},
permalink: function(data) {
if(showDraft(data)) {
return data.permalink
}
else {
return false;
}
},
eleventyNavigation: {
key: function(data) {
if(showDraft(data)) {
return data.title
}
else {
return false;
}
}
},
sidebar: function(data) {
return 'toc';
},
background: function(data) {
if(('draft' in data && data.draft !== false) || (data.page.date > todaysDate)) {
return 'text-white bg-info'
}
else {
return 'bg-white';
}
}
}
}
}
19 changes: 19 additions & 0 deletions src/community/join-us.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: layouts/page.njk
sidebar: toc
title: Join us
eleventyNavigation:
key: Join us
order: 1
---

The OpenCilk project welcomes your expertise and enthusiasm. Please fill out the form below to get started. Thank you for your interest!

<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
<script>
hbspt.forms.create({
region: "na1",
portalId: "23473286",
formId: "c934cff4-d083-48d8-84b3-0c5f5477cacc"
});
</script>
1 change: 1 addition & 0 deletions src/community/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: layouts/page.njk
sidebar: toc
title: Resources
draft: true
eleventyNavigation:
key: Resources
parent: Community
Expand Down
42 changes: 42 additions & 0 deletions src/community/software.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
layout: layouts/page.njk
sidebar: toc
title: Software
eleventyNavigation:
key: Software
parent: Community
order: 99
---

This page lists software contributed by the community that is related to OpenCilk, including OpenCilk-powered applications and libraries and
miscellaneous tools to help developers write Cilk programs.

## OpenCilk-powered libraries

The following third-party libraries are known to work with OpenCilk out of the
box for parallel execution.

- [SG-t-SNE-Π](https://github.com/fcdimitr/sgtsnepi): Low-dimensional embedding
of sparse stochastic graphs.
- [FGLT](https://github.com/ailiop/fglt): Fast graphlet transform.
- [RecFMM](https://github.com/zhang416/recfmm): Adaptive fast multipole method.
- [ParlayLib](https://github.com/cmuparlay/parlaylib): A toolkit for programming parallel algorithms on shared-memory multicore machines.

## OpenCilk-powered applications

The following third-party applications are known to work with OpenCilk.

- [The Problem Based Benchmark Suite (V2)](https://cmuparlay.github.io/pbbsbench/): A collection of over 20 benchmarks defined in terms of their IO characteristics.
- [GBBS: Graph Based Benchmark Suite](https://github.com/ParAlg/gbbs): A collection of fast parallel graph algorithms.
- [mold](https://github.com/wheatman/mold): A port of the mold linker to OpenCilk.

## Miscellaneous developer tools

- [cilk-mode.el](https://github.com/ailiop/cilk-mode/): Emacs minor mode for
Cilk source code.

## Contribute

Want your OpenCilk-powered software listed here? Contact us at [contact@opencilk.org](mailto:contact@opencilk.org).

You can find more information on contributing to OpenCilk [here](/contribute).
Loading