Skip to content

Nessi.no 2023.04 replace Rust/1.52.1 by Rust/1.60.0 - #106

Merged
trz42 merged 6 commits into
NorESSI:nessi.no-2023.04-devfrom
TopRichard:nessi.no-2023.04-Replace-Rust/1.52.1-by-Rust/1.60.0
May 10, 2023
Merged

trz42 merged 6 commits into
NorESSI:nessi.no-2023.04-devfrom
TopRichard:nessi.no-2023.04-Replace-Rust/1.52.1-by-Rust/1.60.0

Conversation

@TopRichard

@TopRichard TopRichard commented May 3, 2023 •

Copy link
Copy Markdown

As Rust is guaranteed for backward compatibility: https://doc.rust-lang.org/edition-guide/editions, we are trying to replace Rust/1.52.1 by Rust/1.60.0 since the former generates errors when compiling it with GCC/10.3.0 in the NESSI pilot 2023.04.

@nessi-bot

nessi-bot Bot commented May 3, 2023

Copy link
Copy Markdown

Instance eX3-NESSI is configured to build:

  • arch x86_64/amd/zen2 for repo nessi.no-2022.11
  • arch x86_64/amd/zen2 for repo nessi.no-2023.04
  • arch x86_64/amd/zen2 for repo eessi-2023.04
  • arch aarch64/generic for repo nessi.no-2022.11
  • arch aarch64/generic for repo nessi.no-2023.04
  • arch aarch64/generic for repo eessi-2023.04

@nessi-bot

nessi-bot Bot commented May 3, 2023

Copy link
Copy Markdown

Instance AWS-NESSI is configured to build:

  • arch x86_64/generic for repo nessi.no-2022.11
  • arch x86_64/generic for repo nessi.no-2023.04
  • arch x86_64/generic for repo eessi-2023.04
  • arch x86_64/intel/skylake_avx512 for repo nessi.no-2022.11
  • arch x86_64/intel/skylake_avx512 for repo nessi.no-2023.04
  • arch x86_64/intel/skylake_avx512 for repo eessi-2023.04
  • arch x86_64/intel/cascadelake for repo nessi.no-2022.11
  • arch x86_64/intel/cascadelake for repo nessi.no-2023.04
  • arch x86_64/intel/cascadelake for repo eessi-2023.04
  • arch x86_64/amd/zen2 for repo nessi.no-2022.11
  • arch x86_64/amd/zen2 for repo nessi.no-2023.04
  • arch x86_64/amd/zen2 for repo eessi-2023.04
  • arch aarch64/generic for repo nessi.no-2022.11
  • arch aarch64/generic for repo nessi.no-2023.04
  • arch aarch64/generic for repo eessi-2023.04

@nessi-bot

nessi-bot Bot commented May 3, 2023

Copy link
Copy Markdown

Instance Fram-NESSI is configured to build:

  • arch x86_64/generic for repo nessi.no-2022.11
  • arch x86_64/generic for repo nessi.no-2023.04
  • arch x86_64/generic for repo eessi-2023.04
  • arch x86_64/intel/broadwell for repo nessi.no-2022.11
  • arch x86_64/intel/broadwell for repo nessi.no-2023.04
  • arch x86_64/intel/broadwell for repo eessi-2023.04

@TopRichard TopRichard changed the title Nessi.no 2023.04 replace rust/1.52.1 by rust/1.60.0 Nessi.no 2023.04 replace Rust/1.52.1 by Rust/1.60.0 May 3, 2023
@TopRichard
TopRichard requested a review from trz42 May 3, 2023 14:59

@trz42 trz42 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks already quite good.

Added a few comments. Probably comments to the first kind of dependency (first double loop) applies to the other two too.

The bodies of the inner loops should be indented by three additional whitespaces.

Wonder a bit if we should add some tests for the Rust function? A test would create some test data (test ec, test eprefix), call Rust with the test data and then compares the result with what is expected.

Comment thread eb_hooks.py Outdated
raise EasyBuildError("WRF-specific hook triggered for non-WRF easyconfig?!")


def Rustv(ec, eprefix):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it called Rustv not just Rust?

Comment thread eb_hooks.py Outdated


def Rustv(ec, eprefix):
""" For the new compat layer we use Rust-1.60.0 instead of Rust-1.52.1"""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to rather mention the compiler+version (GCC/10.3.0)similarly to changed description. Would also be good to stick to syntax package/version when referencing them. I'd remove the whitespace between """ and For.

Sorry for being picky.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably good to mention when this function is called (parse_hook ?) and what we need to do/intend (if a dependency is Rust/1.52.1 we replace it with Rust/1.60.0).

Comment thread eb_hooks.py Outdated
def Rustv(ec, eprefix):
""" For the new compat layer we use Rust-1.60.0 instead of Rust-1.52.1"""
for dep in ec['dependencies']:
for i in range(len(ec['dependencies'])):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better not use single letter variable names. You might try index instead.

Comment thread eb_hooks.py Outdated
Comment on lines +186 to +187
for dep in ec['dependencies']:
for i in range(len(ec['dependencies'])):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need the double loop? If there is a good reason, it would be good to add a comment describing it a bit.

Comment thread eb_hooks.py Outdated
""" For the new compat layer we use Rust-1.60.0 instead of Rust-1.52.1"""
for dep in ec['dependencies']:
for i in range(len(ec['dependencies'])):
dep = ec['dependencies'][i]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, you overwrite/set dep, so it looks to me as if you don't need the outer loop for dep in ....

Comment thread eb_hooks.py Outdated
for i in range(len(ec['dependencies'])):
dep = ec['dependencies'][i]
if isinstance(dep, (list,tuple)) and (dep[0] == "Rust" and dep[1] == '1.52.1'):
print_msg("NOTE: Rust version has been modified to 1.60.0")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to add from which version it was changed $\longrightarrow$ Dependency Rust/x is replaced with Rust/1.60.0

Comment thread eb_hooks.py Outdated
dep = ec['dependencies'][i]
if isinstance(dep, (list,tuple)) and (dep[0] == "Rust" and dep[1] == '1.52.1'):
print_msg("NOTE: Rust version has been modified to 1.60.0")
ec['dependencies'][i] = ["Rust", "1.60.0"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, you replace dependency always with a list. Is that ok, ie, if dependency was a tuple, should it be replaced with a tuple too?

Comment thread eb_hooks.py Outdated
if isinstance(dep, (list,tuple)) and (dep[0] == "Rust" and dep[1] == '1.52.1'):
print_msg("NOTE: Rust version has been modified to 1.60.0")
ec['dependencies'][i] = ["Rust", "1.60.0"]
for dep in ec['hiddendependencies']:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the outer loop needed?

Comment thread eb_hooks.py Outdated
for dep in ec['dependencies']:
for i in range(len(ec['dependencies'])):
dep = ec['dependencies'][i]
if isinstance(dep, (list,tuple)) and (dep[0] == "Rust" and dep[1] == '1.52.1'):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think would be good to add an else: part which at the start could just print that a different dependency type is used.

@TopRichard
TopRichard requested a review from trz42 May 5, 2023 09:46
trz42
trz42 previously approved these changes May 5, 2023

@trz42 trz42 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Let's merge it and then try to build some software :-)

@trz42
trz42 self-requested a review May 5, 2023 09:57
@trz42
trz42 dismissed their stale review May 5, 2023 09:57

Some tests are failing ... need to understand why.

truib and others added 2 commits May 10, 2023 13:16

@trz42 trz42 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@trz42
trz42 merged commit 8774328 into NorESSI:nessi.no-2023.04-dev May 10, 2023
@TopRichard
TopRichard deleted the nessi.no-2023.04-Replace-Rust/1.52.1-by-Rust/1.60.0 branch October 9, 2023 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants