Compile error with Open MPI 4.1.1 and nvhpc 21.9

Trying to build Open MPI 4.1.1 with the latest 21.9 compilers on x86_64, I am receiving the following errors:

make[2]: Entering directory ‘/p/scratch1/root/openmpi/openmpi-4.1.1/ompi’
CCLD libmpi.la
mca/op/avx/.libs/libmca_op_avx.a(liblocal_ops_avx2_la-op_avx_functions.o):(.data+0x0): multiple definition of ompi_op_avx_functions_avx' mca/op/avx/.libs/libmca_op_avx.a(liblocal_ops_avx_la-op_avx_functions.o):(.data+0x0): first defined here mca/op/avx/.libs/libmca_op_avx.a(liblocal_ops_avx2_la-op_avx_functions.o):(.data+0x1250): multiple definition of ompi_op_avx_3buff_functions_avx’
mca/op/avx/.libs/libmca_op_avx.a(liblocal_ops_avx_la-op_avx_functions.o):(.data+0x1250): first defined here
mca/op/avx/.libs/libmca_op_avx.a(liblocal_ops_avx512_la-op_avx_functions.o):(.data+0x0): multiple definition of ompi_op_avx_functions_avx' mca/op/avx/.libs/libmca_op_avx.a(liblocal_ops_avx_la-op_avx_functions.o):(.data+0x0): first defined here mca/op/avx/.libs/libmca_op_avx.a(liblocal_ops_avx512_la-op_avx_functions.o):(.data+0x1250): multiple definition of ompi_op_avx_3buff_functions_avx’
mca/op/avx/.libs/libmca_op_avx.a(liblocal_ops_avx_la-op_avx_functions.o):(.data+0x1250): first defined here
make[2]: *** [Makefile:3280: libmpi.la] Error 2
make[2]: Leaving directory ‘/p/scratch1/root/openmpi/openmpi-4.1.1/ompi’
make[1]: *** [Makefile:3555: all-recursive] Error 1
make[1]: Leaving directory ‘/p/scratch1/root/openmpi/openmpi-4.1.1/ompi’
make: *** [Makefile:1901: all-recursive] Error 1

4.1.1 has built fine with 21.3, 21.5 and 21.7. Was there a change in 21.9 that would cause this?

Thanks slaughterc.

This is a known issue that an internal user alerted us to last week. Basically the OpenMPI build is partially picking up our expanded support for AVX512 but since were missing a define, AVX512BW, the pre-processor instead adds the “_avx” extension.

We’ll need to work with the OpenMPI on fixing some of their logic but also add the define flag when appropriate.

As a work around, our team was able to add “-enable-mca-no-build=op-avx” to the OpenMPI configuration to get a successful build.

-Mat

Thank you for the update Mat. I was able to get it built successfully.