JCSDA / spack-stack

Creative Commons Zero v1.0 Universal
27 stars 47 forks source link

Unified environment build errors with `ifx` #1279

Open climbfuji opened 2 months ago

climbfuji commented 2 months ago

Describe the bug I am trying to build the full unified environment with the OneAPI compilers (oneapi) using ifx instead of ifort. The following packages don't build:

Except for wgrib2, the packages all fail in the same way:

  >> 35     /home/dom/work/spack-stack/spack-stack-1.8.0/cache/build_stage/spack-stage-landsfcutil-2.4.1-dijmr3dnylycshr6q6cjtbj7ksqzfdue/spack-src/src/co
            nsts.f(1): error #5149: Illegal character in statement label field  [m]
     36      module consts
     37     -^

All of these packages are NOAA-EMC's NCEPLIBS, therefore tagging @AlexanderRichert-NOAA and @edwardhartnett. I checked some of the GitHub packages and I saw that there was recent development for supporting Intel LLVM compilers, but there are no releases yet that contain that code, or the releases aren't in spack yet.

Otherwise, things are looking pretty good!

[ue-oneapi-2024.2.1] [dom@blackpearl spack-stack-1.8.0]$ spack find
==> In environment /home/dom/work/spack-stack/spack-stack-1.8.0/envs/ue-oneapi-2024.2.1
==> 20 root specs
-- no arch / oneapi ---------------------------------------------
[+] crtm@v2.4.1-jedi%oneapi             [+] geos-gcm-env%oneapi         [+] jedi-geos-env%oneapi     [+] madis@4.5%oneapi
[+] crtm@2.4.0.1%oneapi                  -  global-workflow-env%oneapi  [+] jedi-mpas-env%oneapi     [+] neptune-env%oneapi ~espc+python~xnrl
[+] esmf@8.6.1%oneapi  snapshot=none    [+] gmao-swell-env%oneapi       [+] jedi-neptune-env%oneapi  [+] soca-env%oneapi
[+] esmf@8.7.0b11%oneapi  snapshot=b11   -  gsi-env%oneapi               -  jedi-ufs-env%oneapi       -  ufs-srw-app-env%oneapi
[+] ewok-env%oneapi ~cylc+ecflow        [+] jedi-fv3-env%oneapi         [+] jedi-um-env%oneapi       [+] ufs-weather-model-env%oneapi

==> Installed packages
-- linux-oracle9-skylake / gcc@11.4.1 ---------------------------
bison@3.7.4  gcc-runtime@11.4.1  gmake@4.4.1  libbsd@0.10.0

-- linux-oracle9-skylake / oneapi@2024.2.1 ----------------------
antlr@2.7.7                         jedi-base-env@1.0.0                   pixman@0.42.2                py-pyproject-metadata@0.7.1
autoconf@2.69                       jedi-cmake@1.4.0                      pkgconf@1.7.3                py-pyshp@2.3.1
automake@1.16.2                     jedi-fv3-env@1.0.0                    prod-util@2.1.1              py-pytest@8.0.0
awscli-v2@2.13.22                   jedi-geos-env@1.0.0                   proj@9.2.1                   py-python-dateutil@2.8.2
bacio@2.4.1                         jedi-mpas-env@1.0.0                   py-attrs@21.4.0              py-pythran@0.15.0
base-env@1.0.0                      jedi-neptune-env@1.0.0                py-awscrt@0.16.16            py-pytz@2023.3
bdftopcf@1.1                        jedi-um-env@1.0.0                     py-beniget@0.4.1             py-pyxlsb@1.0.10
berkeley-db@18.1.40                 kbproto@1.0.7                         py-boto3@1.34.44             py-pyyaml@6.0.1
boost@1.84.0                        krb5@1.21.2                           py-botocore@1.34.44          py-requests@2.31.0
bufr@12.1.0                         lcms@2.13.1                           py-bottleneck@1.3.7          py-ruamel-yaml@0.17.16
bufr-query@0.0.2                    libaec@1.0.6                          py-calver@2022.6.26          py-ruamel-yaml-clib@0.2.7
bzip2@1.0.8                         libffi@3.4.6                          py-cartopy@0.23.0            py-s3transfer@0.10.0
c-blosc@1.21.5                      libfontenc@1.1.8                      py-certifi@2023.7.22         py-scipy@1.12.0
ca-certificates-mozilla@2023-05-30  libice@1.1.1                          py-cffi@1.15.1               py-semantic-version@2.10.0
cairo@1.16.0                        libjpeg-turbo@2.1.0                   py-cftime@1.0.3.4            py-setuptools@63.4.3
cdo@2.3.0                           libmng@2.0.3                          py-charset-normalizer@3.3.0  py-setuptools-rust@1.6.0
cmake@3.27.9                        libpng@1.6.37                         py-click@8.1.7               py-setuptools-scm@8.0.4
cprnc@1.0.3                         libpthread-stubs@0.5                  py-cloudpickle@2.2.0         py-shapely@1.8.0
crtm@v2.4-jedi.2                    libsm@1.2.4                           py-colorama@0.4.6            py-six@1.16.0
crtm@v2.4.1-jedi                    libtiff@4.5.1                         py-contourpy@1.0.7           py-smmap@5.0.0
crtm@2.4.0.1                        libtirpc@1.3.3                        py-cppy@1.2.1                py-sortedcontainers@2.4.0
crtm-fix@2.4.0.1_emc                libtool@2.4.7                         py-cryptography@38.0.1       py-tblib@1.6.0
curl@8.7.1                          libx11@1.8.7                          py-cycler@0.11.0             py-tomli@2.0.1
diffutils@3.7                       libxau@1.0.11                         py-cython@0.29.36            py-toolz@0.12.0
double-conversion@3.3.0             libxaw@1.0.15                         py-dask@2021.3.0             py-tornado@6.3.3
ecbuild@3.7.2                       libxcb@1.16                           py-distributed@2021.6.2      py-trove-classifiers@2023.8.7
eccodes@2.33.0                      libxcrypt@4.4.35                      py-distro@1.8.0              py-typing-extensions@4.8.0
ecflow@5.11.4                       libxdmcp@1.1.4                        py-docutils@0.19             py-urllib3@1.26.12
eckit@1.27.0                        libxext@1.3.5                         py-eccodes@1.5.0             py-versioneer@0.29
ecmwf-atlas@0.38.1                  libxfont@1.5.4                        py-editables@0.3             py-wcwidth@0.2.7
ectrans@1.2.0                       libxkbcommon@1.5.0                    py-et-xmlfile@1.0.1          py-wheel@0.41.2
eigen@3.4.0                         libxkbfile@1.1.2                      py-f90nml@1.4.3              py-wxflow@0.2.0
elfutils@0.190                      libxml2@2.10.3                        py-findlibs@0.0.2            py-xarray@2023.7.0
esmf@8.6.1                          libxmu@1.1.4                          py-flit-core@3.8.0           py-xlrd@2.0.1
esmf@8.7.0b11                       libxpm@3.5.17                         py-fonttools@4.39.4          py-xlsxwriter@3.1.7
ewok-env@1.0.0                      libxrender@0.9.11                     py-fortranformat@2.0.0       py-xlwt@1.3.0
expat@2.6.2                         libxt@1.3.0                           py-fsspec@2024.2.0           py-zict@3.0.0
fargparse@1.8.0                     libyaml@0.2.5                         py-gast@0.5.4                python@3.11.7
fckit@0.11.0                        lz4@1.9.4                             py-gitdb@4.0.9               python-venv@1.0
fiat@1.2.0                          m4@1.4.19                             py-gitpython@3.1.40          qhull@2020.2
findutils@4.8.0                     madis@4.5                             py-globus-cli@3.16.0         qt@5.15.14
flex@2.6.4                          mapl@2.46.3                           py-globus-sdk@3.25.0         re2c@2.2
fms@2024.02                         mct@2.11.0                            py-h5py@3.11.0               readline@8.2
font-util@1.4.1                     mepo@2.0.0rc4                         py-hatch-vcs@0.3.0           renderproto@0.11.1
fontconfig@2.15.0                   meson@1.3.2                           py-hatchling@1.21.0          rust-bootstrap@1.78.0
fontsproto@2.1.3                    met@11.1.1                            py-idna@3.4                  scotch@7.0.4
freetype@2.13.2                     metis@5.1.0                           py-iniconfig@2.0.0           shumlib@macos_clang_linux_intel_port
g2@3.5.1                            metplus@5.1.0                         py-jinja2@3.1.2              snappy@1.1.10
g2c@1.6.4                           mkfontdir@1.0.7                       py-jmespath@1.0.1            soca-env@1.0.0
g2tmpl@1.13.0                       mkfontscale@1.2.3                     py-kiwisolver@1.4.5          sp@2.5.0
gdbm@1.23                           nasm@2.15.05                          py-locket@1.0.0              sqlite@3.43.2
geos@3.12.1                         nccmp@1.9.0.1                         py-markupsafe@2.1.3          udunits@2.2.28
geos-gcm-env@1.0.0                  ncio@1.1.2                            py-matplotlib@3.8.0          ufs-pyenv@1.0.0
gettext@0.21                        nco@5.1.6                             py-meson-python@0.15.0       ufs-weather-model-env@1.0.0
gftl@1.14.0                         ncurses@6.5                           py-msgpack@1.0.5             util-linux-uuid@2.38.1
gftl-shared@1.9.0                   ncview@2.1.9                          py-netcdf4@1.5.8             util-macros@1.19.3
git@2.43.0                          nemsio@2.5.4                          py-numexpr@2.8.4             w3emc@2.10.0
git-lfs@3.4.1                       nemsiogfs@2.5.3                       py-numpy@1.25.2              w3nco@2.4.1
glib@2.78.3                         neptune-env@1.4.0                     py-openpyxl@3.1.2            wget@1.21.1
glibc@2.34                          netcdf-c@4.9.2                        py-packaging@23.1            which@2.21
gmao-swell-env@1.0.0                netcdf-cxx4@4.3.1                     py-pandas@1.5.3              wrf-io@1.2.0
gobject-introspection@1.78.1        netcdf-fortran@4.6.1                  py-partd@1.4.0               xcb-proto@1.16.0
gperf@3.1                           nghttp2@1.57.0                        py-pathspec@0.11.1           xcb-util@0.4.1
grib-util@1.4.0                     ninja@1.11.1                          py-pillow@9.5.0              xcb-util-image@0.4.1
gsi-ncdiag@1.1.2                    nlohmann-json@3.11.2                  py-pip@23.1.2                xcb-util-keysyms@0.4.1
gsibec@1.2.1                        nlohmann-json-schema-validator@2.3.0  py-pkgconfig@1.5.5           xcb-util-renderutil@0.3.10
gsl@2.7.1                           numactl@2.0.14                        py-pluggy@1.4.0              xcb-util-wm@0.4.2
gsl-lite@0.37.0                     odc@1.5.2                             py-ply@3.11                  xextproto@7.3.0
harfbuzz@8.4.0                      openjpeg@2.3.1                        py-poetry-core@1.8.1         xkbcomp@1.4.6
hdf@4.2.15                          openssl@3.3.0                         py-prompt-toolkit@3.0.38     xkbdata@1.0.1
hdf5@1.14.3                         p4est@2.8                             py-psutil@5.9.5              xproto@7.0.31
icu4c@67.1                          parallel-netcdf@1.12.3                py-pybind11@2.11.0           xtrans@1.5.0
inputproto@2.3.2                    parallelio@2.6.2                      py-pycodestyle@2.11.0        xz@5.4.6
intel-oneapi-mkl@2024.2             patchelf@0.17.2                       py-pycparser@2.21            yafyaml@1.4.0
intel-oneapi-mpi@2021.13            pcre2@10.43                           py-pyhdf@0.10.4              zlib-ng@2.1.6
intel-oneapi-runtime@2024.2.1       perl@5.38.0                           py-pyjwt@2.4.0               zstd@1.5.2
ip@5.0.0                            pflogger@1.14.0                       py-pyparsing@3.1.2
jasper@2.0.32                       pfunit@4.10.0                         py-pyproj@3.6.0
==> 314 installed packages

To Reproduce Use a compiler config like this to install the unified environment:

- compiler:
    spec: oneapi@=2024.2.1
    paths:
      cc: /opt/intel/oneapi/2024.2/bin/icx
      cxx: /opt/intel/oneapi/2024.2/bin/icpx
      f77: /opt/intel/oneapi/2024.2/bin/ifx
      fc: /opt/intel/oneapi/2024.2/bin/ifx
    flags: {}
    operating_system: oracle9
    target: x86_64
    modules: []
    environment:
      # change to append_path once relevant PR is merged
      append_path:
        CPATH: /opt/intel/oneapi/compiler/2024.2/opt/compiler/include/intel64
    extra_rpaths: []

Expected behavior All packages build with icx/icpx/ifx

System: Oracle Linux 9.1 in WSL2

Additional context n/a

AlexanderRichert-NOAA commented 2 months ago

We've added OneAPI support for all NCEPLIBS' develop branches, but a few of them still need releases. Working on it now...

climbfuji commented 2 months ago

No rush! We don't have ifx in the list of supported compilers for 1.8.0 - would be great to have it for 1.9.0.

mathomp4 commented 2 months ago

GEOSgcm v12 should support ifx (and GCC 14) as well is my hope. Maybe even an upcoming version of v11.