only load modules using short module names#1754
Conversation
…EPATH correctly before loading fake module
|
EasyBuild framework unit test suite FAILed. See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/3010/console for more details. Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do. |
…in test_toy_hierarchical
|
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/3011/console for more details). This pull request is now ready for review/testing. Please try and find someone who can tackle this; contact @boegel if you're not sure what to do. |
| """ Verify if the given dependencies exist and add them """ | ||
| self.log.debug("add_dependencies: adding toolchain dependencies %s" % dependencies) | ||
|
|
||
| # use *full* module name to check existence of dependencies, since the modules may not be avaialble in the |
|
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/3012/console for more details). This pull request is now ready for review/testing. Please try and find someone who can tackle this; contact @boegel if you're not sure what to do. |
|
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/3013/console for more details). This pull request is now ready for review/testing. Please try and find someone who can tackle this; contact @boegel if you're not sure what to do. |
|
dedicated unit test added that triggers the bug, i.e. without the fix implemented here, it fails with: |
|
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/3015/console for more details). This pull request is now ready for review/testing. Please try and find someone who can tackle this; contact @boegel if you're not sure what to do. |
|
👍 |
|
This is good to go imho; @geimer took a look at it and didn't seem to have any objections (other than a silly typo), @wpoely86 gave it thumbs up and @bartoldeman confirmed that this fixes the problem he was having with easybuilders/easybuild-easyconfigs#2899 (which is confirmed with the test report that uses I'm still somewhat surprised that this didn't pop up earlier, but it only comes forward under very specific circumstances... |
This fixes a long-standing bug, which has remain hidden up until now because it only causes actual problems in particular circumstances, e.g. when running the sanity check commands during the sanity check of installing OpenMPI with a PGI toolchain when using a hierarchical module naming scheme, cfr. easybuilders/easybuild-easyconfigs#2899. The combination of sanity check commands with a toolchain that actually corresponds to a software package (rather than just a bundle of other modules) and a hierarchical module naming scheme is required to trigger this bug...
The problem is that the temporary module that is generated and loaded at the start of the sanity check was being loaded with the full name (e.g.
Compiler/GCC/4.7.2/OpenMPI/1.6.4) rather than the short name (e.g.OpenMPI/1.6.4).The latter requires that the module for the toolchain used to perform must be loaded first, to make sure that
$MODULEPATHis extended properly for the load with the short name to be work, and it's exactly this missing load that was causing problems when performing the sanity check commands for OpenMPI installed on top of PGI, i.e. that the PGI compiler commands (e.g.pgcc) were not available in$PATH(because thePGImodule wasn't actually loaded during the sanity check).This change fixes this problem, by making sure that all
loadsperformed by EasyBuild are done with the short module name and that$MODULEPATHis prepended as needed to make the temporary (fake) module loadable.(WIP because I want to look into a dedicated test to catch this...)
cc @bartoldeman, @ocaisa, @damianam, @geimer