Skip to content

Commit 1752dc7

Browse files
committed
Deployed 11e8925 with MkDocs version: 1.6.1
1 parent f6c5cc5 commit 1752dc7

5 files changed

Lines changed: 272 additions & 142 deletions

File tree

2025-LUST/2_Using/2_02_creating_easyconfig_files/index.html

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,15 @@
755755
</span>
756756
</a>
757757

758+
</li>
759+
760+
<li class="md-nav__item">
761+
<a href="#toolchain-options" class="md-nav__link">
762+
<span class="md-ellipsis">
763+
Toolchain options
764+
</span>
765+
</a>
766+
758767
</li>
759768

760769
<li class="md-nav__item">
@@ -4928,6 +4937,15 @@
49284937
</span>
49294938
</a>
49304939

4940+
</li>
4941+
4942+
<li class="md-nav__item">
4943+
<a href="#toolchain-options" class="md-nav__link">
4944+
<span class="md-ellipsis">
4945+
Toolchain options
4946+
</span>
4947+
</a>
4948+
49314949
</li>
49324950

49334951
<li class="md-nav__item">
@@ -5312,6 +5330,53 @@ <h4 id="easyblock">Easyblock<a class="headerlink" href="#easyblock" title="Perma
53125330
tar_config_opts*<span class="w"> </span>Override<span class="w"> </span>tar<span class="w"> </span>settings<span class="w"> </span>as<span class="w"> </span>determined<span class="w"> </span>by<span class="w"> </span>configure.<span class="w"> </span><span class="o">[</span>default:<span class="w"> </span>False<span class="o">]</span>
53135331
test_cmd*<span class="w"> </span>Test<span class="w"> </span><span class="nb">command</span><span class="w"> </span>to<span class="w"> </span>use<span class="w"> </span><span class="o">(</span><span class="s1">&#39;runtest&#39;</span><span class="w"> </span>value<span class="w"> </span>is<span class="w"> </span>appended,<span class="w"> </span>default:<span class="w"> </span><span class="s1">&#39;make&#39;</span><span class="o">)</span><span class="w"> </span><span class="o">[</span>default:<span class="w"> </span>None<span class="o">]</span>
53145332
</code></pre></div>
5333+
<h4 id="toolchain-options">Toolchain options<a class="headerlink" href="#toolchain-options" title="Permanent link">&para;</a></h4>
5334+
<p>Many toolchain options can be set through <code>toolchainopts</code>, e.g.,</p>
5335+
<div class="highlight"><pre><span></span><code>toolchainopts = {&#39;usempi&#39;: False, &#39;openmp&#39;: False, &#39;extra_cxxflags&#39;: &#39;-std=c++11&#39;}
5336+
</code></pre></div>
5337+
<p>The range of options depends on the toolchain. For the toolchains on LUMI, more information
5338+
can be found in the subsections of "Toolchain documentation" of the
5339+
<a href="https://lumi-supercomputer.github.io/LUMI-SoftwareStack/">"Docs for the LUMI software stack</a>.
5340+
For regular EasyBuild toolchains, they can be found in the
5341+
<a href="https://docs.easybuild.io/version-specific/toolchain-opts/">"Available toolchain options" page in the EasyBuild docs</a>.</p>
5342+
<p>Some common options are:</p>
5343+
<ul>
5344+
<li>
5345+
<p><code>usempi</code>: When set to <code>True</code>, environment variables for regular compilers such as CC etc. will
5346+
point to the MPI wrappers. This setting has currently no effect on LUMI as there are no separate
5347+
wrappers when using the Cray wrappers.</p>
5348+
<p>We could consider unloading the <code>cray-mpich</code> module though if the value is set explicitly to <code>False</code>.</p>
5349+
</li>
5350+
<li>
5351+
<p><code>openmp</code>: Enable OpenMP. When set to <code>True</code>, this option will make sure that the option to enable OpenMP
5352+
is added to <code>CFLAGS</code> and other environment variables that set compiler flags.</p>
5353+
<p>EasyBuild currently cannot add this to <code>LDFLAGS</code> which may be an issue when linking as whether or not
5354+
<code>-fopenmp</code> is used at link time, determines if the single-threaded or multithreaded version of some
5355+
libraries will be used (and in particular LibSci). (TODO: This may have changed in some very recent
5356+
versions of EasyBuild.)</p>
5357+
</li>
5358+
<li>
5359+
<p><code>pic</code>: When set to <code>True</code>, position-independent code will be enabled. Rarely really needed as configure
5360+
scripts usually set this automatically when creating shared libraries.</p>
5361+
</li>
5362+
<li>
5363+
<p><code>cstd</code>: Set the C/C++ standard version. One of the least useful options as it does not distinguish between
5364+
C and C++, causing issues when packages are installed that use both C and C++.</p>
5365+
</li>
5366+
<li>
5367+
<p><code>verbose</code>: Sets a compiler flag that may generate more verbose output.</p>
5368+
</li>
5369+
<li>
5370+
<p><code>extra_cflags</code>, <code>extra_cxxflags</code>, <code>extra_f90flags</code>, <code>extra_fcflags</code>, <code>extra_fflags</code>: Add extra compiler
5371+
flags to the corresponding environment variables.</p>
5372+
</li>
5373+
</ul>
5374+
<p>There are also flags that influence the level of compiler optimisation and the floating point behaviour of
5375+
the compiler. They are confusing as there are separate settings of which only one of each type should be used,
5376+
and floating point computing flags are not supported by all LUMI toolchains at the moment.</p>
5377+
<p>It is possible to request an overview of all options for a particular toolchain using</p>
5378+
<div class="highlight"><pre><span></span><code>eb --avail-toolchain-opts &lt;tcname&gt;
5379+
</code></pre></div>
53155380
<h4 id="sources-patches-and-checksums">Sources, patches, and checksums<a class="headerlink" href="#sources-patches-and-checksums" title="Permanent link">&para;</a></h4>
53165381
<p>In most easyconfig files you will see that a list of source files is specified via the <code>sources</code>
53175382
easyconfig parameter, usually combined
@@ -5998,7 +6063,7 @@ <h2 id="exercises">Exercises<a class="headerlink" href="#exercises" title="Perma
59986063
<span class="md-icon" title="Last update">
59996064
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
60006065
</span>
6001-
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="May 6, 2025 15:20:25">May 6, 2025</span>
6066+
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="May 26, 2025 11:32:05">May 26, 2025</span>
60026067
</span>
60036068

60046069

2025-LUST/4_EasyBuild_on_LUMI/4_02_tips_and_tricks/index.html

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,15 @@
10271027
</span>
10281028
</a>
10291029

1030+
</li>
1031+
1032+
<li class="md-nav__item">
1033+
<a href="#adding-license-information" class="md-nav__link">
1034+
<span class="md-ellipsis">
1035+
Adding license information
1036+
</span>
1037+
</a>
1038+
10301039
</li>
10311040

10321041
<li class="md-nav__item">
@@ -4626,6 +4635,15 @@
46264635
</span>
46274636
</a>
46284637

4638+
</li>
4639+
4640+
<li class="md-nav__item">
4641+
<a href="#adding-license-information" class="md-nav__link">
4642+
<span class="md-ellipsis">
4643+
Adding license information
4644+
</span>
4645+
</a>
4646+
46294647
</li>
46304648

46314649
<li class="md-nav__item">
@@ -4677,13 +4695,60 @@ <h2 id="long-lists-of-elements-for-preconfigopts-or-options-for-configopts">Long
46774695
elegant, makes it very easy to add additional flags or commands, and is less error-prone.
46784696
There is also plenty of space left on each line to explain why an option is used or what it
46794697
means, to make the job easier for others who may want to update or customise this EasyConfig.</p>
4698+
<h2 id="adding-license-information">Adding license information<a class="headerlink" href="#adding-license-information" title="Permanent link">&para;</a></h2>
4699+
<p>EasyBuild has an EasyConfig parameter for that but it is rarely used in the regular EasyBuild repositories:</p>
4700+
<div class="highlight"><pre><span></span><code>software_license_urls = [
4701+
f&#39;https://bitbucket.org/multicoreware/x265_git/src/{version}/COPYING&#39;,
4702+
]
4703+
</code></pre></div>
4704+
<p>One issue is that currently in our module scheme, it does nothing as the information is not being added to
4705+
the module.</p>
4706+
<p>We recently also started copying license information, etc., found in the sources of a package into
4707+
<code>%(installdir)s/share/licenses/&lt;name_of_package&gt;</code> where for a bundle we use the name of each of the
4708+
packages in the bundle for <code>&lt;name_of_package&gt;</code>. This is often easily done in <code>postinstallcmds</code> though
4709+
for Bundle components it is easier to do so via <code>installopts</code> (adding the commands with the <code>&amp;&amp;</code> trick)
4710+
as there are no separate <code>postinstallcmds</code> for each Bundle component (at least, last time I tested those
4711+
did not work properly).</p>
4712+
<p>Some code fragments:</p>
4713+
<ul>
4714+
<li>
4715+
<p>For software built with the <code>ConfigureMake</code> EasyBlock: As the build commands run in the sources directly,
4716+
this will often work (but you may need to adapt the name of the files to copy):</p>
4717+
<div class="highlight"><pre><span></span><code>postinstallcmds = [
4718+
&#39;mkdir -p %(installdir)s/share/licenses/%(name)s&#39;,
4719+
&#39;cp COPYING %(installdir)s/share/licenses/%(name)s&#39;,
4720+
]
4721+
</code></pre></div>
4722+
</li>
4723+
<li>
4724+
<p>With the <code>CMakeMake</code> EasyBlock, the build process runs in a separate directory, so you'll have to move
4725+
to sources directory to copy:</p>
4726+
<div class="highlight"><pre><span></span><code>postinstallcmds = [
4727+
&#39;mkdir -p %(installdir)s/share/licenses/%(name)s&#39;,
4728+
&#39;cd ../%(namelower)s-%(version)s &amp;&amp; cp AUTHORS CHANGELOG.md LICENSE.txt README.md README.SZIP THANKS %(installdir)s/share/licenses/%(name)s&#39;,
4729+
]
4730+
</code></pre></div>
4731+
<p>The <code>%(namelower)s-%(version)s</code> does not work for all software, you may have to check! E.g., you can just start EasyBuild but
4732+
stop after the Prepare step with <code>--stop prepare</code> to inspect the sources.</p>
4733+
</li>
4734+
<li>
4735+
<p>The next one has worked for some <code>MesonNinja</code> software:</p>
4736+
<div class="highlight"><pre><span></span><code>postinstallcmds = [
4737+
&#39;mkdir -p %(installdir)s/share/licenses/%(name)s&#39;,
4738+
&#39;cd %(start_dir)s &amp;&amp; cp AUTHORS CHANGELOG.md LICENSE.txt README.md README.SZIP THANKS %(installdir)s/share/licenses/%(name)s&#39;,
4739+
]
4740+
</code></pre></div>
4741+
</li>
4742+
</ul>
46804743
<h2 id="more-to-follow">More to follow....<a class="headerlink" href="#more-to-follow" title="Permanent link">&para;</a></h2>
46814744
<ul>
46824745
<li>
46834746
<p>Static and shared libraries in CMakeMake packages (and using lib instead of lib64)</p>
46844747
</li>
46854748
<li>
4686-
<p>Copying the license information</p>
4749+
<p>Fix Python shebang lines: EasyConfig parameter <code>fix_python_shebang_for</code>. See the EasyConfigs for GLib.</p>
4750+
<p>NOTE: There is currently only python3 on LUMI so this does not work as it should... So the GLib EasyConfigs for 24.03
4751+
are wrong and will need a different trick.</p>
46874752
</li>
46884753
</ul>
46894754
<p><em><a href="../../5_00_additional_reading/">[Next: Additional reading]</a></em></p>
@@ -4707,7 +4772,7 @@ <h2 id="more-to-follow">More to follow....<a class="headerlink" href="#more-to-f
47074772
<span class="md-icon" title="Last update">
47084773
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
47094774
</span>
4710-
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="May 23, 2025 15:04:36">May 23, 2025</span>
4775+
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="May 26, 2025 12:10:59">May 26, 2025</span>
47114776
</span>
47124777

47134778

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)