Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] improve config checks for Boost.MPI and Boost.Python #2167

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

lexming
Copy link
Contributor

@lexming lexming commented Sep 9, 2020

This is needed to fix the test in easybuilders/easybuild-easyconfigs#11145

There are three fixes:

  • fixes sanity checks for Boost >= v1.69.0: as MT libraries have an additional x64 suffix
  • explicitly disables MPI if boost_mpi is False: there is a possible case of having usempi=True and boost_mpi=False and in the current easyblock Boost MPI is built
  • remove setting usempi=True in line 142 if boost_mpi=True, the MPI sanity check in line 119 will never allow a situation where that is needed

Update:
Disabling MPI is not as simple as adding --without-mpi to b2. The build command only allows for the set of features to be either enabled or disabled, not a mixture of both. Therefore, I revamped the configuration step by adding additional checks on configopts, boost_mpi and the toolchain. These changes not only explicitly disable MPI if boost_mpi is not True, but also check settings provided by the easyconfig in configopts.

I also added similar checks for Python. From now on, adding --without-libraries=python to configopts won't be necessary in the easyconfigs of Boost, it will be automatically added if Python is not in the dependency list.

Behaviour of existing easyconfigs should be unaffected by this PR.

@migueldiascosta
Copy link
Member

migueldiascosta commented Sep 10, 2020

I was testing this with all the existing Boost easyconfigs and it is failing with Boost-1.70.0-iimpi-2019a.eb, boost_mpi is not being built although it's supposed to... it seems that the using mpi line in user-config.jam is being ignored by bjam (?)

But except for Boost-1.70.0-iimpi-2019a.eb, it works with all the other easyconfigs, including Boost-1.70.0-gompi-2019a.eb...

Update: this particular issue was unrelated to this PR and a local problem, it disappeared after reinstalling the intel/2019a toolchain.

@migueldiascosta
Copy link
Member

also, this seems to break all the Boost.Python easyconfigs - bjam doesn't seem to like the explicit --without-mpi when --with-python is used (?)

@lexming
Copy link
Contributor Author

lexming commented Sep 10, 2020

@migueldiascosta thanks for the tests! I'll check those issues ASAP

easybuild/easyblocks/b/boost.py Outdated Show resolved Hide resolved
@lexming lexming changed the title fix boost sanity checks on MT libs and disable MPI without boost_mpi improve config checks for Boost.MPI and Boost.Python and fix sanity checks of MT libs Sep 14, 2020
@lexming
Copy link
Contributor Author

lexming commented Sep 14, 2020

@migueldiascosta Enabling and disabling features in the build step is indeed not trivial and breaks Boost.Python. However, that led into a rabbit hole and I added way more changes than originally planned. Apart from the fix of MT libs in the sanity check, the other changes add better handling of errors in the provided configuration options related to Boost.MPI and Boost.Python. That should fix all previous issues. I'll add test reports asap.

@lexming
Copy link
Contributor Author

lexming commented Sep 16, 2020

The following tests on Boost with and without Python are all positive:

@lexming
Copy link
Contributor Author

lexming commented Sep 16, 2020

The following tests on Boost.Python are positive:

@lexming
Copy link
Contributor Author

lexming commented Sep 16, 2020

Tests on a few hypothetical cases:

  1. Setting boost_mpi = False and usempi = True proceeds and libboost_mpi is not installed
  1. Contradictory settings provided by user in configopts with boost_mpi will trigger an error
  1. Python bindings will not be installed unless Python is listed as dependency or user explicitly enables those in configopts

@migueldiascosta
Copy link
Member

Test report by @migueldiascosta

Overview of tested easyconfigs (in order)

  • SUCCESS Boost.Python-1.64.0-gompi-2019a.eb
  • SUCCESS Boost.Python-1.64.0-gompic-2019a.eb
  • SUCCESS Boost.Python-1.65.1-intel-2017b-Python-2.7.14.eb
  • SUCCESS Boost.Python-1.66.0-foss-2018a-Python-3.6.4.eb
  • SUCCESS Boost.Python-1.66.0-intel-2018a-Python-2.7.14.eb
  • SUCCESS Boost.Python-1.66.0-intel-2018a-Python-3.6.4.eb
  • SUCCESS Boost.Python-1.67.0-foss-2018b-Python-2.7.15.eb
  • SUCCESS Boost.Python-1.67.0-foss-2018b-Python-3.6.6.eb
  • SUCCESS Boost.Python-1.67.0-fosscuda-2018b-Python-2.7.15.eb
  • SUCCESS Boost.Python-1.67.0-intel-2018b-Python-2.7.15.eb
  • SUCCESS Boost.Python-1.67.0-intel-2018b-Python-3.6.6.eb
  • SUCCESS Boost.Python-1.70.0-gompi-2019a.eb
  • SUCCESS Boost.Python-1.70.0-iimpi-2019a.eb
  • SUCCESS Boost.Python-1.71.0-gompi-2019b.eb
  • SUCCESS Boost.Python-1.71.0-iimpi-2019b.eb
  • SUCCESS Boost.Python-1.71.0-iimpic-2019b.eb
  • SUCCESS Boost.Python-1.72.0-gompi-2020a.eb
  • SUCCESS Boost.Python-1.72.0-iimpi-2020a.eb
  • SUCCESS Boost-1.71.0-gompic-2019b.eb
  • SUCCESS Boost.Python-1.71.0-gompic-2019b.eb

Build succeeded for 20 out of 20 (19 easyconfigs in total)
sms - Linux centos linux 7.6.1810, x86_64, AMD EPYC 7601 32-Core Processor (zen), Python 2.7.5
See https://gist.github.com/749fb0c4fc2811791e716c1c94291326 for a full test report.

@migueldiascosta
Copy link
Member

Test report by @migueldiascosta

Overview of tested easyconfigs (in order)

  • SUCCESS Boost-1.55.0.eb
  • FAIL (build issue) Boost-1.58.0-GCC-4.9.2-serial.eb (partial log available at https://gist.github.com/cbbe240fcf7d9042146a6a5171cb49d0)
  • SUCCESS Boost-1.63.0-foss-2018a-Python-2.7.14.eb
  • SUCCESS Boost-1.64.0-gompi-2019a.eb
  • SUCCESS Boost-1.64.0-gompic-2019a.eb
  • SUCCESS Boost-1.66.0-foss-2018a.eb
  • SUCCESS Boost-1.66.0-foss-2018a-Python-2.7.14.eb
  • SUCCESS Boost-1.66.0-foss-2018a-Python-3.6.4.eb
  • SUCCESS Boost-1.66.0-GCCcore-6.4.0-no_mpi.eb
  • SUCCESS Boost-1.66.0-intel-2018.01.eb
  • SUCCESS Boost-1.66.0-intel-2018.01-Python-3.6.3.eb
  • SUCCESS Boost-1.66.0-intel-2018a.eb
  • SUCCESS Boost-1.66.0-intel-2018a-Python-2.7.14.eb
  • SUCCESS Boost-1.66.0-intel-2018a-Python-3.6.4.eb
  • SUCCESS Boost-1.67.0-foss-2018a-Python-2.7.14.eb
  • SUCCESS Boost-1.67.0-foss-2018b.eb
  • SUCCESS Boost-1.67.0-fosscuda-2018b.eb
  • SUCCESS Boost-1.67.0-intel-2018a.eb
  • SUCCESS Boost-1.67.0-intel-2018b.eb
  • SUCCESS Boost-1.68.0-foss-2018b-Python-2.7.15.eb
  • SUCCESS Boost-1.68.0-foss-2018b-Python-3.6.6.eb
  • SUCCESS Boost-1.68.0-intel-2018b-Python-2.7.15.eb
  • SUCCESS Boost-1.68.0-intel-2018b-Python-3.6.6.eb
  • SUCCESS Boost-1.69.0-intel-2019.01.eb
  • SUCCESS Boost-1.70.0-gompi-2019a.eb
  • SUCCESS Boost-1.70.0-iimpi-2019a.eb
  • SUCCESS Boost-1.70.0-iimpic-2019a.eb
  • SUCCESS Boost-1.71.0-gompi-2019b.eb
  • SUCCESS Boost-1.71.0-gompic-2019b.eb
  • SUCCESS Boost-1.71.0-iimpi-2019b.eb
  • SUCCESS Boost-1.71.0-iimpic-2019b.eb
  • SUCCESS Boost-1.72.0-GCCcore-9.3.0-no_mpi.eb
  • SUCCESS Boost-1.72.0-gompi-2020a.eb
  • SUCCESS Boost-1.72.0-iimpi-2020a.eb

Build succeeded for 33 out of 34 (34 easyconfigs in total)
sms - Linux centos linux 7.6.1810, x86_64, AMD EPYC 7601 32-Core Processor (zen), Python 2.7.5
See https://gist.github.com/5f919f319346c1cb5c4d79af1b09851b for a full test report.

@migueldiascosta
Copy link
Member

@lexming this breaks Boost-1.58.0-GCC-4.9.2-serial.eb (and I suppose any easyconfig with a --with-libraries in configopts for which Boost.MPI and/or Boost.Python are explicitly disabled by this easyblock via --without-libraries?)

@boegel boegel removed this from the 4.3.1 (next release) milestone Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants