Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Changelog for EasyBuild documentation
-------------------------------------

* **release 20151108.01** (`November 8th 2015`):

* document (experimental) support for using minimal toolchains (see :ref:`minimal_toolchains`)

* **release 20151028.01** (`October 28th 2015`): document extended dry run mechanism (see :ref:`extended_dry_run`)
* **release 20151021.01** (`October 21st 2015`):

Expand Down
1 change: 1 addition & 0 deletions docs/Experimental_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Currently enabled experimental features include:
* Cray support (see https://github.com/hpcugent/easybuild/wiki/EasyBuild-on-Cray)
* :ref:`packaging_support`
* support for easyconfig files in YAML syntax (see :ref:`easyconfig_yeb_format`)
* support for using minimal toolchains for dependencies
90 changes: 90 additions & 0 deletions docs/Manipulating_dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Manipulating dependencies
A couple of different ways are available to manipulate the list of dependencies that are specified for the software
packages being installed.

.. contents::
:depth: 3
:backlinks: none

.. _filter_deps:

Filtering out dependencies using ``--filter-deps``
Expand Down Expand Up @@ -56,6 +60,7 @@ For example (note the preceding '``.``' in the last part of the module names for
* [ ] $CFGS/s/Szip/Szip-2.1-intel-2015a.eb (module: Szip/.2.1-intel-2015a)
* [ ] $CFGS/h/HDF5/HDF5-1.8.13-intel-2015a.eb (module: HDF5/1.8.13-intel-2015a)


.. note::
Using Lmod (version >= 5.7.5), hidden modules can be made visible in the output of '``module avail``' using the
``--show-hidden`` option.
Expand All @@ -73,3 +78,88 @@ For example (note the preceding '``.``' in the last part of the module names for

Use "module spider" to find all possible modules.
Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".


.. _minimal_toolchains:

Using minimal toolchains for dependencies
-----------------------------------------

.. note:: This is an **experimental** feature, see :ref:`experimental_features`.

By default, EasyBuild will try to resolve dependencies using the same toolchain as the one that is used for the
software being installed, unless a specific toolchain is specified for the dependency itself
(see :ref:`dependency_specs`).

Using the ``--minimal-toolchains`` configuration option, you can instruct EasyBuild to consider subtoolchains
as well for dependencies. This can be useful to refrain from having to frequently hardcode specific toolchains in order
to avoid having the same dependency version installed with multiple toolchains that are compatible with each other.
Although hardcoding toolchain for dependencies will work fine, it severly limits the power of other EasyBuild features,
like ``--try-toolchain`` for example.

When instructed to use minimal toolchains, EasyBuild will check whether an easyconfig file is available (in the robot
search path, see :ref:`robot_search_path`) for that dependency using the different subtoolchains of the toolchain
specified for the 'parent' software. Subtoolchains are considered 'bottom-up', i.e. starting with the most minimal
subtoolchain (typically a compiler-only toolchain), and then climbing up towards the toolchain that is specified for
the software being installed.

Note that if a specific toolchain is specified for a particular dependency, EasyBuild will stick to using it, even
when instructed to use minimal toolchains.

.. _minimal_toolchains_dummy:

Considering ``dummy`` as minimal toolchain
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The :ref:`dummy_toolchain` is only considered as the most minimal subtoolchain if the
``--add-dummy-to-minimal-toolchains`` configuration option is enabled.
By default, this configuration option is *disabled*.

.. _minimal_toolchains_existing_modules:

Taking existing modules into account
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can instruct EasyBuild to take existing modules into account when determining which subtoolchain should be used
for each of the dependencies, using the ``--use-existing-modules`` configuration option.

By default existing modules are ignored, meaning that the EasyBuild dependency resolution mechanism will pick a
minimal toolchain for each dependency solely based on the available easyconfig files (if the ``--minimal-toolchains``
configuration option is enabled, that is).

With ``--use-existing-modules`` enabled, EasyBuild will first check whether modules exist for the dependencies that were
built with any of the subtoolchains. If so, the module using the most minimal toolchain will determine the toolchain
being used. If not, the toolchain to use will be determined based on the available easyconfig files.

.. _minimal_toolchains_example:

Example
~~~~~~~

Consider the following (partial) easyconfig file for Python v2.7.9 with the ``foss/2015b`` toolchain::

name = 'Python'
version = '2.7.9'

toolchain = {'name': 'foss', 'version': '2015b'}

dependencies = [
('zlib', '1.2.8'),
]

For the ``foss/2015b`` toolchain, EasyBuild will also consider ``GCC/4.9.3`` and ``gompi/2015b`` subtoolchains
as potential minimal toolchains (in that order) when determining the toolchain to use for dependencies, if the
``--minimal-toolchains`` configuration option is enabled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably restructure this sentence a little as follows:

When the ``--minimal-toolchains`` configuration option is enabled, EasyBuild will also consider the subtoolchains ``GCC/4.9.3`` and ``gompi/2015b`` of ``foss/2015b`` toolchain (in that order) as potential minimal toolchains when determining the toolchain to use for dependencies. 

So, for the zlib v1.2.8 dependency included in the example above, the following scenarios are possible:

* without the use of ``--minimal-toolchains``, EasyBuild will only consider the ``foss/2015b`` toolchain for zlib,
even if other zlib easyconfigs using a compatible toolchain are available
* if (only) ``--minimal-toolchains`` is enabled, EasyBuild will search for an easyconfig file for
zlib v1.2.8 using the ``GCC/4.9.3`` toolchain; if no such easyconfig file is found, it will continue searching
using the ``gompi/2015b`` toolchain, and finally the ``foss/2015b`` toolchain
* if ``--add-dummy-to-minimal-toolchains`` is also enabled, EasyBuild will try locating an easyconfig file for
zlib v1.2.8 that uses the ``dummy`` toolchain prior to consider the ``GCC/4.9.3`` toolchain
* additionally, with ``--use-existing-modules`` enabled, EasyBuild will first check whether a ``zlib`` module for
version 1.2.8 built with the (sub)toolchains being considered exists; if not, it will search for an easyconfig file
for zlib as outlined above
10 changes: 8 additions & 2 deletions docs/Writing_easyconfig_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,14 @@ For each of the specified (build) dependencies, the corresponding module will be
defined by EasyBuild. For the *runtime* dependencies, ``module load`` statements will be included in the generated
module file.

.. note:: By default, EasyBuild will try to resolve dependencies using the same toolchain as specified for the software being installed.
A different toolchain can be specified on a per-dependency level (cfr. the ``CMake`` build dependency in the example above).
.. note:: By default, EasyBuild will try to resolve dependencies using the same toolchain as specified for the
software being installed.

A different toolchain can be specified on a per-dependency level (cfr. the ``CMake`` build dependency in the
example above).

Alternatively, you can instruct EasyBuild to use the most minimal (sub)toolchain when resolving dependencies,
see :ref:`minimal_toolchains`.

Loading of modules for dependencies with a ``dummy`` toolchain
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
# other places throughout the built documents.
#
# The short X.Y version.
version = '2.3.0' # this is meant to reference the version of EasyBuild
version = '2.4.0dev' # this is meant to reference the version of EasyBuild
# The full version, including alpha/beta/rc tags.
release = '20151028.01' # this is meant to reference the version of the documentation itself
release = '20151108.01' # this is meant to reference the version of the documentation itself

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down