I've tried building with OMPI 3.1.4 and 4.0.2 on both SLES 12.3, RHEL 7.6 and RHEL 8.0.
The exact link error varies depending on the environment. For SLES 12.3 I'm seeing:
ope.o MPI1/MPI1_suite.o MPI1/MPI1_benchmark.o benchmark_suites_collection.o MPI1/IMB_allgather.o MPI1/IMB_allgatherv.o MPI1/IMB_allreduce.o MPI1/IMB_alltoall.o MPI1/IMB_alltoallv.o MPI1/IMB_bandwidth.o MPI1/IMB_barrier.o MPI1/IMB_bcast.o MPI1/IMB_benchlist.o MPI1/IMB_chk_diff.o MPI1/IMB_cpu_exploit.o MPI1/IMB_declare.o MPI1/IMB_err_handler.o MPI1/IMB_exchange.o MPI1/IMB_gather.o MPI1/IMB_gatherv.o MPI1/IMB_g_info.o MPI1/IMB_init.o MPI1/IMB_init_transfer.o MPI1/IMB_mem_manager.o MPI1/IMB_output.o MPI1/IMB_parse_name_mpi1.o MPI1/IMB_pingping.o MPI1/IMB_pingpong.o MPI1/IMB_reduce.o MPI1/IMB_reduce_local.o MPI1/IMB_reduce_scatter.o MPI1/IMB_reduce_scatter_block.o MPI1/IMB_scatter.o MPI1/IMB_scatterv.o MPI1/IMB_sendrecv.o MPI1/IMB_strgs.o MPI1/IMB_utils.o MPI1/IMB_warm_up.o /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: MPI1/MPI1_suite.o: undefined reference to symbol 'floor@@GLIBC_2.2.5' /lib64/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:180: recipe for target 'IMB-MPI1' failed
On RHEL I see a variety of undefined references including
benchmark_suites_collection.cpp:(.text._ZN14BenchmarkSuiteIL17benchmark_suite_t6EE12get_instanceEv[_ZN14BenchmarkSuiteIL17benchmark_suite_t6EE12get_instanceEv]+0x1b): undefined reference tooperator new(unsigned long)'
benchmark_suites_collection.o: In function BenchmarkSuite<(benchmark_suite_t)6>::do_register_elem(Benchmark const*)': benchmark_suites_collection.cpp:(.text._ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark[_ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark]+0x8b): undefined reference tooperator new(unsigned long)'
benchmark_suites_collection.cpp:(.text._ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark[_ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark]+0x14b): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' benchmark_suites_collection.cpp:(.text._ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark[_ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark]+0x15c): undefined reference tostd::__cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()'
benchmark_suites_collection.o:(.rodata._ZTI14BenchmarkSuiteIL17benchmark_suite_t6EE[_ZTI14BenchmarkSuiteIL17benchmark_suite_t6EE]+0x0): undefined reference to vtable for __cxxabiv1::__si_class_type_info'
I don't see the issue when I'm using mvapich, but it's OMPI that I'm trying to test.
I'm getting a variety of link errors when I use
make CC=mpicc CXX=mpicc 2>&1 | tee make.log
I've tried building with OMPI 3.1.4 and 4.0.2 on both SLES 12.3, RHEL 7.6 and RHEL 8.0.
The exact link error varies depending on the environment. For SLES 12.3 I'm seeing:
ope.o MPI1/MPI1_suite.o MPI1/MPI1_benchmark.o benchmark_suites_collection.o MPI1/IMB_allgather.o MPI1/IMB_allgatherv.o MPI1/IMB_allreduce.o MPI1/IMB_alltoall.o MPI1/IMB_alltoallv.o MPI1/IMB_bandwidth.o MPI1/IMB_barrier.o MPI1/IMB_bcast.o MPI1/IMB_benchlist.o MPI1/IMB_chk_diff.o MPI1/IMB_cpu_exploit.o MPI1/IMB_declare.o MPI1/IMB_err_handler.o MPI1/IMB_exchange.o MPI1/IMB_gather.o MPI1/IMB_gatherv.o MPI1/IMB_g_info.o MPI1/IMB_init.o MPI1/IMB_init_transfer.o MPI1/IMB_mem_manager.o MPI1/IMB_output.o MPI1/IMB_parse_name_mpi1.o MPI1/IMB_pingping.o MPI1/IMB_pingpong.o MPI1/IMB_reduce.o MPI1/IMB_reduce_local.o MPI1/IMB_reduce_scatter.o MPI1/IMB_reduce_scatter_block.o MPI1/IMB_scatter.o MPI1/IMB_scatterv.o MPI1/IMB_sendrecv.o MPI1/IMB_strgs.o MPI1/IMB_utils.o MPI1/IMB_warm_up.o /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: MPI1/MPI1_suite.o: undefined reference to symbol 'floor@@GLIBC_2.2.5' /lib64/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:180: recipe for target 'IMB-MPI1' failed
On RHEL I see a variety of undefined references including, std::allocator >::~basic_string()'
benchmark_suites_collection.o:(.rodata._ZTI14BenchmarkSuiteIL17benchmark_suite_t6EE[_ZTI14BenchmarkSuiteIL17benchmark_suite_t6EE]+0x0): undefined reference to
benchmark_suites_collection.cpp:(.text._ZN14BenchmarkSuiteIL17benchmark_suite_t6EE12get_instanceEv[_ZN14BenchmarkSuiteIL17benchmark_suite_t6EE12get_instanceEv]+0x1b): undefined reference to
operator new(unsigned long)' benchmark_suites_collection.o: In functionBenchmarkSuite<(benchmark_suite_t)6>::do_register_elem(Benchmark const*)': benchmark_suites_collection.cpp:(.text._ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark[_ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark]+0x8b): undefined reference to
operator new(unsigned long)' benchmark_suites_collection.cpp:(.text._ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark[_ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark]+0x14b): undefined reference tostd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' benchmark_suites_collection.cpp:(.text._ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark[_ZN14BenchmarkSuiteIL17benchmark_suite_t6EE16do_register_elemEPK9Benchmark]+0x15c): undefined reference to
std::__cxx11::basic_string<char, std::char_traitsvtable for __cxxabiv1::__si_class_type_info'
I don't see the issue when I'm using mvapich, but it's OMPI that I'm trying to test.