@@ -6,6 +6,10 @@ Manipulating dependencies
66A couple of different ways are available to manipulate the list of dependencies that are specified for the software
77packages being installed.
88
9+ .. contents ::
10+ :depth: 3
11+ :backlinks: none
12+
913.. _filter_deps :
1014
1115Filtering out dependencies using ``--filter-deps ``
@@ -56,6 +60,7 @@ For example (note the preceding '``.``' in the last part of the module names for
5660 * [ ] $CFGS/s/Szip/Szip-2.1-intel-2015a.eb (module: Szip/.2.1-intel-2015a)
5761 * [ ] $CFGS/h/HDF5/HDF5-1.8.13-intel-2015a.eb (module: HDF5/1.8.13-intel-2015a)
5862
63+
5964.. note ::
6065 Using Lmod (version >= 5.7.5), hidden modules can be made visible in the output of '``module avail ``' using the
6166 ``--show-hidden `` option.
@@ -73,3 +78,88 @@ For example (note the preceding '``.``' in the last part of the module names for
7378
7479 Use "module spider" to find all possible modules.
7580 Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".
81+
82+
83+ .. _minimal_toolchains :
84+
85+ Using minimal toolchains for dependencies
86+ -----------------------------------------
87+
88+ .. note :: This is an **experimental** feature, see :ref:`experimental_features`.
89+
90+ By default, EasyBuild will try to resolve dependencies using the same toolchain as the one that is used for the
91+ software being installed, unless a specific toolchain is specified for the dependency itself
92+ (see :ref: `dependency_specs `).
93+
94+ Using the ``--minimal-toolchains `` configuration option, you can instruct EasyBuild to consider subtoolchains
95+ as well for dependencies. This can be useful to refrain from having to frequently hardcode specific toolchains in order
96+ to avoid having the same dependency version installed with multiple toolchains that are compatible with each other.
97+ Although hardcoding toolchain for dependencies will work fine, it severly limits the power of other EasyBuild features,
98+ like ``--try-toolchain `` for example.
99+
100+ When instructed to use minimal toolchains, EasyBuild will check whether an easyconfig file is available (in the robot
101+ search path, see :ref: `robot_search_path `) for that dependency using the different subtoolchains of the toolchain
102+ specified for the 'parent' software. Subtoolchains are considered 'bottom-up', i.e. starting with the most minimal
103+ subtoolchain (typically a compiler-only toolchain), and then climbing up towards the toolchain that is specified for
104+ the software being installed.
105+
106+ Note that if a specific toolchain is specified for a particular dependency, EasyBuild will stick to using it, even
107+ when instructed to use minimal toolchains.
108+
109+ .. _minimal_toolchains_dummy :
110+
111+ Considering ``dummy `` as minimal toolchain
112+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113+
114+ The :ref: `dummy_toolchain ` is only considered as the most minimal subtoolchain if the
115+ ``--add-dummy-to-minimal-toolchains `` configuration option is enabled.
116+ By default, this configuration option is *disabled *.
117+
118+ .. _minimal_toolchains_existing_modules :
119+
120+ Taking existing modules into account
121+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122+
123+ You can instruct EasyBuild to take existing modules into account when determining which subtoolchain should be used
124+ for each of the dependencies, using the ``--use-existing-modules `` configuration option.
125+
126+ By default existing modules are ignored, meaning that the EasyBuild dependency resolution mechanism will pick a
127+ minimal toolchain for each dependency solely based on the available easyconfig files (if the ``--minimal-toolchains ``
128+ configuration option is enabled, that is).
129+
130+ With ``--use-existing-modules `` enabled, EasyBuild will first check whether modules exist for the dependencies that were
131+ built with any of the subtoolchains. If so, the module using the most minimal toolchain will determine the toolchain
132+ being used. If not, the toolchain to use will be determined based on the available easyconfig files.
133+
134+ .. _minimal_toolchains_example :
135+
136+ Example
137+ ~~~~~~~
138+
139+ Consider the following (partial) easyconfig file for Python v2.7.9 with the ``foss/2015b `` toolchain::
140+
141+ name = 'Python'
142+ version = '2.7.9'
143+
144+ toolchain = {'name': 'foss', 'version': '2015b'}
145+
146+ dependencies = [
147+ ('zlib', '1.2.8'),
148+ ]
149+
150+ When the ``--minimal-toolchains `` configuration option is enabled, EasyBuild will also consider the subtoolchains
151+ ``GCC/4.9.3 `` and ``gompi/2015b `` of the ``foss/2015b `` toolchain (in that order) as potential minimal toolchains
152+ when determining the toolchain to use for dependencies.
153+
154+ So, for the zlib v1.2.8 dependency included in the example above, the following scenarios are possible:
155+
156+ * without the use of ``--minimal-toolchains ``, EasyBuild will only consider the ``foss/2015b `` toolchain for zlib,
157+ even if other zlib easyconfigs using a compatible toolchain are available
158+ * if (only) ``--minimal-toolchains `` is enabled, EasyBuild will search for an easyconfig file for
159+ zlib v1.2.8 using the ``GCC/4.9.3 `` toolchain; if no such easyconfig file is found, it will continue searching
160+ using the ``gompi/2015b `` toolchain, and finally the ``foss/2015b `` toolchain
161+ * if ``--add-dummy-to-minimal-toolchains `` is also enabled, EasyBuild will try locating an easyconfig file for
162+ zlib v1.2.8 that uses the ``dummy `` toolchain prior to consider the ``GCC/4.9.3 `` toolchain
163+ * additionally, with ``--use-existing-modules `` enabled, EasyBuild will first check whether a ``zlib `` module for
164+ version 1.2.8 built with the (sub)toolchains being considered exists; if not, it will search for an easyconfig file
165+ for zlib as outlined above
0 commit comments