Skip to content

Commit

Permalink
Add slides for a presentation on "the simplest useful workflow:
Browse files Browse the repository at this point in the history
a reminder of some handy basic Cylc features"
  • Loading branch information
wxtim committed Jul 3, 2024
1 parent 70accc0 commit cdca757
Show file tree
Hide file tree
Showing 2 changed files with 476 additions and 0 deletions.
374 changes: 374 additions & 0 deletions simplest-useful/slides.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,374 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<title>slides</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="https://unpkg.com/reveal.js@^4//dist/reset.css">
<link rel="stylesheet" href="https://unpkg.com/reveal.js@^4//dist/reveal.css">
<style>
.reveal .sourceCode { /* see #7635 */
overflow: visible;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { color: #008000; } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { color: #008000; font-weight: bold; } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="https://unpkg.com/reveal.js@^4//dist/theme/black.css" id="theme">
</head>
<body>
<div class="reveal">
<div class="slides">


<section>
<section id="the-simplest-useful-cylc-workflow"
class="title-slide slide level1">
<h1>The Simplest Useful Cylc Workflow</h1>

</section>
<section id="aim" class="slide level2">
<h2>Aim</h2>
<p>Show you how to replace a very simple script with a very simple
workflow and get some (nearly) free:</p>
<ul>
<li>Error handling</li>
<li>Efficiency</li>
</ul>
</section>
<section id="the-problem" class="slide level2">
<h2>The problem…</h2>
<blockquote>
<p>I want to get some data…</p>
</blockquote>
<ul>
<li>🕰️ Time</li>
<li>💔 Reliability</li>
</ul>
<blockquote>
<p>… and do some analysis</p>
</blockquote>
<ul>
<li>🐏 Memory</li>
<li>🍟 Processor Power</li>
</ul>
</section>
<section id="the-original-script" class="slide level2">
<h2>The original Script:</h2>
<div class="sourceCode" id="cb1"><pre
class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/bin/bash</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="co">#@supercomputer --time 300</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co">#@supercomputer --memory LOTS</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="co">#@supercomputer --CPU MANY</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="ex">./bin/get_data.sh</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="ex">./bin/process_data.sh</span></span></code></pre></div>
</section>
<section id="the-workflow" class="slide level2">
<h2>The Workflow</h2>
</section>
<section id="graph" class="slide level2">
<h2>graph</h2>
<pre><code>[scheduling]
[[graph]]
R1 = get_data =&gt; process_data</code></pre>
</section>
<section id="get_data" class="slide level2">
<h2>get_data</h2>
<pre><code>[runtime]
[[get_data]]
script = get_data.sh
platform = any_old_server</code></pre>
</section>
<section id="process_data" class="slide level2">
<h2>process_data</h2>
<pre><code>[runtime]
[[process_data]]
script = process_data.sh
platform = supercomputer
[[[directives]]]
--time 300 # DONT!
--memory LOTS
--CPU MANY</code></pre>
</section>
<section id="gains-so-far" class="slide level2">
<h2>Gains so far</h2>
<ul>
<li>💰 get_data fails =&gt; no supercomputer resource request</li>
<li>🏃 <code>cylc install</code> =&gt; run dir</li>
<li>📕 Cylc’s logging facilities</li>
</ul>
<p>But there’s more…</p>
</section>
<section id="a-cylc-anti-pattern" class="slide level2">
<h2>A Cylc Anti Pattern</h2>
<div class="sourceCode" id="cb5"><pre
class="sourceCode diff"><code class="sourceCode diff"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>[[process_data]]</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="va">+ execution time limit = PT5M</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> [[[directives]]]</span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="st">- --time 300 # DONT!</span></span></code></pre></div>
<p><strong>Cylc will know the task has timed out</strong> <strong>even
without communication with the platform!</strong></p>
</section>
<section id="retries" class="slide level2">
<h2>Retries</h2>
<div class="sourceCode" id="cb6"><pre
class="sourceCode diff"><code class="sourceCode diff"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>[[get_data]]</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> script = get_data.sh</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> platform = any_old_server</span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="va">+ execution retry delays = 4*PT15M, PT1D</span></span></code></pre></div>
</section>
<section id="aim-1" class="slide level2">
<h2>Aim</h2>
<p>Show you how to replace a very simple script with a very simple
workflow and get some (nearly) free:</p>
<ul>
<li>Error handling</li>
<li>Efficiency</li>
</ul>
</section></section>
</div>
</div>

<script src="https://unpkg.com/reveal.js@^4//dist/reveal.js"></script>

<!-- reveal.js plugins -->
<script src="https://unpkg.com/reveal.js@^4//plugin/notes/notes.js"></script>
<script src="https://unpkg.com/reveal.js@^4//plugin/search/search.js"></script>
<script src="https://unpkg.com/reveal.js@^4//plugin/zoom/zoom.js"></script>

<script>

// Full list of configuration options available at:
// https://revealjs.com/config/
Reveal.initialize({
// Display controls in the bottom right corner
controls: true,

// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: true,

// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: 'bottom-right',

// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: 'faded',

// Display a presentation progress bar
progress: true,

// Display the page number of the current slide
slideNumber: false,

// 'all', 'print', or 'speaker'
showSlideNumber: 'all',

// Add the current slide number to the URL hash so that reloading the
// page/copying the URL will return you to the same slide
hash: true,

// Start with 1 for the hash rather than 0
hashOneBasedIndex: false,

// Flags if we should monitor the hash and change slides accordingly
respondToHashChanges: true,

// Push each slide change to the browser history
history: false,

// Enable keyboard shortcuts for navigation
keyboard: true,

// Enable the slide overview mode
overview: true,

// Disables the default reveal.js slide layout (scaling and centering)
// so that you can use custom CSS layout
disableLayout: false,

// Vertical centering of slides
center: true,

// Enables touch navigation on devices with touch input
touch: true,

// Loop the presentation
loop: false,

// Change the presentation direction to be RTL
rtl: false,

// see https://revealjs.com/vertical-slides/#navigation-mode
navigationMode: 'default',

// Randomizes the order of slides each time the presentation loads
shuffle: false,

// Turns fragments on and off globally
fragments: true,

// Flags whether to include the current fragment in the URL,
// so that reloading brings you to the same fragment position
fragmentInURL: true,

// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: false,

// Flags if we should show a help overlay when the questionmark
// key is pressed
help: true,

// Flags if it should be possible to pause the presentation (blackout)
pause: true,

// Flags if speaker notes should be visible to all viewers
showNotes: false,

// Global override for autoplaying embedded media (null/true/false)
autoPlayMedia: null,

// Global override for preloading lazy-loaded iframes (null/true/false)
preloadIframes: null,

// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: 0,

// Stop auto-sliding after user input
autoSlideStoppable: true,

// Use this method for navigation when auto-sliding
autoSlideMethod: null,

// Specify the average time in seconds that you think you will spend
// presenting each slide. This is used to show a pacing timer in the
// speaker view
defaultTiming: null,

// Enable slide navigation via mouse wheel
mouseWheel: false,

// The display mode that will be used to show slides
display: 'block',

// Hide cursor if inactive
hideInactiveCursor: true,

// Time before the cursor is hidden (in ms)
hideCursorTime: 5000,

// Opens links in an iframe preview overlay
previewLinks: false,

// Transition style (none/fade/slide/convex/concave/zoom)
transition: 'slide',

// Transition speed (default/fast/slow)
transitionSpeed: 'default',

// Transition style for full page slide backgrounds
// (none/fade/slide/convex/concave/zoom)
backgroundTransition: 'fade',

// Number of slides away from the current that are visible
viewDistance: 3,

// Number of slides away from the current that are visible on mobile
// devices. It is advisable to set this to a lower number than
// viewDistance in order to save resources.
mobileViewDistance: 2,

// reveal.js plugins
plugins: [
RevealNotes,
RevealSearch,
RevealZoom
]
});
</script>
</body>
</html>
Loading

0 comments on commit cdca757

Please sign in to comment.