Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conditionally add -Wno-unused-command-line-argument to $CFLAGS to fix error when installing imkl-FFTW with RPATH #2975

Merged
merged 3 commits into from
Aug 8, 2023

Conversation

casparvl
Copy link
Contributor

@casparvl casparvl commented Aug 4, 2023

Fix for easybuilders/easybuild-easyconfigs#18439 (comment) which pops up as:

icx: error: -Wl,-rpath=$ORIGIN/../lib64: 'linker' input unused [-Werror,-Wunused-command-line-argument]
icx: error: -Wl,--disable-new-dtags: 'linker' input unused [-Werror,-Wunused-command-line-argument]

@casparvl
Copy link
Contributor Author

casparvl commented Aug 4, 2023

Test report by @casparvl

Overview of tested easyconfigs (in order)

Build succeeded for 11 out of 23 (8 easyconfigs in total)
tcn174.local.snellius.surf.nl - Linux RHEL 8.6, x86_64, AMD EPYC 7H12 64-Core Processor, Python 3.6.8
See https://gist.github.com/casparvl/db7d09a93a3330968889beab080dac2d for a full test report.

@casparvl
Copy link
Contributor Author

casparvl commented Aug 4, 2023

Ugh, I'm getting failures because I'm exceeding my inode quotum... Will cleanup first, then retry...

# Avoid unused command line arguments (-Wl,rpath...) causeing errors when using RPATH
# See https://github.com/easybuilders/easybuild-easyconfigs/pull/18439#issuecomment-1662671054
if build_option('rpath'):
cflags = flags + ' -Wno-unused-command-line-argument'
Copy link
Member

Choose a reason for hiding this comment

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

This option is probably only supported for Intel oneAPI (Clang-based) compilers, so this needs an extra condition?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had some discussion on Slack. This is correct: it's supported by Clang-based compilers. Hence we should limit it to those. The problem that I'm trying to address in this PR should also only occur for Clang based compilers (that's why we haven't run into it with prior versions if imkl-fftw: we didn't use the oneAPI compilers yet by default there).

@bedroge
Copy link
Contributor

bedroge commented Aug 4, 2023

Looks like the same issue as this one: #2910 (which I tried to fix with #2912).

@casparvl
Copy link
Contributor Author

casparvl commented Aug 4, 2023

Test report by @casparvl

Overview of tested easyconfigs (in order)

  • SUCCESS imkl-FFTW-2022.2.1-iimpi-2022b.eb
  • SUCCESS imkl-FFTW-2022.2.1-iimpi-2022.11.eb
  • SUCCESS imkl-FFTW-2022.1.0-iimpi-2022a.eb
  • SUCCESS imkl-FFTW-2021.4.0-iimpi-2021b.eb
  • SUCCESS impi-2021.9.0-intel-compilers-2023.1.0.eb
  • SUCCESS impi-2021.8.0-intel-compilers-2023.0.0.eb
  • SUCCESS intel-compilers-2022.2.0.eb
  • SUCCESS iimpi-2023a.eb
  • SUCCESS iimpi-2023.03.eb
  • SUCCESS iimpi-2022.12.eb
  • SUCCESS imkl-FFTW-2023.1.0-iimpi-2023a.eb
  • SUCCESS imkl-FFTW-2023.1.0-iimpi-2023.03.eb
  • SUCCESS imkl-FFTW-2023.0.0-iimpi-2022.12.eb
  • SUCCESS impi-2021.7.0-intel-compilers-2022.2.0.eb
  • SUCCESS iimpi-2022.09.eb
  • SUCCESS imkl-FFTW-2022.2.0-iimpi-2022.09.eb

Build succeeded for 16 out of 16 (8 easyconfigs in total)
tcn174.local.snellius.surf.nl - Linux RHEL 8.6, x86_64, AMD EPYC 7H12 64-Core Processor, Python 3.6.8
See https://gist.github.com/casparvl/1520e3ad48145b0e1a58388bafff2a0f for a full test report.

@casparvl
Copy link
Contributor Author

casparvl commented Aug 7, 2023

Looks like the same issue as this one: #2910 (which I tried to fix with #2912).

Arrggg, why do I have such a terrible memory, I even commented in that issue...

So, @bedroge @boegel any preference? @bedroge 's approach is a bit more targetted. That has the advantage that we know this change has to be made for intel-compilers when using the oneapi compilers. My PR would also include clang compiling FFTW. That would probably work, but is untested. One could argue that it is easy enough to add clang to the if-statement in @bedroge 's PR once it is relevant.

The downside is there was some issue with --read-only-installdir it seems, in @bedroge 's PR? Though @boegel wasn't sure.

@boegel boegel modified the milestones: 4.x, next release (4.8.1?) Aug 8, 2023
@boegel boegel changed the title Fix unused cmd line argument error for use of RPATH + imkl-fftw conditionally add -Wno-unused-command-line-argument to $CFLAGS to fix error when installing imkl-FFTW with RPATH Aug 8, 2023
easybuild/easyblocks/i/imkl.py Outdated Show resolved Hide resolved
@boegel
Copy link
Member

boegel commented Aug 8, 2023

The approach takes in #2912 highlight a problem with imkl-FFTW which we should fix first, but the changes here are OK short-term (it doesn't make a bad situation worse, and it's a reasonable fix for the problem), so let's merge this PR, and revisit #2912 once imkl-FFTW has been changed to not build the FFTW interfaces directly in the imkl installation directory.

@boegel
Copy link
Member

boegel commented Aug 8, 2023

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS imkl-FFTW-2021.4.0-gompi-2021b.eb
  • SUCCESS imkl-FFTW-2021.4.0-iimpi-2021b.eb
  • SUCCESS imkl-FFTW-2022.0.1-iimpi-2022.00.eb
  • SUCCESS imkl-FFTW-2022.1.0-iimpi-2022.05.eb
  • SUCCESS imkl-FFTW-2022.1.0-iimpi-2022a.eb
  • SUCCESS imkl-FFTW-2022.2.0-iimpi-2022.09.eb
  • SUCCESS imkl-FFTW-2022.2.1-iimpi-2022.11.eb
  • SUCCESS imkl-FFTW-2022.2.1-iimpi-2022b.eb
  • SUCCESS imkl-FFTW-2023.0.0-iimpi-2022.12.eb
  • SUCCESS imkl-FFTW-2023.1.0-iimpi-2023.03.eb
  • SUCCESS imkl-FFTW-2023.1.0-iimpi-2023a.eb

Build succeeded for 11 out of 11 (11 easyconfigs in total)
node3115.skitty.os - Linux RHEL 8.6, x86_64, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz (skylake_avx512), Python 3.6.8
See https://gist.github.com/boegel/7f016d8756ace156914b0be74818b1ad for a full test report.

@boegel boegel merged commit 8893856 into easybuilders:develop Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants