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

wgrib2 2.0.8/3.1.1 do not build with Intel oneAPI LLVM compilers #967

Closed
climbfuji opened this issue Jan 25, 2024 · 6 comments
Closed

wgrib2 2.0.8/3.1.1 do not build with Intel oneAPI LLVM compilers #967

climbfuji opened this issue Jan 25, 2024 · 6 comments
Assignees
Labels
bug Something is not working INFRA JEDI Infrastructure NOAA-EMC

Comments

@climbfuji
Copy link
Collaborator

climbfuji commented Jan 25, 2024

Describe the bug

==> Installing wgrib2-2.0.8-izv2torii27jtoc2eqvf3pu5khxb2gfj [74/362]
==> No binary for wgrib2-2.0.8-izv2torii27jtoc2eqvf3pu5khxb2gfj found: installing from source
==> Error: UnboundLocalError: local variable 'comp_sys' referenced before assignment

/home/ubuntu/sandpit/spack-stack/spack/var/spack/repos/builtin/packages/wgrib2/package.py:160, in setup_build_environment:
        157        elif self.spec.compiler.name in ["gcc", "clang", "apple-clang"]:
        158            comp_sys = "gnu_linux"
        159
  >>    160        env.set("COMP_SYS", comp_sys)

This is one of many problems when trying to build wgrib2 (2.0.8 or 3.1.1) with the oneAPI compilers (icx, icpx). Note that with the release of oneAPI 2024.0, Intel has removed the classic C/C++ compilers and for now the best/vetted combination is icx/icpx/ifort.

We therefore need a solution for wgrib2 asap - as a workaround, I will remove wgrib2 from the stack if the Intel oneAPI compilers are used.

To Reproduce
Build with Intel oneAPI LLVM compilers (icx, icpx)

Expected behavior
It recognizes the compiler and builds

System:
New AWS ParallelCluster using Ubuntu 22.04 and Intel oneAPI 2024.0.2 (there are no classic C/C++ compilers anymore)

Additional context
@AlexanderRichert-NOAA @edwardhartnett @aerorahul At first I thought I could fix this along the way because it looked like a simple problem, but solving one problem led to another and I don't have the bandwidth to work on this. I'll therefore remove wgrib2 from the environment if the LLVM/oneAPI compilers are used so that I can continue building and testing (there are other package failures, too) until someone has come up with a solution for wgrib2.

@climbfuji climbfuji added the bug Something is not working label Jan 25, 2024
@climbfuji climbfuji self-assigned this Jan 25, 2024
@climbfuji climbfuji added the INFRA JEDI Infrastructure label Jan 25, 2024
@climbfuji climbfuji changed the title wgrib2 2.0.8 does not build with Intel oneAPI LLVM compilers wgrib2 ~~2.0.8~~ does not build with Intel oneAPI LLVM compilers Jan 26, 2024
@climbfuji climbfuji changed the title wgrib2 ~~2.0.8~~ does not build with Intel oneAPI LLVM compilers wgrib2 2.0.8/3.1.1 do not build with Intel oneAPI LLVM compilers Jan 26, 2024
@climbfuji climbfuji added INFRA JEDI Infrastructure and removed INFRA JEDI Infrastructure labels May 13, 2024
climbfuji added a commit that referenced this issue Aug 5, 2024
…ml (#1200)

1. Based on the functionality to merge modules_${LMOD_OR_TCL}.yaml with modules.yaml, strip out the common settings from moduels_lmod.yaml and modules_tcl.yaml and put them in modules.yaml.

2. Additional updates for building the full unified environment with the oneAPI C/C++ compilers:
    - Add gmake, libbsd, libm to modules exclude list
    - Currently only in the blackpearl site config (once this all works, it can be moved to common/packages_oneapi.yaml): build bison, gmake, libm, libbsd with gcc. That's because bison doesn't build with oneapi (it builds but produces garbage, see bison miscompiled with %oneapi spack/spack#37172)
    - In configs/templates/unified-dev/spack.yaml: exclude jedi-tools-env and ai-env for oneapi, similar to what's done for intel (this was also done in a previous PR, therefore just cleaning up the comments in the file).

With these changes, the unified environment builds with [email protected] with the exception of wgrib2 (see #967 and #1199)
@climbfuji
Copy link
Collaborator Author

A workaround was put in place to skip wgrib2 as dependency with oneapi in all our virtual packages. Hopefully, we'll have an all-new wgrib2 package soon with a cmake build system that also builds with oneapi. This may be the case for the [email protected] release (release 08/15/2024) - tbd.

@edwardhartnett
Copy link
Collaborator

We did the wgrib2-3.4.0 release yesterday, hopefully this will work better.

@climbfuji
Copy link
Collaborator Author

@AlexanderRichert-NOAA Is on PTO this week and I don't have time to work on this before we cut the release branches. Let's have wgrib2 turned off for the oneAPI compilers in the 1.8.0 release (the oneAPI compilers are experimental and on one or two platforms only at the moment), this won't hurt NOAA or anyone else using gcc or Intel classic. In 1.9.0 we can hopefully enable wgrib2 with oneAPI.

@climbfuji
Copy link
Collaborator Author

[email protected] was released today - https://github.com/NOAA-EMC/wgrib2/releases/tag/v3.5.0

Maybe this builds with oneAPI?

@edwardhartnett
Copy link
Collaborator

Yes, the latest release uses oneAPI in the CI system.

@climbfuji
Copy link
Collaborator Author

Closed via #1486

@github-project-automation github-project-automation bot moved this from In Progress to Done in spack-stack-1.9.0 (2024 Q4) Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working INFRA JEDI Infrastructure NOAA-EMC
Projects
Development

No branches or pull requests

3 participants