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

{tools}[foss/2023a] ICON

Open jhgoebbert opened this issue 1 year ago • 18 comments

This pull-request adds easyconfig files for the software ICON ( https://gitlab.dkrz.de/icon/icon-model ) which just recently got announced as open-source. ICON is a flexible, scalable, high-performance modelling framework for weather, climate and environmental prediction that provides actionable information for society and advances our understanding of the Earth's climate system and a candidate for the first European Exascale supercomputer JUPITER. More on ICON can be found here https://icon-model.org

jhgoebbert avatar Feb 21 '24 17:02 jhgoebbert

@jhgoebbert: Tests failed in GitHub Actions, see https://github.com/easybuilders/easybuild-easyconfigs/actions/runs/7993683362 Last 100 lines of output from first failing test suite run:

easybuild.tools.build_log.EasyBuildError: "Failed to process easyconfig /home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/easybuild/easyconfigs/i/ICON/ICON-2024.01-nvompic-2024.1.eb: Parsing easyconfig file failed: 'EASYBUILD_CUDA_COMPUTE_CAPABILITIES' (line 59)"

======================================================================
ERROR: test_r_libs_site_env_var (test.easyconfigs.easyconfigs.EasyConfigTest)
Make sure $R_LIBS_SITE is being updated, rather than $R_LIBS.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/format/pyheaderconfigobj.py", line 198, in parse_pyheader
    exec(pyheader, cfg)
  File "<string>", line 59, in <module>
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/os.py", line 669, in __getitem__
    raise KeyError(key) from None
KeyError: 'EASYBUILD_CUDA_COMPUTE_CAPABILITIES'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/easyconfig.py", line 2085, in process_easyconfig
    ec = EasyConfig(spec, build_specs=build_specs, validate=validate, hidden=hidden)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/easyconfig.py", line 466, in __init__
    auto_convert_value_types=auto_convert_value_types)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/parser.py", line 108, in __init__
    self._set_formatter(filename)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/parser.py", line 197, in _set_formatter
    self._formatter.parse(self.rawcontent)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/format/one.py", line 159, in parse
    super(FormatOneZero, self).parse(self.rawcontent, strict_section_markers=True)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/format/pyheaderconfigobj.py", line 138, in parse
    self.parse_pre_section(txt[:start_section])
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/format/pyheaderconfigobj.py", line 169, in parse_pre_section
    self.parse_pyheader('\n'.join(txt_list))
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/format/pyheaderconfigobj.py", line 204, in parse_pyheader
    raise EasyBuildError("Parsing easyconfig file failed: %s", err_msg)
easybuild.tools.build_log.EasyBuildError: "Parsing easyconfig file failed: 'EASYBUILD_CUDA_COMPUTE_CAPABILITIES' (line 59)"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 970, in test_r_libs_site_env_var
    for ec in self.parsed_easyconfigs:
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 275, in parsed_easyconfigs
    EasyConfigTest.parse_all_easyconfigs()
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 200, in parse_all_easyconfigs
    cls._parsed_easyconfigs.extend(process_easyconfig(spec))
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/easyconfig.py", line 2087, in process_easyconfig
    raise EasyBuildError("Failed to process easyconfig %s: %s", spec, err.msg)
easybuild.tools.build_log.EasyBuildError: "Failed to process easyconfig /home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/easybuild/easyconfigs/i/ICON/ICON-2024.01-nvompic-2024.1.eb: Parsing easyconfig file failed: 'EASYBUILD_CUDA_COMPUTE_CAPABILITIES' (line 59)"

======================================================================
ERROR: test_sanity_check_paths (test.easyconfigs.easyconfigs.EasyConfigTest)
Make sure specified sanity check paths adher to the requirements.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/format/pyheaderconfigobj.py", line 198, in parse_pyheader
    exec(pyheader, cfg)
  File "<string>", line 59, in <module>
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/os.py", line 669, in __getitem__
    raise KeyError(key) from None
KeyError: 'EASYBUILD_CUDA_COMPUTE_CAPABILITIES'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/easyconfig.py", line 2085, in process_easyconfig
    ec = EasyConfig(spec, build_specs=build_specs, validate=validate, hidden=hidden)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/easyconfig.py", line 466, in __init__
    auto_convert_value_types=auto_convert_value_types)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/parser.py", line 108, in __init__
    self._set_formatter(filename)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/parser.py", line 197, in _set_formatter
    self._formatter.parse(self.rawcontent)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/format/one.py", line 159, in parse
    super(FormatOneZero, self).parse(self.rawcontent, strict_section_markers=True)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/format/pyheaderconfigobj.py", line 138, in parse
    self.parse_pre_section(txt[:start_section])
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/format/pyheaderconfigobj.py", line 169, in parse_pre_section
    self.parse_pyheader('\n'.join(txt_list))
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/format/pyheaderconfigobj.py", line 204, in parse_pyheader
    raise EasyBuildError("Parsing easyconfig file failed: %s", err_msg)
easybuild.tools.build_log.EasyBuildError: "Parsing easyconfig file failed: 'EASYBUILD_CUDA_COMPUTE_CAPABILITIES' (line 59)"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 954, in test_sanity_check_paths
    for ec in self.parsed_easyconfigs:
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 275, in parsed_easyconfigs
    EasyConfigTest.parse_all_easyconfigs()
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 200, in parse_all_easyconfigs
    cls._parsed_easyconfigs.extend(process_easyconfig(spec))
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/framework/easyconfig/easyconfig.py", line 2087, in process_easyconfig
    raise EasyBuildError("Failed to process easyconfig %s: %s", spec, err.msg)
easybuild.tools.build_log.EasyBuildError: "Failed to process easyconfig /home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/easybuild/easyconfigs/i/ICON/ICON-2024.01-nvompic-2024.1.eb: Parsing easyconfig file failed: 'EASYBUILD_CUDA_COMPUTE_CAPABILITIES' (line 59)"

----------------------------------------------------------------------
Ran 19183 tests in 591.516s

FAILED (errors=12)
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 Feb 21 '24 19:02 boegelbot

Hello @boegel Hello @SebastianAchilles

the bot is complaining about the following lines:

# get the local cuda_compute_capabilities
local_gpu_cc = os.environ["EASYBUILD_CUDA_COMPUTE_CAPABILITIES"].split(',')[0].replace('.', '')

This works fine at our side at JSC - and somehow it looks quite elegant to me (no need for an extra easyblock). Would that be an approach you can support to automatically get the gpu_ cc for the -gpu=cc%s flag of the NVHPC compiler?

jhgoebbert avatar Feb 24 '24 13:02 jhgoebbert

I removed the nvhpc 24.1 version of ICON from this pull request to avoid the CI-issue for now.

jhgoebbert avatar Feb 24 '24 19:02 jhgoebbert

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

ERROR: test_conflicts (test.easyconfigs.easyconfigs.EasyConfigTest)
Check whether any conflicts occur in software dependency graphs.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 330, in test_conflicts
    self.assertFalse(check_conflicts(self.ordered_specs, modules_tool(), check_inter_ec_conflicts=False),
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 282, in ordered_specs
    EasyConfigTest.resolve_all_dependencies()
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 214, in resolve_all_dependencies
    cls._parsed_easyconfigs, modules_tool(), retain_all_deps=True)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 463, in resolve_dependencies
    raise_error_missing_deps(totally_missing, extra_msg="no easyconfig file or existing module found")
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 326, in raise_error_missing_deps
    raise EasyBuildError(error_msg)
easybuild.tools.build_log.EasyBuildError: 'Missing dependencies: SciPy-bundle/2023.07-gcccoreflexiblas-12.3.0-3.3.1, libfyaml/0.9-foss-2023a, HDF5/1.14.2-foss-2023a (no easyconfig file or existing module found)'

======================================================================
ERROR: test_dep_graph (test.easyconfigs.easyconfigs.EasyConfigTest)
Unit test that builds a full dependency graph.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 317, in test_dep_graph
    dep_graph(fn, self.ordered_specs)
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 282, in ordered_specs
    EasyConfigTest.resolve_all_dependencies()
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 214, in resolve_all_dependencies
    cls._parsed_easyconfigs, modules_tool(), retain_all_deps=True)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 463, in resolve_dependencies
    raise_error_missing_deps(totally_missing, extra_msg="no easyconfig file or existing module found")
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 326, in raise_error_missing_deps
    raise EasyBuildError(error_msg)
easybuild.tools.build_log.EasyBuildError: 'Missing dependencies: SciPy-bundle/2023.07-gcccoreflexiblas-12.3.0-3.3.1, libfyaml/0.9-foss-2023a, HDF5/1.14.2-foss-2023a (no easyconfig file or existing module found)'

======================================================================
ERROR: test_dep_versions_per_toolchain_generation (test.easyconfigs.easyconfigs.EasyConfigTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 923, in test_dep_versions_per_toolchain_generation
    for ec in self.ordered_specs:
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 282, in ordered_specs
    EasyConfigTest.resolve_all_dependencies()
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 214, in resolve_all_dependencies
    cls._parsed_easyconfigs, modules_tool(), retain_all_deps=True)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 463, in resolve_dependencies
    raise_error_missing_deps(totally_missing, extra_msg="no easyconfig file or existing module found")
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 326, in raise_error_missing_deps
    raise EasyBuildError(error_msg)
easybuild.tools.build_log.EasyBuildError: 'Missing dependencies: SciPy-bundle/2023.07-gcccoreflexiblas-12.3.0-3.3.1, libfyaml/0.9-foss-2023a, HDF5/1.14.2-foss-2023a (no easyconfig file or existing module found)'

----------------------------------------------------------------------
Ran 19202 tests in 965.773s

FAILED (errors=3)
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 Feb 24 '24 19:02 boegelbot

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

ERROR: test_conflicts (test.easyconfigs.easyconfigs.EasyConfigTest)
Check whether any conflicts occur in software dependency graphs.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 330, in test_conflicts
    self.assertFalse(check_conflicts(self.ordered_specs, modules_tool(), check_inter_ec_conflicts=False),
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 282, in ordered_specs
    EasyConfigTest.resolve_all_dependencies()
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 214, in resolve_all_dependencies
    cls._parsed_easyconfigs, modules_tool(), retain_all_deps=True)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 463, in resolve_dependencies
    raise_error_missing_deps(totally_missing, extra_msg="no easyconfig file or existing module found")
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 326, in raise_error_missing_deps
    raise EasyBuildError(error_msg)
easybuild.tools.build_log.EasyBuildError: 'Missing dependencies: HDF5/1.14.3-foss-2023a (no easyconfig file or existing module found)'

======================================================================
ERROR: test_dep_graph (test.easyconfigs.easyconfigs.EasyConfigTest)
Unit test that builds a full dependency graph.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 317, in test_dep_graph
    dep_graph(fn, self.ordered_specs)
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 282, in ordered_specs
    EasyConfigTest.resolve_all_dependencies()
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 214, in resolve_all_dependencies
    cls._parsed_easyconfigs, modules_tool(), retain_all_deps=True)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 463, in resolve_dependencies
    raise_error_missing_deps(totally_missing, extra_msg="no easyconfig file or existing module found")
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 326, in raise_error_missing_deps
    raise EasyBuildError(error_msg)
easybuild.tools.build_log.EasyBuildError: 'Missing dependencies: HDF5/1.14.3-foss-2023a (no easyconfig file or existing module found)'

======================================================================
ERROR: test_dep_versions_per_toolchain_generation (test.easyconfigs.easyconfigs.EasyConfigTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 923, in test_dep_versions_per_toolchain_generation
    for ec in self.ordered_specs:
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 282, in ordered_specs
    EasyConfigTest.resolve_all_dependencies()
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/easyconfigs.py", line 214, in resolve_all_dependencies
    cls._parsed_easyconfigs, modules_tool(), retain_all_deps=True)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 463, in resolve_dependencies
    raise_error_missing_deps(totally_missing, extra_msg="no easyconfig file or existing module found")
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/robot.py", line 326, in raise_error_missing_deps
    raise EasyBuildError(error_msg)
easybuild.tools.build_log.EasyBuildError: 'Missing dependencies: HDF5/1.14.3-foss-2023a (no easyconfig file or existing module found)'

----------------------------------------------------------------------
Ran 19203 tests in 988.513s

FAILED (errors=3)
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 Feb 24 '24 20:02 boegelbot

So it looks like we need another template here. Like %(cuda_highest_cc)s or so.

It would be great to have such a template. For this pull-request it is not yet needed. But I would like to incude it into ICON's ebconfig file for NVHPC-24.1. Another approach could have been

local_gpu_cc_str = '%(cuda_compute_capabilities)s'
local_gpu_cc = local_gpu_cc_str.split(',')[0].replace('.', '')

But it seems as if .split(',')[0].replace('.', '') cannot be added to a eb-variable - at least I did not get it to work.

Anyway: Very nice, I'll forward this to a colleague working with ICON here (ZIH)

Thank you for forwarding.

jhgoebbert avatar Feb 27 '24 15:02 jhgoebbert

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

FAIL: test_style_conformance (test.easyconfigs.styletests.StyleTest)
Check the easyconfigs for style
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/base/testing.py", line 97, in assertEqual
    super(TestCase, self).assertEqual(a, b)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/case.py", line 829, in assertEqual
    assertion_func(first, second, msg=msg)
AssertionError: 1 != 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/styletests.py", line 68, in test_style_conformance
    self.assertEqual(result, 0, error_msg)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/base/testing.py", line 119, in assertEqual
    raise AssertionError("%s:\nDIFF%s:\n%s" % (msg, limit, ''.join(diff[:self.ASSERT_MAX_DIFF])))
AssertionError: There shouldn't be any code style errors (and/or warnings), found 1:
/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/easybuild/easyconfigs/i/ICON/ICON-2024.01-foss-2023a.eb:217:1: W391 blank line at end of file

: 1 != 0:
DIFF:
- 1

----------------------------------------------------------------------
Ran 19227 tests in 761.031s

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 Feb 27 '24 16:02 boegelbot

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

FAIL: test_style_conformance (test.easyconfigs.styletests.StyleTest)
Check the easyconfigs for style
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/base/testing.py", line 97, in assertEqual
    super(TestCase, self).assertEqual(a, b)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/case.py", line 829, in assertEqual
    assertion_func(first, second, msg=msg)
AssertionError: 1 != 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/test/easyconfigs/styletests.py", line 68, in test_style_conformance
    self.assertEqual(result, 0, error_msg)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/base/testing.py", line 119, in assertEqual
    raise AssertionError("%s:\nDIFF%s:\n%s" % (msg, limit, ''.join(diff[:self.ASSERT_MAX_DIFF])))
AssertionError: There shouldn't be any code style errors (and/or warnings), found 1:
/home/runner/work/easybuild-easyconfigs/easybuild-easyconfigs/easybuild/easyconfigs/i/ICON/ICON-2024.01-foss-2023a.eb:216:1: W391 blank line at end of file

: 1 != 0:
DIFF:
- 1

----------------------------------------------------------------------
Ran 19227 tests in 761.080s

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 Feb 27 '24 17:02 boegelbot

Test report by @sebastianachilles SUCCESS Build succeeded for 2 out of 2 (2 easyconfigs in total) zen2-rockylinux-89 - Linux Rocky Linux 8.9, x86_64, AMD EPYC 7452 32-Core Processor (zen2), Python 3.6.8 See https://gist.github.com/SebastianAchilles/48809867a3c71e92792b60424fb8171f for a full test report.

SebastianAchilles avatar Feb 27 '24 17:02 SebastianAchilles

So it looks like we need another template here. Like %(cuda_highest_cc)s or so.

It would be great to have such a template. For this pull-request it is not yet needed. But I would like to incude it into ICON's ebconfig file for NVHPC-24.1. Another approach could have been

local_gpu_cc_str = '%(cuda_compute_capabilities)s'
local_gpu_cc = local_gpu_cc_str.split(',')[0].replace('.', '')

But it seems as if .split(',')[0].replace('.', '') cannot be added to a eb-variable - at least I did not get it to work.

This is a bit more involved. What happens there is literally local_gpu_cc = '%(cuda_compute_capabilities)s'.split(',')[0].replace('.', '') which ends up as local_gpu_cc = '%(cuda_compute_capabilities)s'.
The point is that this isn't a variable: It is just a format string. At the point of use the equivalent of run(configopts % {'cuda_compute_capabilities': '6.1,8.0', 'other_template': 'value'}) is executed internally.

Also those templates are special because they are based on the values of the easyconfig itself, so %(cuda_compute_capabilities)s is not (much) different to %(namelower)s: The template is set after the easyconfig is parsed (interpreted as a plain Python file in a local context) so you cannot operate on the values while the file is being parsed. You could maybe do something like local_gpu_cc = '$(echo "%(cuda_compute_capabilities)s" | awk -F, \'{print $1;}\' | sed "s/.//")' to operate on it in the shell

Side note for cuda_compute_capabilities: The template gets set to the value of that variable in the EC defaulting to the config value (from env/cmdline/config) if not set in the EC. This is actually very useful: We have a hook that sets the EC value based on the current cluster arch and CUDA version used to avoid trying to build for a high SM-arch but not too high for the NVCC compiler.

Flamefire avatar Feb 27 '24 17:02 Flamefire

Thank you for the background details. This makes it easier to understand what is possible.
For now I will then operate with the shell for local_gpu_cc to avoid EASYBUILD_CUDA_COMPUTE_CAPABILITIES in the ebconfig of ICON for nvhpc.

jhgoebbert avatar Feb 27 '24 17:02 jhgoebbert

@boegelbot please test @ jsc-zen3

SebastianAchilles avatar Feb 28 '24 06:02 SebastianAchilles

@SebastianAchilles: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=19954 EB_ARGS= EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_19954 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 3688

Test results coming soon (I hope)...

- notification for comment with ID 1968345074 processed

Message to humans: this is just bookkeeping information for me, it is of no use to you (unless you think I have a bug, which I don't).

boegelbot avatar Feb 28 '24 07:02 boegelbot

Test report by @boegelbot SUCCESS Build succeeded for 2 out of 2 (2 easyconfigs in total) jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.3, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.18 See https://gist.github.com/boegelbot/cafd2590390fd9023662da58b8e04498 for a full test report.

boegelbot avatar Feb 28 '24 07:02 boegelbot

@boegelbot please test @ generoso

SebastianAchilles avatar Feb 28 '24 07:02 SebastianAchilles

@SebastianAchilles: Request for testing this PR well received on login1

PR test command 'EB_PR=19954 EB_ARGS= EB_CONTAINER= EB_REPO=easybuild-easyconfigs /opt/software/slurm/bin/sbatch --job-name test_PR_19954 --ntasks=4 ~/boegelbot/eb_from_pr_upload_generoso.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 12983

Test results coming soon (I hope)...

- notification for comment with ID 1968386937 processed

Message to humans: this is just bookkeeping information for me, it is of no use to you (unless you think I have a bug, which I don't).

boegelbot avatar Feb 28 '24 07:02 boegelbot

Test report by @boegelbot SUCCESS Build succeeded for 2 out of 2 (2 easyconfigs in total) cns1 - Linux Rocky Linux 8.9, x86_64, Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz (haswell), Python 3.6.8 See https://gist.github.com/boegelbot/fc28292b0cee019358c61921114e7052 for a full test report.

boegelbot avatar Feb 28 '24 07:02 boegelbot

Any chance this could be merged?

jhgoebbert avatar Mar 19 '24 08:03 jhgoebbert

Going in, thanks @jhgoebbert!

SebastianAchilles avatar Apr 11 '24 17:04 SebastianAchilles