|
1 |
| -.. _installing_extensions_in_parallel: |
| 1 | +# Installing extensions in parallel *(experimental!)* {: #installing_extensions_in_parallel } |
2 | 2 |
|
3 |
| -Installing extensions in parallel (experimental!) |
4 |
| -================================================= |
| 3 | +Since EasyBuild v4.5.0 (initial) support is available for installing |
| 4 | +extensions in parallel, that is to run the installation command for |
| 5 | +multiple extensions that are ready to install at the same time in the |
| 6 | +background, to exploit the availability of multiple cores. |
5 | 7 |
|
6 |
| -Since EasyBuild v4.5.0 (initial) support is available for installing extensions in parallel, |
7 |
| -that is to run the installation command for multiple extensions that are ready to install at the same time |
8 |
| -in the background, to exploit the availability of multiple cores. |
| 8 | +**Note: this is an** |
| 9 | +[experimental feature][experimental_features]. **Some of the mentioned functionality may be subject to |
| 10 | +change or be prone to errors.** |
9 | 11 |
|
10 |
| -**Note: this is an** :ref:`experimental feature <experimental_features>`. |
11 |
| -**Some of the mentioned functionality may be subject to change or be prone to errors.** |
| 12 | +## Configuration {: #installing_extensions_in_parallel_configuration } |
12 | 13 |
|
13 |
| -.. contents:: |
14 |
| - :depth: 3 |
15 |
| - :backlinks: none |
| 14 | +To let EasyBuild install extensions in parallel, the |
| 15 | +`parallel-extensions-install` configuration option must be enabled. |
16 | 16 |
|
17 |
| -.. _installing_extensions_in_parallel_configuration: |
| 17 | +In addition, since the support for installing extensions in parallel is |
| 18 | +an experimental feature, the `experimental` configuration option must be |
| 19 | +also be enabled (see also [Experimental features][experimental_features]). |
18 | 20 |
|
19 |
| -Configuration |
20 |
| -------------- |
| 21 | +How many extension installations should be started (at maximum) at the |
| 22 | +same time is controlled by the `parallel` configuration option. |
21 | 23 |
|
22 |
| -To let EasyBuild install extensions in parallel, the ``parallel-extensions-install`` configuration option must be |
23 |
| -enabled. |
| 24 | +## Requirements {: #installing_extensions_in_parallel_requirements } |
24 | 25 |
|
25 |
| -In addition, since the support for installing extensions in parallel is an experimental feature, the ``experimental`` |
26 |
| -configuration option must be also be enabled (see also :ref:`experimental_features`). |
| 26 | +For EasyBuild to be able to install a list of extensions in parallel, |
| 27 | +two requirements must be met: |
27 | 28 |
|
28 |
| -How many extension installations should be started (at maximum) at the same time is controlled by |
29 |
| -the ``parallel`` configuration option. |
| 29 | +- The easyblock(s) that are used for installing the extensions must |
| 30 | + have support for determining which installed extensions are required |
| 31 | + to fulfil the dependencies for a particular extension. This is done |
| 32 | + via the `required_deps` property method. |
| 33 | +- EasyBuild must be able to start a single shell command |
| 34 | + (asynchronously, so it runs in the background) to perform the |
| 35 | + installation of the extension via the `run_async` method, and check |
| 36 | + whether the command has completed via the `async_cmd_check` method. |
30 | 37 |
|
| 38 | +For an example of how `required_deps`, `run_async`, and |
| 39 | +`async_cmd_check` can be implemented, see the |
| 40 | +[RPackage](https://github.com/easybuilders/easybuild-easyblocks/blob/main/easybuild/easyblocks/generic/rpackage.py) |
| 41 | +easyblock. |
31 | 42 |
|
32 |
| -.. _installing_extensions_in_parallel_requirements: |
33 |
| - |
34 |
| -Requirements |
35 |
| ------------- |
36 |
| - |
37 |
| -For EasyBuild to be able to install a list of extensions in parallel, two requirements must be met: |
38 |
| - |
39 |
| -* The easyblock(s) that are used for installing the extensions must have support for determining |
40 |
| - which installed extensions are required to fulfill the dependencies for a particular extension. |
41 |
| - This is done via the ``required_deps`` property method. |
42 |
| -* EasyBuild must be able to start a single shell command (asynchronously, so it runs in the background) |
43 |
| - to perform the installation of the extension via the ``run_async`` method, |
44 |
| - and check whether the command has completed via the ``async_cmd_check`` method. |
45 |
| - |
46 |
| -For an example of how ``required_deps``, ``run_async``, and ``async_cmd_check`` can be implemented, |
47 |
| -see the `RPackage |
48 |
| -<https://github.com/easybuilders/easybuild-easyblocks/blob/main/easybuild/easyblocks/generic/rpackage.py>`_ easyblock. |
49 |
| - |
50 |
| -.. _installing_extensions_in_parallel_caveats_known_issues: |
51 |
| - |
52 |
| -Caveats and Known issues |
53 |
| ------------------------- |
| 43 | +## Caveats and Known issues {: #installing_extensions_in_parallel_caveats_known_issues } |
54 | 44 |
|
55 | 45 | *(last update: EasyBuild v4.5.0)*
|
56 | 46 |
|
57 |
| -There are a couple of caveats and known issues with installing extensions in parallel, |
58 |
| -which we hope to resolve in future EasyBuild releases. |
| 47 | +There are a couple of caveats and known issues with installing |
| 48 | +extensions in parallel, which we hope to resolve in future EasyBuild |
| 49 | +releases. |
59 | 50 |
|
60 |
| -This is also why the support for installing extensions in parallel is currently marked as an experimental feature. |
| 51 | +This is also why the support for installing extensions in parallel is |
| 52 | +currently marked as an experimental feature. |
61 | 53 |
|
62 |
| -.. _installing_extensions_in_parallel_caveats_known_issues_only_r: |
| 54 | +### Only works for R extensions {: #installing_extensions_in_parallel_caveats_known_issues_only_r } |
63 | 55 |
|
64 |
| -Only works for R extensions |
65 |
| -~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 56 | +The support for installing extensions in parallel currently only works |
| 57 | +for R extensions, since only the `RPackage` easyblock (which is used to |
| 58 | +install R packages as extensions) implements the necessary methods (see |
| 59 | +[Requirements][installing_extensions_in_parallel_requirements]). |
66 | 60 |
|
67 |
| -The support for installing extensions in parallel currently only works for R extensions, |
68 |
| -since only the ``RPackage`` easyblock (which is used to install R packages as extensions) implements |
69 |
| -the necessary methods (see :ref:`installing_extensions_in_parallel_requirements`). |
| 61 | +Supporting other types of extensions (Python, Perl, etc.) requires that |
| 62 | +the corresponding easyblocks that are used to install those extensions |
| 63 | +(like `PythonPackage`, `PerlModule`) are enhanced to support determining |
| 64 | +required dependencies and starting the installation command |
| 65 | +asynchronously. |
70 | 66 |
|
71 |
| -Supporting other types of extensions (Python, Perl, etc.) requires that the corresponding easyblocks that |
72 |
| -are used to install those extensions (like ``PythonPackage``, ``PerlModule``) are enhanced to support determining |
73 |
| -required dependencies and starting the installation command asynchronously. |
| 67 | +### List of extensions must be self-contained {: #installing_extensions_in_parallel_caveats_known_issues_exts_list } |
74 | 68 |
|
75 |
| -.. _installing_extensions_in_parallel_caveats_known_issues_exts_list: |
76 |
| -
|
77 |
| -List of extensions must be self-contained |
78 |
| -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
79 |
| -
|
80 |
| -The EasyBuild framework currently enforces that all required dependencies for a particular extension |
81 |
| -are included in the list of extensions that is being installed (specified via the ``exts_list`` easyconfig |
82 |
| -parameter). Extensions provided by dependencies are not taken into account (yet). |
| 69 | +The EasyBuild framework currently enforces that all required |
| 70 | +dependencies for a particular extension are included in the list of |
| 71 | +extensions that is being installed (specified via the `exts_list` |
| 72 | +easyconfig parameter). Extensions provided by dependencies are not taken |
| 73 | +into account (yet). |
83 | 74 |
|
84 | 75 | As a result, trying to install an
|
85 |
| -`R-bundle-Bioconductor <https://github.com/easybuilders/easybuild-easyconfigs/tree/main/easybuild/easyconfigs/r/R-bundle-Bioconductor>`_ |
86 |
| -easyconfig with ``parallel-extensions-install`` enabled |
87 |
| -will result in an error reporting missing required dependencies. |
88 |
| -
|
89 |
| -
|
90 |
| -.. _installing_extensions_in_parallel_caveats_known_issues_skip: |
91 |
| -
|
92 |
| -Skipping of installed extensions is still done sequentially |
93 |
| -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
94 |
| -
|
95 |
| -Checking which extensions are already installed for which the installation can be skipped |
96 |
| -when ``--skip`` (see :ref:`partial_installation_skip`) is being used is still done sequentially. |
| 76 | +[R-bundle-Bioconductor](https://github.com/easybuilders/easybuild-easyconfigs/tree/main/easybuild/easyconfigs/r/R-bundle-Bioconductor) |
| 77 | +easyconfig with `parallel-extensions-install` enabled will result in an |
| 78 | +error reporting missing required dependencies. |
97 | 79 |
|
98 |
| -Additional work is needed to also run these checks in parallel across the cores that are available to EasyBuild. |
| 80 | +### Skipping of installed extensions is still done sequentially {: #installing_extensions_in_parallel_caveats_known_issues_skip } |
99 | 81 |
|
| 82 | +Checking which extensions are already installed for which the |
| 83 | +installation can be skipped when `--skip` (see |
| 84 | +[Installing additional extensions using `-k`/`-skip`][partial_installation_skip]) is being used |
| 85 | +is still done sequentially. |
100 | 86 |
|
101 |
| -.. _installing_extensions_in_parallel_caveats_known_issues_sanity_check: |
| 87 | +Additional work is needed to also run these checks in parallel across |
| 88 | +the cores that are available to EasyBuild. |
102 | 89 |
|
103 |
| -Sanity check for extensions is still run sequentially |
104 |
| -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 90 | +### Sanity check for extensions is still run sequentially {: #installing_extensions_in_parallel_caveats_known_issues_sanity_check } |
105 | 91 |
|
106 |
| -The sanity checks that are done for each extension are still done through a sequential loop over the |
107 |
| -list of extensions. |
| 92 | +The sanity checks that are done for each extension are still done |
| 93 | +through a sequential loop over the list of extensions. |
108 | 94 |
|
109 |
| -Additional work is needed to also run these checks in parallel across the cores that are available to EasyBuild. |
| 95 | +Additional work is needed to also run these checks in parallel across |
| 96 | +the cores that are available to EasyBuild. |
0 commit comments