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

Allow optarch values to be partial maps including vector extensions

Open Flamefire opened this issue 4 years ago • 5 comments

Instead of only setting optimal compiler arguments based on architecture and CPU family/vendor also include the supported vector extensions as criteria to choose flags. To simplify specifying generic flags allow partial matches, e.g. a fallback setting for any x86 arch which doesn't have more specific values. Example:

    COMPILER_OPTIMAL_ARCHITECTURE_OPTION = {
        (systemtools.X86_64, ): 'xHost',
        (systemtools.X86_64, systemtools.AMD, systemtools.AVX2): 'mavx2',
    }

Closes #3793

Flamefire avatar Aug 10 '21 12:08 Flamefire

@boegel Updated this PR

Flamefire avatar Jul 26 '22 14:07 Flamefire

@Flamefire: Tests failed in GitHub Actions, see https://github.com/easybuilders/easybuild-framework/actions/runs/4956304781 Output from first failing test suite run:

FAIL: test_toy_build_lock (test.framework.toy_build.ToyBuildTest)
Test toy installation when a lock is already in place.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/runner/3d123ced4b961b8ca3abd5f0a708e0dbcb72dbf0/lib/python3.5/site-packages/test/framework/toy_build.py", line 3523, in test_toy_build_lock
    self.assertIn("Use of --wait-on-lock is deprecated", stderr)
AssertionError: 'Use of --wait-on-lock is deprecated' not found in ''

----------------------------------------------------------------------
Ran 849 tests in 1732.297s

FAILED (failures=1)
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 me acting stupid), or submit a pull request to https://github.com/boegel/boegelbot fix the problem.

boegelbot avatar May 12 '23 10:05 boegelbot

Ping on this as this came up in the EUM with respect to intel compilers

Flamefire avatar Apr 25 '24 12:04 Flamefire

To add to this, it seems like spack has already done some work in mapping CPU feature flags to compiler versions, see microarchitectures.json. There is some logic in portage as well, where CPU_FLAGS variable map to USE flags, but this probably maps less closely to the problem addressed in this PR than what archspec does.

joeydumont avatar Apr 26 '24 21:04 joeydumont