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

Build error in hommexx with nvidia compiler on CPU #7002

Open
ndkeen opened this issue Feb 12, 2025 · 1 comment
Open

Build error in hommexx with nvidia compiler on CPU #7002

ndkeen opened this issue Feb 12, 2025 · 1 comment
Labels
HOMME nvidia compiler nvidia compiler (formerly PGI)

Comments

@ndkeen
Copy link
Contributor

ndkeen commented Feb 12, 2025

With ERS.ne30pg2_ne30pg2.F2010-SCREAMv1 --compiler=nvidia, I see a build fail.
Same with DEBUG (faster building) SMS_D.ne30pg2_ne30pg2.F2010-SCREAMv1.pm-cpu_nvidia

cd /pscratch/sd/n/ndk/e3sm_scratch/pm-cpu/ERS.ne30pg2_ne30pg2.F2010-SCREAMv1.pm-cpu_nvidia.20250212_133345_e3s0i8/bld/cmake-bld/eamxx/src/mct_coupling && python3 /pscratch/sd/n/ndk/e3sm_scratch/pm-cpu/ERS.ne30pg2_ne30pg2.F2010-SCREAMv1.pm-cpu_nvidia.20250212_1333\
45_e3s0i8/Tools/e3sm_compile_wrap.py  /opt/cray/pe/craype/2.7.30/bin/ftn -DADIOS2_USE_MPI -DCPRNVIDIA -DFORTRANUNDERSCORE -DHAVE_CONFIG_H -DHAVE_MPI -DHOMMEXX_CONFIG_IS_CMAKE -DLinux -DMPICH_SKIP_MPICXX -DNDEBUG -DNO_R16 -DRRTMGP_ENABLE_YAKL -DSCREAM -DSCREAM_CON\
FIG_IS_CMAKE -I/global/cfs/cdirs/e3sm/ndk/repos/c05-feb4/components/homme/src/theta-l_kokkos/cxx -I/global/cfs/cdirs/e3sm/ndk/repos/c05-feb4/components/homme/utils/cime/CIME/non_py/src/timing -I/pscratch/sd/n/ndk/e3sm_scratch/pm-cpu/ERS.ne30pg2_ne30pg2.F2010-SCRE\
AMv1.pm-cpu_nvidia.20250212_133345_e3s0i8/bld/cmake-bld/eamxx/src/dynamics/homme/homme/utils/cime/CIME/non_py/src/timing -I/global/cfs/cdirs/e3sm/ndk/repos/c05-feb4/components/homme/src/share/cxx -I/global/cfs/cdirs/e3sm/ndk/repos/c05-feb4/components/homme/src/sh\
are/compose -I/pscratch/sd/n/ndk/e3sm_scratch/pm-cpu/ERS.ne30pg2_ne30pg2.F2010-SCREAMv1.pm-cpu_nvidia.20250212_133345_e3s0i8/bld/cmake-bld/eamxx/src/dynamics/homme/homme/src/share/cxx -I/pscratch/sd/n/ndk/e3sm_scratch/pm-cpu/ERS.ne30pg2_ne30pg2.F2010-SCREAMv1.pm-\
cpu_nvidia.20250212_133345_e3s0i8/bld/cmake-bld/eamxx/src/mct_coupling/theta-l_kokkos_4_72_10_modules -I/pscratch/sd/n/ndk/e3sm_scratch/pm-cpu/ERS.ne30pg2_ne30pg2.F2010-SCREAMv1.pm-cpu_nvidia.20250212_133345_e3s0i8/bld/cmake-bld/eamxx/src/mct_coupling -I/pscratch\
/sd/n/ndk/e3sm_scratch/pm-cpu/ERS.ne30pg2_ne30pg2.F2010-SCREAMv1.pm-cpu_nvidia.20250212_133345_e3s0i8/bld/nvidia/mpich/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1i1e1/csm_share -I/opt/cray/pe/parallel-netcdf/1.12.3.9/nvidia/23.3/include -I/opt/cray/pe/netcdf-hd\
f5parallel/4.9.0.9/nvidia/23.3/include -isystem /pscratch/sd/n/ndk/e3sm_scratch/pm-cpu/ERS.ne30pg2_ne30pg2.F2010-SCREAMv1.pm-cpu_nvidia.20250212_133345_e3s0i8/bld/nvidia/mpich/nodebug/nothreads/include -isystem /global/cfs/cdirs/e3sm/3rdparty/adios2/2.9.1/cray-mp\
ich-8.1.25/nvidia-22.7/include -i4 -Mstack_arrays  -Mextend -byteswapio -Mflushz -Kieee -DHAVE_IEEE_ARITHMETIC -Mallocatable=03 -DNO_R16 -traceback -cpp -Wall  -O1 -g -O3 -module theta-l_kokkos_4_72_10_modules -c /global/cfs/cdirs/e3sm/ndk/repos/c05-feb4/componen\
ts/homme/src/share/physical_constants.F90 -o CMakeFiles/theta-l_kokkos_4_72_10.dir/__/__/__/homme/src/share/physical_constants.F90.o
NVFORTRAN-S-0081-Illegal selector - KIND parameter has unknown value for data type  (/global/cfs/cdirs/e3sm/ndk/repos/c05-feb4/components/homme/src/share/physical_constants.F90: 57)
NVFORTRAN-S-0081-Illegal selector - KIND parameter has unknown value for data type  (/global/cfs/cdirs/e3sm/ndk/repos/c05-feb4/components/homme/src/share/physical_constants.F90: 57)
  0 inform,   0 warnings,   2 severes, 0 fatal for physical_constants

/pscratch/sd/n/ndk/e3sm_scratch/pm-cpu/ERS.ne30pg2_ne30pg2.F2010-SCREAMv1.pm-cpu_nvidia.20250212_133345_e3s0i8


Code:

! physical constants used in HOMME stand-alone simulations
real (kind=real_kind), public, parameter :: DD_PI = 3.141592653589793238462643383279_real_kind
real (kind=longdouble_kind), public, parameter :: QQ_PI = 3.141592653589793238462643383279_longdouble_kind

@ndkeen ndkeen added HOMME nvidia compiler nvidia compiler (formerly PGI) labels Feb 12, 2025
@bartgol
Copy link
Contributor

bartgol commented Feb 13, 2025

It's as if longdouble_kind was not defined at that point (line 57 points at the longdouble constant). Myguess is that the compiler does not support a value of 16 for the integrer kind. Perhaps homme should do something like

  integer (kind=4), public, parameter::  &
#ifdef HOMME_QUAD_PREC
  longdouble_kind    = selected_real_kind(18)
#else 
  longdouble_kind    = real_kind
#endif

or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HOMME nvidia compiler nvidia compiler (formerly PGI)
Projects
None yet
Development

No branches or pull requests

2 participants