easybuild-framework icon indicating copy to clipboard operation
easybuild-framework copied to clipboard

add option to link MKL dynamically instead of statically (WIP)

Open migueldiascosta opened this issue 4 years ago • 6 comments

migueldiascosta avatar Sep 09 '20 07:09 migueldiascosta

hm, it seems using a build_option here breaks a few things that run before set_up_configuration()...

migueldiascosta avatar Sep 09 '20 07:09 migueldiascosta

@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.

boegelbot avatar Sep 09 '20 08:09 boegelbot

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.

boegel avatar Sep 10 '20 15:09 boegel

Why limit this to MKL? Why not just select dynamic libs all over?

akesandgren avatar Feb 23 '21 07:02 akesandgren

@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... (?)

migueldiascosta avatar Feb 23 '21 13:02 migueldiascosta

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?

akesandgren avatar Feb 23 '21 15:02 akesandgren