open-mpi / ompi

Open MPI main development repository
https://www.open-mpi.org
Other
2.07k stars 844 forks source link

Cleanup PGI Compiler Warnings #7686

Open jjhursey opened 4 years ago

jjhursey commented 4 years ago

Mentioned in this thread the PGI compiler is throwing some warnings around the atomics code on ppc64le:

"/tmp/ompi-src/opal/mca/pmix/pmix4x/openpmix/src/atomics/sys/powerpc/atomic.h",
          line 142: warning: "cc" clobber ignored
                            : "cc", "memory");
                              ^

"/tmp/ompi-src/opal/mca/pmix/pmix4x/openpmix/src/atomics/sys/powerpc/atomic.h",
          line 210: warning: "cc" clobber ignored
                            : "cc", "memory");
                              ^

"/tmp/ompi-src/opal/mca/pmix/pmix4x/openpmix/src/atomics/sys/powerpc/atomic.h",
          line 239: warning: "cc" clobber ignored
  PMIX_ATOMIC_POWERPC_DEFINE_ATOMIC_64(add, add)
  ^

"/tmp/ompi-src/opal/mca/pmix/pmix4x/openpmix/src/atomics/sys/powerpc/atomic.h",
          line 239: warning: variable "t" was set but never used
  PMIX_ATOMIC_POWERPC_DEFINE_ATOMIC_64(add, add)
  ^

We should sweep through and clean those up.

jjhursey commented 3 years ago

@awlauria Filed part of this for OpenPMIx in https://github.com/openpmix/openpmix/pull/2042 (master branch). Thanks!

jjhursey commented 3 years ago

@awlauria you did a bunch of cleanup here. Do you think we can close this and just keep working on cleaning up the warnings as we can?

I still see a number of warnings, but I think it has gotten much better recently.

A few of the warnings I still see in PGI CI (note that some are outside the scope of OMPI):

This from hwloc

"/tmp/ompi-src/3rd-party/hwloc-2.4.0/include/private/misc.h", line 386:
          warning: enumerated type mixed with another type
        return HWLOC_OBJ_L1ICACHE + depth-1;

This from OpenPMIx

"/tmp/ompi-src/3rd-party/openpmix/src/atomics/sys/atomic_stdc.h", line 127:
          warning: ellipsis with no explicit parameters is nonstandard
  PMIX_ATOMIC_STDC_DEFINE_FETCH_OP(add, 32, int32_t, +)
  ^

This from PGI compiler itself

"/opt/nvidia/hpc_sdk/Linux_ppc64le/20.11/compilers/include-gcc49/_cplus_macros.
          h", line 20: warning: zero used for undefined preprocessing
          identifier "__cplusplus"
  #if __cplusplus >= 201103L
      ^

"/opt/nvidia/hpc_sdk/Linux_ppc64le/20.11/compilers/include/_cplus_preinclude.h"
          , line 42: warning: use of non-prototype function declarator
  extern void __builtin_pgi_va_start();

This from PRRTE:

"prte_mca_base_components_register.c", line 150: warning: enumerated type mixed
          with another type
                                                 0, PRTE_MCA_BASE_VAR_FLAG_DEFAULT_ONLY | PRTE_MCA_BASE_VAR_FLAG_INTERNAL,
                                                    ^

This from OPAL in OMPI

"../../opal/include/opal_stdatomic.h", line 38: warning: unrecognized
          preprocessing directive
  #warning C11 _Atomic type not fully supported. The C11 atomic support should have been disabled.
   ^

"../../opal/include/opal/sys/atomic_stdc.h", line 115: warning: ellipsis with
          no explicit parameters is nonstandard
  OPAL_ATOMIC_STDC_DEFINE_FETCH_OP(add, 32, int32_t, +)
  ^
awlauria commented 3 years ago

The MPI PR is still open and needs rebasing. I'll put some cycles in this week to try and get that in.

There were still some in PMIx and HWLOC/PRRTE, but most of those got cleaned up. I think OMPI is the main culprit now.