The latest PGI compiler (v 20.4) is failing to properly compile OpenMPI (v 4.0.1 or 4.0.4) - everything appears to build fine, but fails to run on ./hello: symbol lookup error: /share/apps/pgi/20.4/openmpi-4.0.4/lib/pmix/mca_gds_ds21.so: undefined symbol: __atomic_compare_exchange closer scrutiny shows:
1- mca_gds_ds21.so is much smaller w/ PGI 20.4 than PGI 19.x versions: -rwxr-xr-x 1 root root 87K Oct 1 2019 /share/apps/pgi/19.5/openmpi-4.0.1/lib/pmix/mca_gds_ds21.so -rwxr-xr-x 1 root root 87K Oct 8 2019 /share/apps/pgi/19.9/openmpi-4.0.1/lib/pmix/mca_gds_ds21.so -rwxr-xr-x 1 root root 38K Jul 8 14:08 /share/apps/pgi/20.4/openmpi-4.0.4/lib/pmix/mca_gds_ds21.so 2- PGI 20.4 fails to properly parse atomic_stdc.h in opal/mca/pmix/pmix3x/pmix/src/mca/base I've reported this to PGI, but if someone is aware if a fix/workaround I'd appreciate it. I have not digged further down to understand the root cause (too many layers) FYI, when using PGI 19.9, I see in the output of make: make[5]: Entering directory `/local/hpc/pgi/19.9/openmpi-4.0.1/opal/mca/pmix/pmix3x/pmix/src/mca/base' CC pmix_mca_base_close.lo CC pmix_mca_base_cmd_line.lo CC pmix_mca_base_component_compare.lo ie, no compilation warnings The same output, when using PGI 20.4, shows make[5]: Entering directory `/local/hpc/pgi/20.4/openmpi-4.0.4/opal/mca/pmix/pmix3x/pmix/src/mca/base' CC pmix_mca_base_close.lo "/local/hpc/pgi/20.4/openmpi-4.0.4/opal/mca/pmix/pmix3x/pmix/src/atomics/sys/atomic_stdc.h", line 115: warning: argument of type "pmix_atomic_int32_t *" is incompatible with parameter of type "volatile void *" PMIX_ATOMIC_STDC_DEFINE_FETCH_OP(add, 32, int32_t, +) ^ and a slew of such warnings as of that point. The compilation proceeds, tho, and make completes. Clearly PGI 20.4 is barfing on the macros defined in atomic_stdc.h (hence the smaller .sl and the missing symbols) - any idea why? [I've successfully built OpenMPI w/ Intel's, GCC and PGI compilers w/ numerous versions of ea compiler] Stay sane, safe and healthy, 6+ft away! Cheers, Sylvain --