Skip to content

Commit 0126d2e

Browse files
committed
Re-build examples
1 parent 7fc8200 commit 0126d2e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/week-08-lab.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3239,11 +3239,12 @@ <h2 class="anchored" data-anchor-id="ex-5-rcpparmadillo-openmp">Ex 5: RcppArmadi
32393239
</div>
32403240
</div>
32413241
<p>There’s more to <code>OpenMP</code>. I invite you to go over a set of experiments where I compare different strategies of implementing the same function here: <a href="https://github.com/UofUEpiBio/r-parallel-benchmark">https://github.com/UofUEpiBio/r-parallel-benchmark</a></p>
3242+
<p>Before continuing to the next section. Try to apply what we just learned to include OpenMP the function <code>K4B_v1</code>.</p>
32423243
</section>
32433244
</section>
32443245
<section id="submitting-jobs-to-slurm" class="level1">
32453246
<h1>Submitting jobs to Slurm</h1>
3246-
<p>We need to execute the following Rscript in CHPC:</p>
3247+
<p>We need to execute the following Rscript in CHPC<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>:</p>
32473248
<div class="sourceCode" id="cb12"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(Rcpp)</span>
32483249
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a></span>
32493250
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Compiling</span></span>
@@ -3294,6 +3295,7 @@ <h1>Submitting jobs to Slurm</h1>
32943295
<p>Two ways of doing it: Single or multiple jobs (using job arrays.) To submit the job, I have created two bash (slurm) scripts we can submit with the <code>sbatch</code> function. Most of the time, we will be submitting single jobs (time consuming operations, large memory, etc.) Job arrays are useful when the entire script can be parallelized.</p>
32953296
<section id="single-job" class="level2">
32963297
<h2 class="anchored" data-anchor-id="single-job">Single job</h2>
3298+
<p>The <a href="week-08/distance-job.slurm"><code>distance-job.slurm</code></a> contains the following lines:</p>
32973299
<div class="sourceCode" id="cb13"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/bin/sh</span></span>
32983300
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a><span class="co">#SBATCH --job-name=rcpp-openmp-array</span></span>
32993301
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a><span class="co">#SBATCH --account=vegayon-np</span></span>
@@ -3311,6 +3313,7 @@ <h2 class="anchored" data-anchor-id="single-job">Single job</h2>
33113313
</section>
33123314
<section id="job-array" class="level2">
33133315
<h2 class="anchored" data-anchor-id="job-array">Job array</h2>
3316+
<p>The <a href="week-08/distance-job.slurm"><code>distance-job-array.slurm</code></a> contains the following lines:</p>
33143317
<div class="sourceCode" id="cb14"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/bin/sh</span></span>
33153318
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a><span class="co">#SBATCH --job-name=rcpp-openmp-array</span></span>
33163319
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a><span class="co">#SBATCH --account=vegayon-np</span></span>
@@ -3329,7 +3332,13 @@ <h2 class="anchored" data-anchor-id="job-array">Job array</h2>
33293332
</section>
33303333
</section>
33313334

3332-
</main>
3335+
3336+
<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document" role="doc-endnotes"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>
3337+
3338+
<ol>
3339+
<li id="fn1"><p>The <code>distance.R</code> R script can be downloaded <a href="week-08/distance.R">here</a>.<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
3340+
</ol>
3341+
</section></div></main>
33333342
<!-- /main column -->
33343343
<script id="quarto-html-after-body" type="application/javascript">
33353344
window.document.addEventListener("DOMContentLoaded", function (event) {

0 commit comments

Comments
 (0)