Skip to content

NVHPC (NVIDIA) cannot build select rank #1864

@marshallward

Description

@marshallward

Describe the bug
nvfortran does not yet support the select rank block, so we cannot build the latest FMS. It reports a syntax error.

mpifort -DPACKAGE_NAME=\"FMS\" -DPACKAGE_TARNAME=\"fms\" -DPACKAGE_VERSION=\"\ \" -DPACKAGE_STRING=\"FMS\ \ \" -DPACKAGE_BUGREPORT=\"https://github.com/NOAA-GFDL/FMS/issues\" -DPACKAGE_URL=\"\" -DHAVE_MPI=1 -DHAVE_SCHED_GETAFFINITY=1 -DHAVE_MPI=1 -Duse_libMPI=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_NETCDF_H=1 -Duse_netCDF=1 -I/scratch/cimes/mw0089/include -I/scratch/cimes/mw0089//include -r8   -I../src/include -I../src/mpp/include -c ../src/mpp/mpp_domains.F90
NVFORTRAN-S-0034-Syntax error at or near identifier rank (../src/mpp/include/mpp_pack.fh: 56)
NVFORTRAN-S-0034-Syntax error at or near end of line (../src/mpp/include/mpp_pack.fh: 57)
NVFORTRAN-S-0034-Syntax error at or near end of line (../src/mpp/include/mpp_pack.fh: 59)
NVFORTRAN-S-0034-Syntax error at or near end of line (../src/mpp/include/mpp_pack.fh: 61)
NVFORTRAN-S-0034-Syntax error at or near end of line (../src/mpp/include/mpp_pack.fh: 63)
  0 inform,   0 warnings,   5 severes, 0 fatal for arr2vec_r8

(&c...)

To Reproduce
Build main (or at least 377b5e8) with any newer nvfortran compiler.

Expected behavior
It should build.

System Environment
Describe the system environment, include:

  • OS:

    $ uname -a
    Linux stellar-amd.princeton.edu 4.18.0-553.117.1.el8_10.x86_64 #1 SMP Fri Mar 27 18:49:45 EDT 2026 x86_64 x86_64 x86_64 GNU/Linux
    
  • Compiler(s): Type and version [e.g. Intel 19.1]

     $ nvfortran --version
    
     nvfortran 26.1-0 64-bit target on x86-64 Linux -tp znver2 
    
  • MPI type, and version (e.g. MPICH, Cray MPI, openMPI)

    $ mpirun --version
    mpirun (Open MPI) 4.1.9a1
    
  • netCDF Version: For both C and Fortran

    $ nc-config --version
    netCDF 4.9.2
    $ nf-config --version
    netCDF-Fortran 4.6.1
    
  • Configure options: Any additional flags, or macros passed to configure

    See above

Additional context
I didn't test older compiler versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions