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

avoid warnings being treated as errors when installing imkl-FFTW with Intel OneAPI compilers and RPATH linking

Open bedroge opened this issue 2 years ago • 7 comments

Fixes #2910.

bedroge avatar Mar 21 '23 09:03 bedroge

Test report by @bedroge

Overview of tested easyconfigs (in order)

  • SUCCESS imkl-FFTW-2022.2.1-iimpi-2022b.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total) bob-Latitude-5300 - Linux Ubuntu 22.04, x86_64, Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz, Python 3.10.6 See https://gist.github.com/bedroge/4433cb44def303f477a1b3a8dcd1ed5b for a full test report.

bedroge avatar Mar 21 '23 09:03 bedroge

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.2.1-iimpi-2022b.eb

Build succeeded for 3 out of 3 (3 easyconfigs in total) node3101.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/cf9bbf2fb8a620bb0cf0f3cafa6551e1 for a full test report.

boegel avatar Apr 12 '23 16:04 boegel

Test report by @boegel

Overview of tested easyconfigs (in order)

  • FAIL (build issue) imkl-FFTW-2022.2.1-iimpi-2022b.eb (partial log available at https://gist.github.com/boegel/eea3cac2f8b8854a2296eac2338f184b)

Build succeeded for 0 out of 1 (1 easyconfigs in total) node3101.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/42a8e2f97b73d39a673c5b90c7cc098e for a full test report.

edit: tested with eb --rpath --read-only-installdir

boegel avatar Apr 12 '23 16:04 boegel

@bedroge My last test report with --rpath failed because I also have EasyBuild configured with --read-only-installdir, so before you try to patch makefile you need to make sure that file is writable, and the directory it is in, is writable:

== 2023-04-12 18:50:48,339 filetools.py:1665 INFO Applying following regex substitutions to ['/software/imkl/2022.2.1/mkl/2022.2.1/interfaces/fftw2x_cdft/makefile']: [('-Werror', '-Werror -Wno-unused-command-line-argument')]
== 2023-04-12 18:50:48,340 filetools.py:1933 DEBUG Not creating existing path /software/imkl/2022.2.1/mkl/2022.2.1/interfaces/fftw2x_cdft
== 2023-04-12 18:50:48,555 build_log.py:171 ERROR EasyBuild crashed with an error (at easybuild/easybuild-framework/easybuild/base/exceptions.py:126 in __init__): Failed to copy file /software/imkl/2022.2.1/mkl/2022.2.1/interfaces/fftw2x_cdft/makefile to /software/imkl/2022.2.1/mkl/2022.2.1/interfaces/fftw2x_cdft/makefile.orig.eb: [Errno 13] Permission denied: '/software/imkl/2022.2.1/mkl/2022.2.1/interfaces/fftw2x_cdft/makefile.orig.eb' (at easybuild/easybuild-framework/easybuild/tools/filetools.py:2439 in copy_file)

edit: hmm, not sure this actually explains what's going on, because the changing of permissions triggered by using --read-only-installdir is only done in the permissions step which is run after the post_install step...

boegel avatar Apr 12 '23 17:04 boegel

Ugh, I did:

eb imkl-FFTW-2023.1.0-iimpi-2023a.eb imkl-FFTW-2023.1.0-iimpi-2023.03.eb imkl-FFTW-2023.0.0-iimpi-2022.12.eb imkl-FFTW-2022.2.1-iimpi-2022b.eb imkl-FFTW-2022.2.1-iimpi-2022.11.eb imkl-FFTW-2022.2.0-iimpi-2022.09.eb imkl-FFTW-2022.1.0-iimpi-2022a.eb imkl-FFTW-2021.4.0-iimpi-2021b.eb --accept-eula-for=Intel-oneAPI --include-easyblocks-from-pr 2912 -r --rebuild --upload-test-report

Builds were succesful, but failed at uploading test report: urllib.error.HTTPError: HTTP Error 502: Bad Gateway. Anyway, hereby: the same list on the same system as https://github.com/easybuilders/easybuild-easyblocks/pull/2975#issuecomment-1665990321 completed succesfully with this PR.

I'll retrigger the build, it should take about 90 minutes or so. See if it uploads succesfully then...

casparvl avatar Aug 07 '23 13:08 casparvl

Test report by @casparvl

Overview of tested easyconfigs (in order)

  • 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 imkl-FFTW-2022.2.1-iimpi-2022b.eb
  • SUCCESS imkl-FFTW-2022.2.1-iimpi-2022.11.eb
  • SUCCESS imkl-FFTW-2022.2.0-iimpi-2022.09.eb
  • SUCCESS imkl-FFTW-2022.1.0-iimpi-2022a.eb
  • SUCCESS imkl-FFTW-2021.4.0-iimpi-2021b.eb

Build succeeded for 8 out of 8 (8 easyconfigs in total) tcn375.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/7f7fc6eb2c3180d1ae4ab4b8a7480a94 for a full test report.

casparvl avatar Aug 07 '23 14:08 casparvl

@bedroge My last test report with --rpath failed because I also have EasyBuild configured with --read-only-installdir, so before you try to patch makefile you need to make sure that file is writable, and the directory it is in, is writable:

== 2023-04-12 18:50:48,339 filetools.py:1665 INFO Applying following regex substitutions to ['/software/imkl/2022.2.1/mkl/2022.2.1/interfaces/fftw2x_cdft/makefile']: [('-Werror', '-Werror -Wno-unused-command-line-argument')]
== 2023-04-12 18:50:48,340 filetools.py:1933 DEBUG Not creating existing path /software/imkl/2022.2.1/mkl/2022.2.1/interfaces/fftw2x_cdft
== 2023-04-12 18:50:48,555 build_log.py:171 ERROR EasyBuild crashed with an error (at easybuild/easybuild-framework/easybuild/base/exceptions.py:126 in __init__): Failed to copy file /software/imkl/2022.2.1/mkl/2022.2.1/interfaces/fftw2x_cdft/makefile to /software/imkl/2022.2.1/mkl/2022.2.1/interfaces/fftw2x_cdft/makefile.orig.eb: [Errno 13] Permission denied: '/software/imkl/2022.2.1/mkl/2022.2.1/interfaces/fftw2x_cdft/makefile.orig.eb' (at easybuild/easybuild-framework/easybuild/tools/filetools.py:2439 in copy_file)

edit: hmm, not sure this actually explains what's going on, because the changing of permissions triggered by using --read-only-installdir is only done in the permissions step which is run after the post_install step...

After looking at this again with @casparvl, I now understand this better.

The patching of the makefile is being done in the imkl installation directory when installing imkl-FFTW. That explains the Permission denied when EasyBuild is configuring with --read-only-installdir: it's correctly pointing out that imkl-FFTW has no business changing stuff in the imkl installation.

The changes in this PR don't cause that, but they do point out a problem with the imkl-FFTW easyblock: it shouldn't be running the build of the FFTW interfaces from the imkl installation directory, but it should copy the necessary files to the imkl-FFTW build directory first, and run the build from there instead.

With that in mind, I think we shouldn't merge this PR as is yet, we should tackle that problem first (to avoid making a bad situation worse). We can merge the alternative fix in #2975 as a short-term solution for the problem being fixed, but I think in general the approach taken here (patching the makefile to -Wno-unused-* is added) is preferably over just blindly adding -Wno-unused-* to $CFLAGS as is done in #2975.

boegel avatar Aug 08 '23 10:08 boegel