Warning regarding redefinition of __HIP_PLATFORM_AMD__

Issue #634 resolved
Paul Hargrove created an issue

Recently, CI builds on OLCF's Frontier with --enable-hip have begun to produce the following (harmless) warning from every application compile:

<command-line>: warning: "__HIP_PLATFORM_AMD__" redefined
<command-line>: note: this is the location of the previous definition

This is due to relatively recent behavior in which the cc and CC compiler wrappers in the Cray Programming Environment pass -D__HIP_PLATFORM_AMD__. Since such a option is implicitly a definition to 1, this is a conflict with UPC++'s definition (by upcxx or upcxx-meta) to a (historically necessary) empty value.

Comments (5)

  1. Paul Hargrove reporter

    Ideally, our configure script would probe CXX for any definition is provides for __HIP_PLATFORM_AMD__ and either match it or omit our definition.

    In the meantime:

    • Users may choose to safely ignore this warning
    • Users may edit the Makefile generated by configure, prior to running make, to remove the conflicting definition (if you need clearer instructions, then this approach is probably not for you).
  2. Paul Hargrove reporter

    Fix issue #634: Warning regarding redefinition of HIP_PLATFORM_AMD

    This commit ensures that UPC++ will not define any __HIP_PLATFORM_* identifiers which are pre-defined by $CXX (as has been observed of the CC compiler wrapper on HPE Cray EX systems).

    → <<cset f2fa15c95476>>

  3. Log in to comment