Skip to content

v8.4.1 does not compile with NVHPC 25.11: generated setup_packages.inc PACKAGE_LOGIC_PRINT continuation line rejected (S-0290) #1508

Description

@mordisdevone

Summary

A pristine v8.4.1 checkout (91c5eac) does not compile with NVHPC 25.11 (make nvhpc CORE=atmosphere): the registry-generated inc/setup_packages.inc contains a PACKAGE_LOGIC_PRINT(...) line whose embedded activation expression is long enough to be emitted as a free-form continuation that nvfortran rejects.

Error (verbatim)

NVFORTRAN-S-0290-Unexpected continuation line (./inc/setup_packages.inc: 107)
  0 inform,   0 warnings,   1 severes, 0 fatal for atm_setup_sfclayer_package
make[3]: *** [Makefile:96: mpas_atm_core_interface.o] Error 2

Lines 105–107 of the generated include are the sfclayer package's full activation string, e.g.

PACKAGE_LOGIC_PRINT("  sfclayer is active when ((trim(config_physics_suite) /= 'none' .and. trim(config_sfclayer_scheme) == &
&'suite') .or.  any(trim(config_sfclayer_scheme) == [ character(len=StrKind) :: 'sf_monin_obukhov', 'sf_monin_obukhov_rev', &
&'sf_mynn' ]))")

Where it comes from

src/tools/registry/gen_inc.c (around line 3002) prints " %s is active when (%s)" with the whole packagewhen expression inside one Fortran string literal; for sfclayer the string exceeds what nvfortran accepts across continuation lines inside a macro argument.

Environment

NVHPC 25.11 (nvfortran 25.11-0), Ubuntu 22.04, x86-64; make nvhpc CORE=atmosphere OPENACC=true and OPENACC=false both fail identically. Other compilers not tested here.

Workaround we use

A one-line change in gen_inc.c that shortens the diagnostic text (" %s has registry activation logic"), which changes only the printed package-logic message. A proper fix would split the generated literal into concatenated shorter strings (or emit the expression on separate PACKAGE_LOGIC_PRINT lines) so the generated Fortran is compiler-agnostic. Happy to open a PR either way if maintainers indicate the preferred form.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions