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

oneAPI compiler errors when building ACCESS-ESM1.6 with Spack #46

Open
manodeep opened this issue Feb 18, 2025 · 6 comments
Open

oneAPI compiler errors when building ACCESS-ESM1.6 with Spack #46

manodeep opened this issue Feb 18, 2025 · 6 comments

Comments

@manodeep
Copy link

# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.

# Build with:
# - UM7 from dev-access-esm1.6 branch
# - MOM5 from development branch
# - CICE4 from ESM1.5 and change to CICE5 once CICE5 SPR has been updated.
spack:
  specs:
    - access-esm1p6@git.dev_2024.12.0
  packages:
    # Direct ACCESS-NRI dependencies
    # Note: some packages have branch-specific logic and hence can't use
    # the usual '@git.DATE' calver (https://calver.org) format, instead
    # requiring a `@git.DATE=BRANCH` version.
    mom5:
      require:
        - '@git.dev_2024.08.14=access-esm1.6'
        - '+access-gtracers'
    cice4:
      require:
        - '@git.2024.05.21=access-esm1.5'
    um7:
      require:
        - '@git.dev-access-esm1.6=access-esm1.6'
    # Lower-level ACCESS-NRI dependencies
    gcom4:
      require:
        - '@git.2024.05.28=access-esm1.5'
    oasis3-mct:
      require:
        - '@git.access-esm1.5_2024.05.24=access-esm1.5'
    # Other dependencies
    openmpi:
      require:
        - '@4.0.2'
    netcdf-c:
      require:
        - '@4.7.4'
    netcdf-fortran:
      require:
        - '@4.5.2'
    hdf5:
      require:
        - '@1.10.11'
    access-fms:
      require:
        - '@git.dev_2024.12.0'
    access-generic-tracers:
      require:
        - '@git.dev_2024.12.0'
    access-mocsy:
      require:
        - '@git.2017.12.0'
    gcc-runtime:
        require:
          - '%gcc@14.1.0'

    # Preferences for all packages
    all:
      require:
        - '%oneapi@2024.2.1'
        - 'target=x86_64_v4'
  view: true
  concretizer:
    reuse: false
    unify: false

  modules:
    default:
      tcl:
        include:
          - access-esm1p6
          - cice4
          - um7
          - mom5
        projections:
          access-esm1p6: '{name}/dev_2024.12.0'
          cice4: '{name}/2024.05.21-{hash:7}'
          um7: '{name}/dev-access-esm1.6-{hash:7}'
          mom5: '{name}/dev_2024.08.14-{hash:7}'
  config:
    install_tree:
      root: $spack/../restricted/ukmo/release
    source_cache: $spack/../restricted/ukmo/source_cache
    build_stage:
    - $TMPDIR/restricted/spack-stage

Resulted in the following concretization:

[esm1p6-dev] [~/codes/access-nri/ACCESS-ESM1.6 @gadi09] time spack concretize -f --fresh
==> Starting concretization
==> Warning: using "cmake@3.24.2" which is a deprecated version
==> Environment concretized in 100.14 seconds
==> Concretized access-esm1p6@git.dev_2024.12.0=2024.12.0
 -   t2phgn2  access-esm1p6@git.dev_2024.12.0=2024.12.0%oneapi@2024.2.1+generic-tracers build_system=bundle cice=4 um=access-esm1.6 arch=linux-rocky8-x86_64_v4
 -   wtgw6xz      ^cice4@git.2024.05.21=access-esm1.5%oneapi@2024.2.1 build_system=makefile arch=linux-rocky8-x86_64_v4
 -   wjn2zyj          ^gmake@4.4.1%oneapi@2024.2.1~guile build_system=generic arch=linux-rocky8-x86_64_v4
 -   o4m647g          ^netcdf-fortran@4.5.2%oneapi@2024.2.1~doc+pic+shared build_system=autotools patches=b050dbd arch=linux-rocky8-x86_64_v4
 -   yces7ke          ^oasis3-mct@git.access-esm1.5_2024.05.24=access-esm1.5%oneapi@2024.2.1~deterministic~optimisation_report build_system=makefile arch=linux-rocky8-x86_64_v4
 -   ocbyjtx              ^hdf5@1.10.11%oneapi@2024.2.1~cxx~fortran+hl~ipo~java+mpi+shared~szip~threadsafe+tools api=default build_system=cmake build_type=Release generator=make arch=linux-rocky8-x86_64_v4
 -   d6zubde                  ^pkgconf@2.2.0%oneapi@2024.2.1 build_system=autotools arch=linux-rocky8-x86_64_v4
 -   al4knrk                  ^zlib-ng@2.1.6%oneapi@2024.2.1+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-rocky8-x86_64_v4
[e]  rd7th3i          ^openmpi@4.0.2%oneapi@2024.2.1~atomics~cuda~cxx~cxx_exceptions~gpfs~internal-hwloc~internal-libevent~internal-pmix~java~legacylaunchers~lustre~memchecker~openshmem~orterunprefix~romio+rsh~singularity~static+vt+wrapper-rpath build_system=autotools fabrics=none patches=073477a,60ce20b romio-filesystem=none schedulers=none arch=linux-rocky8-x86_64_v4
[e]  66wotfq      ^glibc@2.28%oneapi@2024.2.1 build_system=autotools arch=linux-rocky8-x86_64_v4
 -   e77bzfl      ^intel-oneapi-runtime@2024.2.1%oneapi@2024.2.1 build_system=generic arch=linux-rocky8-x86_64_v4
 -   tgv3p3a          ^gcc-runtime@14.1.0%gcc@14.1.0 build_system=generic arch=linux-rocky8-x86_64_v4
 -   tw4v4xf      ^mom5@git.dev_2024.08.14=access-esm1.6%oneapi@2024.2.1+access-gtracers~deterministic~optimisation_report+restart_repro build_system=makefile type=ACCESS-ESM arch=linux-rocky8-x86_64_v4
 -   izwsq76          ^access-fms@git.dev_2024.12.0=2024.12.1%oneapi@2024.2.1+gfs_phys+internal_file_nml~ipo~large_file build_system=cmake build_type=Release generator=make arch=linux-rocky8-x86_64_v4
[e]  azchyj2              ^cmake@3.24.2%oneapi@2024.2.1~doc+ncurses+ownlibs build_system=generic build_type=Release arch=linux-rocky8-x86_64_v4
 -   ba673ae          ^access-generic-tracers@git.dev_2024.12.0=2024.12.1%oneapi@2024.2.1~ipo build_system=cmake build_type=Release generator=make arch=linux-rocky8-x86_64_v4
 -   2m5sviq              ^access-mocsy@git.2017.12.0=2017.12.0%oneapi@2024.2.1 build_system=makefile arch=linux-rocky8-x86_64_v4
 -   mbj7iws          ^netcdf-c@4.7.4%oneapi@2024.2.1~blosc~byterange~dap~fsync~hdf4~jna+mpi~nczarr_zip+optimize~parallel-netcdf+pic+shared~szip~zstd build_system=autotools arch=linux-rocky8-x86_64_v4
 -   zofeycp      ^um7@git.dev-access-esm1.6=access-esm1.6%oneapi@2024.2.1 build_system=generic optim=high arch=linux-rocky8-x86_64_v4
 -   asiycgk          ^dummygrib@1.0%oneapi@2024.2.1 build_system=makefile arch=linux-rocky8-x86_64_v4
 -   i5qahte          ^fcm@2021.05.0%oneapi@2024.2.1 build_system=generic site=none arch=linux-rocky8-x86_64_v4
 -   qzwlaxf          ^gcom4@git.2024.05.28=access-esm1.5%oneapi@2024.2.1+mpi build_system=generic arch=linux-rocky8-x86_64_v4


real    2m19.613s
user    0m56.620s
sys     0m26.919s

The next step for spack install fails with multiple compilation errors.

@manodeep
Copy link
Author

[esm1p6-dev] [~/codes/access-nri/ACCESS-ESM1.6 @gadi09] time spack install &> spack_install_with_oneapi_reuse_and_unify_are_false.log

real    10m54.319s
user    12m18.929s
sys     5m5.433s

@manodeep
Copy link
Author

Building error for oasis3-mct:

==> Installing oasis3-mct-git.access-esm1.5_2024.05.24=access-esm1.5-yces7kewopaua25b7nipy2ynlgyon7bh [16/22]
==> No binary for oasis3-mct-git.access-esm1.5_2024.05.24=access-esm1.5-yces7kewopaua25b7nipy2ynlgyon7bh found: installing from source
==> No patches needed for oasis3-mct
==> oasis3-mct: Executing phase: 'edit'
==> oasis3-mct: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-f' 'TopMakefileOasis3'

23 errors found in build log:
     84     <scratch space>:14:1: note: expanded from here
     85        14 | get_ztick_
     86           | ^
     87     2 warnings generated.
     88     mpifort -c  -I. -I../ -DSYSLINUX -DCPRINTEL -O2  -fp-model precise -fp-model source -align all -g3 -O2 -xCORE-AVX512 -debug all -check none -traceback -ip  -diag-disable 10010  m_mpif.F90
     89     ifx: command line warning #10148: option '-ip' not supported
  >> 90     m_mpif.F90(60): error #5102: Cannot open include file 'mpif.h'
     91     	  include "mpif.h"
     92     ------------------^
  >> 93     m_mpif.F90(35): error #6404: This name does not have a type, and must have an explicit type.   [MPI_INTEGER]
     94     	  public :: MPI_INTEGER
     95     --------------------^
  >> 96     m_mpif.F90(36): error #6404: This name does not have a type, and must have an explicit type.   [MPI_REAL]
     97     	  public :: MPI_REAL
     98     --------------------^
  >> 99     m_mpif.F90(37): error #6404: This name does not have a type, and must have an explicit type.   [MPI_DOUBLE_PRECISION]
     100    	  public :: MPI_DOUBLE_PRECISION
     101    --------------------^
  >> 102    m_mpif.F90(38): error #6404: This name does not have a type, and must have an explicit type.   [MPI_LOGICAL]
     103    	  public :: MPI_LOGICAL
     104    --------------------^
  >> 105    m_mpif.F90(39): error #6404: This name does not have a type, and must have an explicit type.   [MPI_CHARACTER]
     106    	  public :: MPI_CHARACTER
     107    --------------------^
  >> 108    m_mpif.F90(41): error #6404: This name does not have a type, and must have an explicit type.   [MPI_REAL4]
     109    	  public :: MPI_REAL4
     110    --------------------^
  >> 111    m_mpif.F90(42): error #6404: This name does not have a type, and must have an explicit type.   [MPI_REAL8]
     112    	  public :: MPI_REAL8
     113    --------------------^
  >> 114    m_mpif.F90(44): error #6404: This name does not have a type, and must have an explicit type.   [MPI_COMM_WORLD]
     115    	  public :: MPI_COMM_WORLD
     116    --------------------^
  >> 117    m_mpif.F90(45): error #6404: This name does not have a type, and must have an explicit type.   [MPI_COMM_NULL]
     118    	  public :: MPI_COMM_NULL
     119    --------------------^
  >> 120    m_mpif.F90(47): error #6404: This name does not have a type, and must have an explicit type.   [MPI_SUM]
     121    	  public :: MPI_SUM
     122    --------------------^
  >> 123    m_mpif.F90(48): error #6404: This name does not have a type, and must have an explicit type.   [MPI_PROD]
     124    	  public :: MPI_PROD
     125    --------------------^
  >> 126    m_mpif.F90(49): error #6404: This name does not have a type, and must have an explicit type.   [MPI_MIN]
     127    	  public :: MPI_MIN
     128    --------------------^
  >> 129    m_mpif.F90(50): error #6404: This name does not have a type, and must have an explicit type.   [MPI_MAX]
     130      	  public :: MPI_MAX
     131    --------------------^
  >> 132    m_mpif.F90(52): error #6404: This name does not have a type, and must have an explicit type.   [MPI_MAX_ERROR_STRING]
     133    	  public :: MPI_MAX_ERROR_STRING
     134    --------------------^
  >> 135    m_mpif.F90(53): error #6404: This name does not have a type, and must have an explicit type.   [MPI_STATUS_SIZE]
     136    	  public :: MPI_STATUS_SIZE
     137    --------------------^
  >> 138    m_mpif.F90(54): error #6404: This name does not have a type, and must have an explicit type.   [MPI_ANY_SOURCE]
     139    	  public :: MPI_ANY_SOURCE
     140    --------------------^
     141    compilation aborted for m_mpif.F90 (code 1)
  >> 142    make[3]: *** [Makefile:71: m_mpif.o] Error 1
     143    make[3]: Leaving directory '/scratch/tm70/ms2335/tmp/restricted/spack-stage/spack-stage-oasis3-mct-git.access-esm1.5_2024.05.24_access-esm1.5-yces7kewopaua25b7nipy2ynlgyon7bh/spack-src/compile_oa3-mct/build/lib/mctdir/
            mpeu'
  >> 144    make[2]: *** [Makefile:10: subdirs] Error 2
     145    make[2]: Leaving directory '/scratch/tm70/ms2335/tmp/restricted/spack-stage/spack-stage-oasis3-mct-git.access-esm1.5_2024.05.24_access-esm1.5-yces7kewopaua25b7nipy2ynlgyon7bh/spack-src/compile_oa3-mct/build/lib/mctdir'
  >> 146    cp: cannot stat './*/lib*.a': No such file or directory
  >> 147    cp: cannot stat './*/*.mod': No such file or directory
  >> 148    make[1]: *** [TopMakefileOasis3:55: makemct] Error 1
     149    make[1]: Leaving directory '/scratch/tm70/ms2335/tmp/restricted/spack-stage/spack-stage-oasis3-mct-git.access-esm1.5_2024.05.24_access-esm1.5-yces7kewopaua25b7nipy2ynlgyon7bh/spack-src/util/make_dir'
  >> 150    make: *** [TopMakefileOasis3:28: default] Error 2

See build log for details:
  /scratch/tm70/ms2335/tmp/restricted/spack-stage/spack-stage-oasis3-mct-git.access-esm1.5_2024.05.24_access-esm1.5-yces7kewopaua25b7nipy2ynlgyon7bh/spack-build-out.txt

==> Warning: Skipping build of cice4-git.2024.05.21=access-esm1.5-wtgw6xz233i7p464uea75yapxlmlw6oa since oasis3-mct-git.access-esm1.5_2024.05.24=access-esm1.5-yces7kewopaua25b7nipy2ynlgyon7bh failed

@manodeep
Copy link
Author

Building error for access-fms:

==> Installing access-fms-git.dev_2024.12.0=2024.12.1-izwsq76qdybbelrmf5hqvn2cnddwwxrz [17/22]
==> No binary for access-fms-git.dev_2024.12.0=2024.12.1-izwsq76qdybbelrmf5hqvn2cnddwwxrz found: installing from source
==> No patches needed for access-fms
==> access-fms: Executing phase: 'cmake'
==> Error: ProcessError: Command exited with status 1:
    '/apps/cmake/3.24.2/bin/cmake' '-G' 'Unix Makefiles' '-DCMAKE_INSTALL_PREFIX:STRING=/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/access-fms-git.dev_2024.12.0_2024.12.1-izwsq76qdybbelrmf5hqvn2cnddwwxrz' '-DCMAKE_BUILD_TYPE:STRING=Release' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=OFF' '-DCMAKE_POLICY_DEFAULT_CMP0090:STRING=NEW' '-DCMAKE_FIND_USE_PACKAGE_REGISTRY:BOOL=OFF' '-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON' '-DCMAKE_INSTALL_RPATH:STRING=/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/access-fms-git.dev_2024.12.0_2024.12.1-izwsq76qdybbelrmf5hqvn2cnddwwxrz/lib;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/access-fms-git.dev_2024.12.0_2024.12.1-izwsq76qdybbelrmf5hqvn2cnddwwxrz/lib64;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/intel-oneapi-runtime-2024.2.1-e77bzfloyijfih7lb5gqaoxq73mqjyul/lib;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/gcc-14.1.0/gcc-runtime-14.1.0-tgv3p3aaw6n6r6uw5v2zdwztxxbimasr/lib;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/netcdf-c-4.7.4-mbj7iwszazqcgf5zpiqnndcicokcvaum/lib;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/hdf5-1.10.11-ocbyjtxheur5zzayydbgaww2j6in6nwt/lib;/apps/openmpi/4.0.2/lib;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/zlib-ng-2.1.6-al4knrktgnaem2iz6dvobjmuz2t3mygp/lib;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/netcdf-fortran-4.5.2-o4m647gx43thtkyclxs53spajkxkml35/lib' '-DCMAKE_PREFIX_PATH:STRING=/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/netcdf-fortran-4.5.2-o4m647gx43thtkyclxs53spajkxkml35;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/netcdf-c-4.7.4-mbj7iwszazqcgf5zpiqnndcicokcvaum;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/hdf5-1.10.11-ocbyjtxheur5zzayydbgaww2j6in6nwt;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/zlib-ng-2.1.6-al4knrktgnaem2iz6dvobjmuz2t3mygp;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/gmake-4.4.1-wjn2zyjqr6a4sr4k4pvwa3mvqg3zsizn;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/oneapi-2024.2.1/intel-oneapi-runtime-2024.2.1-e77bzfloyijfih7lb5gqaoxq73mqjyul;/g/data/tm70/ms2335/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/gcc-14.1.0/gcc-runtime-14.1.0-tgv3p3aaw6n6r6uw5v2zdwztxxbimasr;/apps/openmpi/4.0.2;/apps/cmake/3.24.2' '-DGFS_PHYS:BOOL=ON' '-DLARGEFILE:BOOL=OFF' '-DINTERNAL_FILE_NML:BOOL=ON' '/scratch/tm70/ms2335/tmp/restricted/spack-stage/spack-stage-access-fms-git.dev_2024.12.0_2024.12.1-izwsq76qdybbelrmf5hqvn2cnddwwxrz/spack-src'

1 error found in build log:
     7     -- Check for working C compiler: /g/data/tm70/ms2335/spack/0.22/spack/lib/spack/env/oneapi/icx - skipped
     8     -- Detecting C compile features
     9     -- Detecting C compile features - done
     10    -- Detecting Fortran compiler ABI info
     11    -- Detecting Fortran compiler ABI info - done
     12    -- Check for working Fortran compiler: /g/data/tm70/ms2335/spack/0.22/spack/lib/spack/env/oneapi/ifx - skipped
  >> 13    CMake Error at CMakeLists.txt:86 (message):
     14      Fortran compiler IntelLLVM is unsupported
     15    
     16    
     17    -- Configuring incomplete, errors occurred!
     18    See also "/scratch/tm70/ms2335/tmp/restricted/spack-stage/spack-stage-access-fms-git.dev_2024.12.0_2024.12.1-izwsq76qdybbelrmf5hqvn2cnddwwxrz/spack-build-izwsq76/CMakeFiles/CMakeOutput.log".

See build log for details:
  /scratch/tm70/ms2335/tmp/restricted/spack-stage/spack-stage-access-fms-git.dev_2024.12.0_2024.12.1-izwsq76qdybbelrmf5hqvn2cnddwwxrz/spack-build-out.txt

==> Error: access-esm1p6-git.dev_2024.12.0=2024.12.0-t2phgn2r45bwtudmuaqzugd6wk25sgxp: Package was not installed
==> Error: Installation request failed.  Refer to reported errors for failing package(s).
==> Updating view at /g/data/tm70/ms2335/spack/0.22/environments/esm1p6-dev/.spack-env/view

@harshula harshula changed the title Create spack package for ESM1.6 with oneAPI oneAPI compiler errors when building ACCESS-ESM1.6 with Spack Feb 20, 2025
@github-project-automation github-project-automation bot moved this to New Issues 🌅 in Model Release Feb 20, 2025
@harshula
Copy link
Contributor

harshula commented Feb 27, 2025

Hi @manodeep ,

  1. I'm able to compile access-fms@git.mom5-dev-2025.02.3 with oneapi@2025.0.4.
  2. I'm able to compile access-mocsy@git.2017.12.0 with oneapi@2025.0.4.
  3. I'm able to compile access-generic-tracers@git.dev-2025.02.1 with oneapi@2025.0.4.
  4. oasis3-mct fails with an Internal compiler error with oneapi@2025.0.4

@manodeep
Copy link
Author

@harshula Are you compiling these packages separately or as a part of a ESM1.6 config?

@harshula
Copy link
Contributor

Hi @manodeep , Yes, I'm building each of these packages separately. That's the first step to debugging build failures. Try again with oneapi@2025.0.4 and use the tags I've used above for each package. e.g. I added ifx support to access-generic-tracers only today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Status: New Issues 🌅
Development

No branches or pull requests

2 participants