Skip to content

Commit

Permalink
Deploy preview for PR 1043 🛫
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasjucker committed Jan 31, 2025
1 parent 5b5529d commit f71ea9a
Show file tree
Hide file tree
Showing 94 changed files with 8,625 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pr-preview/pr-1043/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ff1b9c6d48b43fac1c2442d51b049419
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added pr-preview/pr-1043/.doctrees/QuickStart.doctree
Binary file not shown.
Binary file added pr-preview/pr-1043/.doctrees/SpackChoice.doctree
Binary file not shown.
Binary file not shown.
Binary file added pr-preview/pr-1043/.doctrees/Testing.doctree
Binary file not shown.
Binary file added pr-preview/pr-1043/.doctrees/environment.pickle
Binary file not shown.
Binary file added pr-preview/pr-1043/.doctrees/index.doctree
Binary file not shown.
261 changes: 261 additions & 0 deletions pr-preview/pr-1043/C2SMGuidelines.html

Large diffs are not rendered by default.

182 changes: 182 additions & 0 deletions pr-preview/pr-1043/CodeDevelopment.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@


<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Develop packages &mdash; C2SM Spack documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />


<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
<script src="_static/copybutton.js?v=a5fa425f"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Target Users of spack-c2sm" href="SpackChoice.html" />
<link rel="prev" title="Testing" href="Testing.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="index.html" class="icon icon-home">
C2SM Spack
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="QuickStart.html">Quick Start</a></li>
<li class="toctree-l1"><a class="reference internal" href="C2SMGuidelines.html">C2SM Guidelines for Spack</a></li>
<li class="toctree-l1"><a class="reference internal" href="InstanceManagement.html">How to manage your own Spack instance</a></li>
<li class="toctree-l1"><a class="reference internal" href="SpackCommands.html">Important Spack Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Testing.html">Testing</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Develop packages</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#environments-with-spack-develop">Environments with Spack develop</a></li>
<li class="toctree-l2"><a class="reference internal" href="#plain-dev-build">Plain dev-build</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="SpackChoice.html">Target Users of spack-c2sm</a></li>
<li class="toctree-l1"><a class="reference internal" href="SpackChoice.html#why-was-spack-chosen-by-meteoswiss">Why was Spack chosen by MeteoSwiss?</a></li>
</ul>

</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">C2SM Spack</a>
</nav>

<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Develop packages</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/CodeDevelopment.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<section id="develop-packages">
<h1>Develop packages<a class="headerlink" href="#develop-packages" title="Link to this heading"></a></h1>
<p>Spack offers several options for package development.
Depending on your workflow, one or the other option is preferred.</p>
<section id="environments-with-spack-develop">
<h2>Environments with Spack develop<a class="headerlink" href="#environments-with-spack-develop" title="Link to this heading"></a></h2>
<p>Environments sit in a folder with a name and are defined in a <code class="docutils literal notranslate"><span class="pre">spack.yaml</span></code> file.
For more information about environments in general, consider reading the
<a class="reference external" href="https://spack.readthedocs.io/en/latest/environments.html">official Spack docs</a>.</p>
<div class="literal-block-wrapper docutils container" id="id1">
<div class="code-block-caption"><span class="caption-text">Example environment for ICON</span><a class="headerlink" href="#id1" title="Link to this code"></a></div>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># This is a Spack Environment file.</span>
<span class="c1">#</span>
<span class="c1"># It describes a set of packages to be installed, along with</span>
<span class="c1"># configuration settings.</span>
<span class="nt">spack</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># add package specs to the `specs` list</span>
<span class="w"> </span><span class="nt">specs</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">icon@develop%nvhpc +ecrad +rte-rrtmgp +cuda</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">[email protected]%nvhpc</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">nvidia-blas%nvhpc</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">nvidia-lapack%nvhpc</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">[email protected]%gcc</span>
<span class="w"> </span><span class="nt">view</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">concretizer</span><span class="p">:</span>
<span class="w"> </span><span class="nt">unify</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">develop</span><span class="p">:</span>
<span class="w"> </span><span class="nt">icon</span><span class="p">:</span>
<span class="w"> </span><span class="nt">spec</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">icon@develop%nvhpc +ecrad +rte-rrtmgp +cuda</span>
<span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">../../../../</span>
</pre></div>
</div>
</div>
<p>The key part of the environments is the <code class="docutils literal notranslate"><span class="pre">develop</span></code> keyword.
This tells Spack to look for a certain spec in <code class="docutils literal notranslate"><span class="pre">path</span></code>.
It is possible to specify multiple packages under <code class="docutils literal notranslate"><span class="pre">develop</span></code>.</p>
<p>To activate a Spack environment, type</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>spack<span class="w"> </span>env<span class="w"> </span>activate<span class="w"> </span>&lt;path_to_folder_with_spack_yaml&gt;
</pre></div>
</div>
<p>To install the environment, type</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>spack<span class="w"> </span>install
</pre></div>
</div>
<p>To deactivate a Spack environment, type</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>spack<span class="w"> </span>env<span class="w"> </span>deactivate
</pre></div>
</div>
<p>Most of the Spack commands are sensitive to environments, see
<a class="reference external" href="https://spack.readthedocs.io/en/latest/environments.html#environment-sensitive-commands">Spack docs</a>.</p>
</section>
<section id="plain-dev-build">
<h2>Plain dev-build<a class="headerlink" href="#plain-dev-build" title="Link to this heading"></a></h2>
<p>This is the easiest way to build local sources.
Enter the root of your source repository and execute:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>spack<span class="w"> </span>dev-build<span class="w"> </span>--until<span class="w"> </span>build<span class="w"> </span>&lt;package&gt;<span class="w"> </span>@&lt;version&gt;
</pre></div>
</div>
<p>This will build the package as is. The downside of this approach is that
you need to go through all phases of a package build.</p>
</section>
</section>


</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Testing.html" class="btn btn-neutral float-left" title="Testing" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="SpackChoice.html" class="btn btn-neutral float-right" title="Target Users of spack-c2sm" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2020-2024, C2SM.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
Loading

0 comments on commit f71ea9a

Please sign in to comment.