Skip to content

py-scipy: Set Fortran_std correctly for builds with AOCC and llvm-flang#46922

Merged
adamjstewart merged 1 commit intospack:developfrom
amd-toolchain-support:scipy_aocc
Oct 13, 2024
Merged

py-scipy: Set Fortran_std correctly for builds with AOCC and llvm-flang#46922
adamjstewart merged 1 commit intospack:developfrom
amd-toolchain-support:scipy_aocc

Conversation

@amd-toolchain-support
Copy link
Copy Markdown
Contributor

AOCC and LLVM Flang @18: require fortran std to be set to none rather than legacy for meson builds.

Copy link
Copy Markdown
Contributor

@bernhardkaindl bernhardkaindl left a comment

Choose a reason for hiding this comment

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

Build results on Ubuntu 22.04.4 LTS:

bin/spack find --variants py-scipy
-- linux-ubuntu22.04-skylake / gcc@13.1.0 -----------------------
py-scipy@1.14.1

Generated by https://github.com/spack/build-quality-tools/blob/main/build_pr_changes.py

/home/bkaindl/build-quality-tools/build_pr_changes.py --approve --yes

Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

Would like to hear from @rgommers before merging

@adamjstewart adamjstewart self-assigned this Oct 12, 2024
@bernhardkaindl bernhardkaindl added the waiting-on-maintainer Waiting on a review from the package maintainer label Oct 12, 2024
Copy link
Copy Markdown
Contributor

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

This LGTM. I need to figure out what the problem is in Meson with using legacy, but this can't hurt so fine to merge.

@rgommers
Copy link
Copy Markdown
Contributor

An FYI on this one: for SciPy 1.15.0, I disabled the use of -std=legacy completely for all compilers except gfortran: scipy/scipy#21917.

@adamjstewart
Copy link
Copy Markdown
Member

Should we change it to:

if spec.satisfies("%gcc"):
    fortran_std = "legacy"
else:
    fortran_std = "none"

? It's tricky because people often mix compilers, e.g., Apple Clang + GFortran. @alalazo is the new compilers as dependencies logic mature enough to detect this yet, or is that still a work in progress?

@rgommers
Copy link
Copy Markdown
Contributor

Either way works I think, the problem is probably already solved well enough, but it also can't hurt to match the change I made in SciPy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python update-package waiting-on-maintainer Waiting on a review from the package maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants