[Swift-commit] r8396 - SwiftApps/subjobs

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Mon Mar 16 15:45:45 CDT 2015


Author: ketan
Date: 2015-03-16 15:45:44 -0500 (Mon, 16 Mar 2015)
New Revision: 8396

Added:
   SwiftApps/subjobs/README.html
Log:
add html version of README to svn

Added: SwiftApps/subjobs/README.html
===================================================================
--- SwiftApps/subjobs/README.html	                        (rev 0)
+++ SwiftApps/subjobs/README.html	2015-03-16 20:45:44 UTC (rev 8396)
@@ -0,0 +1,1093 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
+<title>Running Sub-block jobs via Swift</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+  font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+  font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+  margin: 1em 5% 1em 5%;
+}
+
+a {
+  color: blue;
+  text-decoration: underline;
+}
+a:visited {
+  color: fuchsia;
+}
+
+em {
+  font-style: italic;
+  color: navy;
+}
+
+strong {
+  font-weight: bold;
+  color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+  color: #527bbd;
+  margin-top: 1.2em;
+  margin-bottom: 0.5em;
+  line-height: 1.3;
+}
+
+h1, h2, h3 {
+  border-bottom: 2px solid silver;
+}
+h2 {
+  padding-top: 0.5em;
+}
+h3 {
+  float: left;
+}
+h3 + * {
+  clear: left;
+}
+h5 {
+  font-size: 1.0em;
+}
+
+div.sectionbody {
+  margin-left: 0;
+}
+
+hr {
+  border: 1px solid silver;
+}
+
+p {
+  margin-top: 0.5em;
+  margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+  margin-top: 0;
+}
+ul > li     { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+  font-family: "Courier New", Courier, monospace;
+  font-size: inherit;
+  color: navy;
+  padding: 0;
+  margin: 0;
+}
+pre {
+  white-space: pre-wrap;
+}
+
+#author {
+  color: #527bbd;
+  font-weight: bold;
+  font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+  font-size: small;
+  border-top: 2px solid silver;
+  padding-top: 0.5em;
+  margin-top: 4.0em;
+}
+#footer-text {
+  float: left;
+  padding-bottom: 0.5em;
+}
+#footer-badges {
+  float: right;
+  padding-bottom: 0.5em;
+}
+
+#preamble {
+  margin-top: 1.5em;
+  margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+  margin-top: 1.0em;
+  margin-bottom: 1.5em;
+}
+div.admonitionblock {
+  margin-top: 2.0em;
+  margin-bottom: 2.0em;
+  margin-right: 10%;
+  color: #606060;
+}
+
+div.content { /* Block element content. */
+  padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+  color: #527bbd;
+  font-weight: bold;
+  text-align: left;
+  margin-top: 1.0em;
+  margin-bottom: 0.5em;
+}
+div.title + * {
+  margin-top: 0;
+}
+
+td div.title:first-child {
+  margin-top: 0.0em;
+}
+div.content div.title:first-child {
+  margin-top: 0.0em;
+}
+div.content + div.title {
+  margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+  background: #ffffee;
+  border: 1px solid #dddddd;
+  border-left: 4px solid #f0f0f0;
+  padding: 0.5em;
+}
+
+div.listingblock > div.content {
+  border: 1px solid #dddddd;
+  border-left: 5px solid #f0f0f0;
+  background: #f8f8f8;
+  padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+  padding-left: 1.0em;
+  margin-left: 1.0em;
+  margin-right: 10%;
+  border-left: 5px solid #f0f0f0;
+  color: #888;
+}
+
+div.quoteblock > div.attribution {
+  padding-top: 0.5em;
+  text-align: right;
+}
+
+div.verseblock > pre.content {
+  font-family: inherit;
+  font-size: inherit;
+}
+div.verseblock > div.attribution {
+  padding-top: 0.75em;
+  text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+  text-align: left;
+}
+
+div.admonitionblock .icon {
+  vertical-align: top;
+  font-size: 1.1em;
+  font-weight: bold;
+  text-decoration: underline;
+  color: #527bbd;
+  padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+  padding-left: 0.5em;
+  border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+  border-left: 3px solid #dddddd;
+  padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+  margin-top: 0.8em;
+  margin-bottom: 0.8em;
+}
+dt {
+  margin-top: 0.5em;
+  margin-bottom: 0;
+  font-style: normal;
+  color: navy;
+}
+dd > *:first-child {
+  margin-top: 0.1em;
+}
+
+ul, ol {
+    list-style-position: outside;
+}
+ol.arabic {
+  list-style-type: decimal;
+}
+ol.loweralpha {
+  list-style-type: lower-alpha;
+}
+ol.upperalpha {
+  list-style-type: upper-alpha;
+}
+ol.lowerroman {
+  list-style-type: lower-roman;
+}
+ol.upperroman {
+  list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+  margin-top: 0.1em;
+  margin-bottom: 0.1em;
+}
+
+tfoot {
+  font-weight: bold;
+}
+td > div.verse {
+  white-space: pre;
+}
+
+div.hdlist {
+  margin-top: 0.8em;
+  margin-bottom: 0.8em;
+}
+div.hdlist tr {
+  padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+  font-weight: bold;
+}
+td.hdlist1 {
+  vertical-align: top;
+  font-style: normal;
+  padding-right: 0.8em;
+  color: navy;
+}
+td.hdlist2 {
+  vertical-align: top;
+}
+div.hdlist.compact tr {
+  margin: 0;
+  padding-bottom: 0;
+}
+
+.comment {
+  background: yellow;
+}
+
+.footnote, .footnoteref {
+  font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+  vertical-align: super;
+}
+
+#footnotes {
+  margin: 20px 0 20px 0;
+  padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+  margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+  border: none;
+  border-top: 1px solid silver;
+  height: 1px;
+  text-align: left;
+  margin-left: 0;
+  width: 20%;
+  min-width: 100px;
+}
+
+div.colist td {
+  padding-right: 0.5em;
+  padding-bottom: 0.3em;
+  vertical-align: top;
+}
+div.colist td img {
+  margin-top: 0.3em;
+}
+
+ at media print {
+  #footer-badges { display: none; }
+}
+
+#toc {
+  margin-bottom: 2.5em;
+}
+
+#toctitle {
+  color: #527bbd;
+  font-size: 1.1em;
+  font-weight: bold;
+  margin-top: 1.0em;
+  margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+  margin-top: 0;
+  margin-bottom: 0;
+}
+div.toclevel2 {
+  margin-left: 2em;
+  font-size: 0.9em;
+}
+div.toclevel3 {
+  margin-left: 4em;
+  font-size: 0.9em;
+}
+div.toclevel4 {
+  margin-left: 6em;
+  font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+  margin-top: 1.0em;
+  margin-bottom: 1.5em;
+}
+div.tableblock > table {
+  border: 3px solid #527bbd;
+}
+thead, p.table.header {
+  font-weight: bold;
+  color: #527bbd;
+}
+p.table {
+  margin-top: 0;
+}
+/* Because the table frame attribute is overriden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+  border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+  border-left-style: none;
+  border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+  border-top-style: none;
+  border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+  margin-top: 1.0em;
+  margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+  font-weight: bold;
+  color: #527bbd;
+}
+p.tableblock {
+  margin-top: 0;
+}
+table.tableblock {
+  border-width: 3px;
+  border-spacing: 0px;
+  border-style: solid;
+  border-color: #527bbd;
+  border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+  border-width: 1px;
+  padding: 4px;
+  border-style: solid;
+  border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+  border-left-style: hidden;
+  border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+  border-top-style: hidden;
+  border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+  border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+  text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+  text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+  text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+  vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+  vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+  vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+  padding-top: 0.5em;
+  padding-bottom: 0.5em;
+  border-top: 2px solid silver;
+  border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+  border-style: none;
+}
+body.manpage div.sectionbody {
+  margin-left: 3em;
+}
+
+ at media print {
+  body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = {  // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+  function getText(el) {
+    var text = "";
+    for (var i = el.firstChild; i != null; i = i.nextSibling) {
+      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+        text += i.data;
+      else if (i.firstChild != null)
+        text += getText(i);
+    }
+    return text;
+  }
+
+  function TocEntry(el, text, toclevel) {
+    this.element = el;
+    this.text = text;
+    this.toclevel = toclevel;
+  }
+
+  function tocEntries(el, toclevels) {
+    var result = new Array;
+    var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+    // Function that scans the DOM tree for header elements (the DOM2
+    // nodeIterator API would be a better technique but not supported by all
+    // browsers).
+    var iterate = function (el) {
+      for (var i = el.firstChild; i != null; i = i.nextSibling) {
+        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+          var mo = re.exec(i.tagName);
+          if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+          }
+          iterate(i);
+        }
+      }
+    }
+    iterate(el);
+    return result;
+  }
+
+  var toc = document.getElementById("toc");
+  if (!toc) {
+    return;
+  }
+
+  // Delete existing TOC entries in case we're reloading the TOC.
+  var tocEntriesToRemove = [];
+  var i;
+  for (i = 0; i < toc.childNodes.length; i++) {
+    var entry = toc.childNodes[i];
+    if (entry.nodeName.toLowerCase() == 'div'
+     && entry.getAttribute("class")
+     && entry.getAttribute("class").match(/^toclevel/))
+      tocEntriesToRemove.push(entry);
+  }
+  for (i = 0; i < tocEntriesToRemove.length; i++) {
+    toc.removeChild(tocEntriesToRemove[i]);
+  }
+
+  // Rebuild TOC entries.
+  var entries = tocEntries(document.getElementById("content"), toclevels);
+  for (var i = 0; i < entries.length; ++i) {
+    var entry = entries[i];
+    if (entry.element.id == "")
+      entry.element.id = "_toc_" + i;
+    var a = document.createElement("a");
+    a.href = "#" + entry.element.id;
+    a.appendChild(document.createTextNode(entry.text));
+    var div = document.createElement("div");
+    div.appendChild(a);
+    div.className = "toclevel" + entry.toclevel;
+    toc.appendChild(div);
+  }
+  if (entries.length == 0)
+    toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+  // Delete existing footnote entries in case we're reloading the footnodes.
+  var i;
+  var noteholder = document.getElementById("footnotes");
+  if (!noteholder) {
+    return;
+  }
+  var entriesToRemove = [];
+  for (i = 0; i < noteholder.childNodes.length; i++) {
+    var entry = noteholder.childNodes[i];
+    if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+      entriesToRemove.push(entry);
+  }
+  for (i = 0; i < entriesToRemove.length; i++) {
+    noteholder.removeChild(entriesToRemove[i]);
+  }
+
+  // Rebuild footnote entries.
+  var cont = document.getElementById("content");
+  var spans = cont.getElementsByTagName("span");
+  var refs = {};
+  var n = 0;
+  for (i=0; i<spans.length; i++) {
+    if (spans[i].className == "footnote") {
+      n++;
+      var note = spans[i].getAttribute("data-note");
+      if (!note) {
+        // Use [\s\S] in place of . so multi-line matches work.
+        // Because JavaScript has no s (dotall) regex flag.
+        note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+        spans[i].innerHTML =
+          "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+          "' title='View footnote' class='footnote'>" + n + "</a>]";
+        spans[i].setAttribute("data-note", note);
+      }
+      noteholder.innerHTML +=
+        "<div class='footnote' id='_footnote_" + n + "'>" +
+        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+        n + "</a>. " + note + "</div>";
+      var id =spans[i].getAttribute("id");
+      if (id != null) refs["#"+id] = n;
+    }
+  }
+  if (n == 0)
+    noteholder.parentNode.removeChild(noteholder);
+  else {
+    // Process footnoterefs.
+    for (i=0; i<spans.length; i++) {
+      if (spans[i].className == "footnoteref") {
+        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+        href = href.match(/#.*/)[0];  // Because IE return full URL.
+        n = refs[href];
+        spans[i].innerHTML =
+          "[<a href='#_footnote_" + n +
+          "' title='View footnote' class='footnote'>" + n + "</a>]";
+      }
+    }
+  }
+},
+
+install: function(toclevels) {
+  var timerId;
+
+  function reinstall() {
+    asciidoc.footnotes();
+    if (toclevels) {
+      asciidoc.toc(toclevels);
+    }
+  }
+
+  function reinstallAndRemoveTimer() {
+    clearInterval(timerId);
+    reinstall();
+  }
+
+  timerId = setInterval(reinstall, 500);
+  if (document.addEventListener)
+    document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+  else
+    window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install(2);
+/*]]>*/
+</script>
+</head>
+<body class="article" style="max-width:750px">
+<div id="header">
+<h1>Running Sub-block jobs via Swift</h1>
+<div id="toc">
+  <div id="toctitle">Table of Contents</div>
+  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_introduction">1. Introduction</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This document describes an approach to run multiple jobs over a single large
+block of compute nodes on BlueGene/Q systems.</p></div>
+<div class="paragraph"><p>The technique, called sub-block jobs lets users submit multiple, independent,
+repeated jobs within a single larger Cobalt block. Sub-block jobs is a mode of
+running jobs on BlueGene/Q systems wherein one can allocate a larger "outer"
+block of compute nodes and repeatedly submit jobs of smaller sized sub-blocks
+to this block.</p></div>
+<div class="paragraph"><p>The current package provides tools, scripts and example use-cases to run Swift
+applications in sub-block mode over the ALCF BlueGene/Q resources: <code>Vesta</code>,
+<code>Cetus</code> and <code>Mira</code>. The benefit of this approach is that the user does not have
+to invoke the sub-block specific routines involving the details of the
+underlying node interconnect hardware. Additionally, with the same Swift script
+and configuration, user gets a flexibility to run jobs in sub-block or
+non-sub-block mode depending on the scale and size of a run. The approach
+transparently allows user to run jobs directly via Swift. Users can run
+multiple <em>waves</em> of jobs asynchronously and in parallel without restarting the
+outer block.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_swift_sub_block_jobs">2. Swift sub-block jobs</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To download the package, checkout the directory as follows:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>svn co https://svn.ci.uchicago.edu/svn/vdl2/SwiftApps/subjobs</code></pre>
+</div></div>
+<div class="paragraph"><p>followed by:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>cd  subjobs</code></pre>
+</div></div>
+<div class="paragraph"><p>To set up the environment:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>source setup</code></pre>
+</div></div>
+<div class="paragraph"><p>To run an example application</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>./runswift.sh</code></pre>
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_how_to">3. How To</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To convert an ordinary Swift application run in sub-block mode, the following changes are required:</p></div>
+<div class="paragraph"><p>First, Add bg.sh as the application invoker in place of <code>sh</code> or any other invoker. For example, if the app definition is as follows:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>sh @exe @i @o arg("s","1") stdout=@sout stderr=@serr;</code></pre>
+</div></div>
+<div class="paragraph"><p>Replace the shell invocation with the bg.sh invocations like so:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>bg.sh @exe @i @o arg("s","1") stdout=@sout stderr=@serr;</code></pre>
+</div></div>
+<div class="paragraph"><p>Second, add the <code>SUBBLOCK_SIZE</code> environment variable to the sites file. For example:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code><profile key="SUBBLOCK_SIZE" namespace="env">16</profile></code></pre>
+</div></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">The value of <code>SUBBLOCK_SIZE</code> variable must be a power of 2 greater than 8 and less than the <code>maxnodes</code> value.</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>A complete example sites file for a sub-block job run on ALCF <code>Vesta</code> is shown below:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code><?xml version="1.0" encoding="UTF-8"?>
+<config xmlns="http://www.ci.uchicago.edu/swift/SwiftSites">
+
+<pool handle="cluster">
+<execution provider="coaster" jobmanager="local:cobalt" />
+
+<!-- "slots" determine the number of Cobalt jobs -->
+<profile namespace="globus" key="slots">1</profile>
+<profile namespace="globus" key="mode">script</profile>
+
+<profile namespace="karajan" key="jobThrottle">2.99</profile>
+<profile namespace="karajan" key="initialScore">10000</profile>
+<profile namespace="globus" key="maxwalltime">00:40:00</profile>
+<profile namespace="globus" key="walltime">2050</profile>
+<profile namespace="globus" key="maxnodes">256</profile>
+<profile namespace="globus" key="nodegranularity">256</profile>
+
+<!-- required for sub-block jobs, remove for non-sub-block jobs -->
+<profile key="SUBBLOCK_SIZE" namespace="env">16</profile>
+<profile namespace="globus" key="jobsPerNode">16</profile>
+
+<workdirectory>/tmp/swiftwork</workdirectory>
+<filesystem provider="local"/>
+
+</pool>
+</config></code></pre>
+</div></div>
+<div class="paragraph"><p>Of note are the <code>SUBBLOCK_SIZE</code> and the <code>mode</code> properties which must be present
+in the sites definition. The former defines the size of the subblock needed and
+the latter specifies that the "mode" to run the outer cobalt job would be
+<code>script</code> mode. In this particular example, we have the outer block size to be
+256 nodes whereas the subblock size is 16 nodes. This results in a total of 16
+subblocks resulting in <code>jobsPerNode</code> value to be 16.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">Swift installation for sub-block jobs on Vesta and Mira machines can be found at <code>/home/ketan/swift-0.95/cog/modules/swift/dist/swift-svn/bin/swift</code></td>
+</tr></table>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_use_case_applications">4. Use-Case Applications</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This section discusses some of the real-world use-case applications that are set up
+with this package. These applications are tested with subblock and non-subblock
+runs on ALCF Vesta, a 2-rack (2048 nodes) BlueGene/Q system.</p></div>
+<div class="sect2">
+<h3 id="_namd">4.1. NAMD</h3>
+<div class="paragraph"><p><code>NAMD</code> is a molecular dynamics simulation code developed at
+<a href="http://www.ks.uiuc.edu/Research/namd">uiuc</a>. The Swift source and configuration
+files along with application inputs can be found in the <code>namd</code> directory in the
+subjobs pacjage. To run NAMD example:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>cd namd #change to the package's namd directory
+./runvesta.sh #run on vesta
+./runmira.sh  #run on mira</code></pre>
+</div></div>
+<div class="paragraph"><p>To run NAMD with a different input dataset, change the input files in the
+<code>input_files</code> directory and reflect the changes in the <code>namd.swift</code> source code,
+especially the data definitions part:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>file psf <"input_files/h0_solvion.psf">;
+file pdb <"input_files/h0_solvion.pdb">;
+file coord_restart <"input_files/h0_eq.0.restart.coor">;
+file velocity_restart <"input_files/h0_eq.0.restart.vel">;
+file system_restart <"input_files/h0_eq.0.restart.xsc">;
+file namd_config <"input_files/h0_eq.conf">;
+file charmm_parameters <"input_files/par_all22_prot.inp">;</code></pre>
+</div></div>
+<div class="paragraph"><p>Similarly, in order to change the scale and size of runs, make changes to the
+parameters in the sites file as described in section 1 above.</p></div>
+<div class="paragraph"><p>ToDo: Visualize NAMD results with VMD.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_rosetta">4.2. Rosetta</h3>
+<div class="paragraph"><p><code>Rosetta</code> is a molecular <a href="http://rosie.rosettacommons.org/docking">docking</a>
+toolkit with many related programs used by many large-scale HPC science
+applications. This implementation shows how to run <code>FlexPeptide Docking</code> on
+ALCF systems. The Swift scripts, configuration and application specific inputs
+are found in the <code>rosetta</code> directory. To run the example:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>cd rosetta
+./runvesta.sh #run on vesta
+./runmira.sh #run on mira</code></pre>
+</div></div>
+<div class="paragraph"><p>To change scale, size and/or inputs of the run, change the location of input
+files in the Swift source file (<code>rosetta.swift</code>) like so:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>file pdb_files[] <filesys_mapper; location="hlac_complex", suffix=".pdb">;</code></pre>
+</div></div>
+<div class="paragraph"><p>In the above line all <code>.pdb</code> files in the directory <code>hlac_complex</code> will be
+processed in parallel. Change the <code>location</code> from <code>hlac_complex</code> to where you
+have your input files.</p></div>
+<div class="paragraph"><p>To change the number of generated <code>structs</code> by Flexpep Docking program, change
+the struct argument in the call to the rosetta application like so:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>(scorefile, rosetta_output, rosetta_error) = rosetta(pdb, 2);</code></pre>
+</div></div>
+<div class="paragraph"><p>In the above line, the number <code>2</code> indicates the number of <code>structs</code> to be generated by the docking. Change this value to the desired size to change the desired number of <code>structs</code>. To make changes to other parameters, make changes to the commandline as invoked in the <code>app</code> definition in the Swift script like so:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>bgsh "/home/ketan/openmp-gnu-july16-mini/build/src/debug/linux/2.6/64/ppc64/xlc/static-mpi/FlexPepDocking.staticmpi.linuxxlcdebug" "-database" "/home/ketan/minirosetta_database" "-pep_refine" "-s" @pdb_file "-ex1" "-ex2aro" "-use_input_sc" "-nstruct" nstruct "-overwrite" "-scorefile" @_scorefile stdout=@out stderr=@err;</code></pre>
+</div></div>
+</div>
+<div class="sect2">
+<h3 id="_dock">4.3. Dock</h3>
+<div class="paragraph"><p>Dock is another molecular docking
+<a href="http://dock.compbio.ucsf.edu/DOCK_6/dock6_manual.htm">program</a> used by many
+applications. The Swift source, configuration and application related inputs
+can be found in the <code>dock</code> directory. To run the Dock example:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>cd dock
+./runvesta.sh #run on vesta
+./runmira.sh #run on mira</code></pre>
+</div></div>
+</div>
+<div class="sect2">
+<h3 id="_gridpack">4.4. GridPack</h3>
+<div class="paragraph"><p>GridPack is a simulation package designed for powergrid design application.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_halo">4.5. HALO</h3>
+<div class="paragraph"><p>HALO is a astrophysics application.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_internals">5. Internals</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The key driver of the Swift sub-block jobs is a script called <code>bg.sh</code> that does the sub-block jobs calculations and othe chores for the users. The script looks as follows:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>#!/bin/bash
+
+set -x
+
+mname=$(hostname)
+
+# vesta and mira has different path than cetus
+if [[ $mname == *vesta* || $mname == *mira* ]]
+then
+    export PATH=/soft/cobalt/bgq_hardware_mapper:$PATH
+else
+    export PATH=/soft/cobalt/cetus/bgq_hardware_mapper:$PATH
+fi
+
+#export SUBBLOCK_SIZE=16
+
+# Prepare shape based on subblock size
+# provided by user in sites environment
+case "$SUBBLOCK_SIZE" in
+1) SHAPE="1x1x1x1x1"
+;;
+8) SHAPE="1x2x2x2x1"
+;;
+16) SHAPE="2x2x2x2x1"
+;;
+32) SHAPE="2x2x2x2x2"
+;;
+64) SHAPE="2x2x4x2x2"
+;;
+128) SHAPE="2x4x4x2x2"
+;;
+256) SHAPE="2x4x4x4x2"
+;;
+512) SHAPE="4x4x4x4x2"
+;;
+*) echo "SUBBLOCK_SIZE not set or incorrectly set: will not use subblock jobs"
+;;
+esac
+
+# If subblock size is provided, do subblock business
+if [ "$SUBBLOCK_SIZE"_ != "_" ]
+then
+    export SWIFT_SUBBLOCKS=$(get-corners.py "$COBALT_PARTNAME" $SHAPE)
+    export SWIFT_SUBBLOCK_ARRAY=($SWIFT_SUBBLOCKS)
+
+    #echo "$0": SWIFT_SUBBLOCKS="$SWIFT_SUBBLOCKS"
+
+    if [ "_$SWIFT_SUBBLOCKS" = _ ]; then
+      echo ERROR: "$0": SWIFT_SUBBLOCKS is null.
+      exit 1
+    fi
+
+    nsb=${#SWIFT_SUBBLOCK_ARRAY[@]}
+
+    CORNER=${SWIFT_SUBBLOCK_ARRAY[$SWIFT_JOB_SLOT]}
+
+    #Some logging
+    echo "$0": running BLOCK="$COBALT_PARTNAME" SLOT="$SWIFT_JOB_SLOT"
+    echo "$0": running cmd: "$0" args: "$@"
+    echo "$0": running runjob --strace none --block "$COBALT_PARTNAME" --corner "$CORNER" --shape "$SHAPE" -p 16 --np "$((16*$SUBBLOCK_SIZE))" : "$@"
+
+    #without timeout
+    #runjob --strace none --block "$COBALT_PARTNAME" --corner "$CORNER" --shape "$SHAPE" -p 16 --np "$((16*$SUBBLOCK_SIZE))" : "$@"
+    runjob --block "$COBALT_PARTNAME" --corner "$CORNER" --shape "$SHAPE" -p 16 --np "$((16*$SUBBLOCK_SIZE))" : "$@"
+
+    echo "Runjob finished."
+else
+    # run w/o subblocks if no subblock size provided
+    echo "Running in nonsubblock mode."
+    echo "$0": running runjob -p 16 --block $COBALT_PARTNAME : "$@"
+
+    #strace -o "$HOME/strace.runjob.out" runjob --strace none -p 16 --block $COBALT_PARTNAME : "$@"
+    runjob -p 16 --block $COBALT_PARTNAME : "$@"
+
+    echo "Finished Running in nonsubblock mode."
+fi
+exit 0</code></pre>
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_sub_block_limitations">6. Sub-block limitations</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>There are currently the following two limitations with sub-block jobs:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+The maximum size of the outer Cobalt job must not exceed 512 nodes, ie. half
+of a hardware rack.
+</p>
+</li>
+<li>
+<p>
+The successive subjobs must be submitted with a gap of at least 3 seconds in
+between. This means for a large number of shorter than 5 seconds jobs, the
+system will be underutilized. Consequently, subblocks are suitable for
+tasks which are more than a couple of minutes in duration.
+</p>
+</li>
+</ol></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_further_information">7. Further Information</h2>
+<div class="sectionbody">
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+More information about Swift can be found <a href="http://swift-lang.org/main">here</a>.
+</p>
+</li>
+<li>
+<p>
+More about ALCF can be found <a href="http://www.alcf.anl.gov">here</a>.
+</p>
+</li>
+<li>
+<p>
+More about IBM BlueGene sub-block jobs can be found <a href="http://www.alcf.anl.gov/files/ensemble_jobs_0.pdf">here</a> (warning: pdf).
+</p>
+</li>
+</ol></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated 2014-11-07 10:58:42 CST
+</div>
+</div>
+</body>
+</html>




More information about the Swift-commit mailing list