easybuild-framework
easybuild-framework copied to clipboard
add option to link MKL dynamically instead of statically (WIP)
hm, it seems using a build_option here breaks a few things that run before set_up_configuration()...
@migueldiascosta: Tests failed in GitHub Actions, see https://github.com/easybuilders/easybuild-framework/actions/runs/245878480 Output from first failing test suite run:
ERROR: test__list_toolchains (test.framework.options.CommandLineOptionsTest)
Test listing known compiler toolchains.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/options.py", line 535, in test__list_toolchains
self.eb_main(args, logfile=dummylogfn, raise_error=True)
File "test/framework/utilities.py", line 301, in eb_main
raise myerr
EasyBuildError: 'Failed to parse configuration options: "Undefined build option: \'imkl_dynamic_linking\'. Make sure you have set up the EasyBuild configuration using set_up_configuration() (from easybuild.tools.options) in case you\'re not using EasyBuild via the \'eb\' CLI."'
======================================================================
ERROR: test_include_toolchains (test.framework.options.CommandLineOptionsTest)
Test --include-toolchains.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/options.py", line 3138, in test_include_toolchains
logtxt, _ = run_cmd(test_cmd, simple=False)
File "easybuild/tools/run.py", line 88, in cache_aware_func
res = func(cmd, *args, **kwargs)
File "easybuild/tools/run.py", line 269, in run_cmd
return parse_cmd_output(cmd, stdouterr, ec, simple, log_all, log_ok, regexp)
File "easybuild/tools/run.py", line 533, in parse_cmd_output
raise EasyBuildError('cmd "%s" exited with exit code %s and output:\n%s', cmd, ec, stdouterr)
EasyBuildError: 'cmd "cd /tmp/eb-MDHKP7/eb-rPvDEi/eb-W56HZO; /opt/hostedtoolcache/Python/2.7.18/x64/bin/python -O -m easybuild.main --list-toolchains" exited with exit code 1 and output:\nERROR: Failed to parse configuration options: "Undefined build option: \'imkl_dynamic_linking\'. Make sure you have set up the EasyBuild configuration using set_up_configuration() (from easybuild.tools.options) in case you\'re not using EasyBuild via the \'eb\' CLI."\n'
----------------------------------------------------------------------
Ran 731 tests in 1049.386s
FAILED (errors=2)
ERROR: Not all tests were successful.
bleep, bloop, I'm just a bot (boegelbot v20200716.01)
Please talk to my owner @boegel
if you notice you me acting stupid),
or submit a pull request to https://github.com/boegel/boegelbot fix the problem.
hm, it seems using a build_option here breaks a few things that run before set_up_configuration()...
Yes, indeed, triggering a build_option
call too early means trouble, since it relies on the configuration being set up already.
Why limit this to MKL? Why not just select dynamic libs all over?
@akesandgren I think the other LinAlgs are already using dynamic libs. I don't know why eb linkl MKL statically by default, but there is at least one use case for linking dynamically (in order to use LD_PRELOAD...), so adding an option instead of changing the default should be better... (?)
I frequently see openblas being linked in as .../libopenblas.a so I don't think it's doing shared libs by default for the other libs either.
So perhaps we should check what the defaults really are?