升级到 ubuntu 22.04 后 MPI 出现问题

升级到 ubuntu 22.04 后 MPI 出现问题

我在旧版本的 ubuntu 上使用 mpi,一切都很好,直到我升级到 ubuntu 22.04。当我尝试使用命令编译我的程序时mpicxx-o,它给了我一长串错误列表,我将其粘贴在消息末尾。

为了解决这个问题,我拼命寻找解决方案,将以下内容添加到我的 PATH 中:/usr/lib/x86_64-linux-gnu,但没有用。我是 Linux 新手,我完全不知道该怎么做才能解决问题。如果您能帮助我,我将不胜感激。

错误:

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_coll.o): in function `MPIDI_OFI_recv_event.constprop.0':
(.text+0x1b51): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x1c19): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_coll.o): in function `MPIDI_NM_progress.constprop.0':
(.text+0x2564): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x2a07): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x2c8b): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_coll.o):(.text+0x32be): more undefined references to `fi_strerror' follow
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `get_first_non_io_obj_by_pci':
(.text+0x191): undefined reference to `hwloc_get_type_depth'
/usr/bin/ld: (.text+0x226): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPII_hwtopo_init':
(.text+0x291): undefined reference to `hwloc_bitmap_alloc'
/usr/bin/ld: (.text+0x2a4): undefined reference to `hwloc_topology_init'
/usr/bin/ld: (.text+0x2b2): undefined reference to `hwloc_topology_set_io_types_filter'
/usr/bin/ld: (.text+0x2be): undefined reference to `hwloc_topology_load'
/usr/bin/ld: (.text+0x2ee): undefined reference to `hwloc_get_proc_cpubind'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPII_hwtopo_finalize':
(.text+0x320): undefined reference to `hwloc_topology_destroy'
/usr/bin/ld: (.text+0x32c): undefined reference to `hwloc_bitmap_free'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPIR_hwtopo_get_leaf':
(.text+0x389): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: (.text+0x394): undefined reference to `hwloc_bitmap_iszero'
/usr/bin/ld: (.text+0x3ac): undefined reference to `hwloc_bitmap_isincluded'
/usr/bin/ld: (.text+0x3d0): undefined reference to `hwloc_bitmap_isincluded'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPIR_hwtopo_get_depth':
(.text+0x469): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPIR_hwtopo_get_ancestor':
(.text+0x4b2): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPIR_hwtopo_get_obj_by_type':
(.text+0x60f): undefined reference to `hwloc_get_type_depth'
/usr/bin/ld: (.text+0x655): undefined reference to `hwloc_bitmap_isincluded'
/usr/bin/ld: (.text+0x664): undefined reference to `hwloc_bitmap_isequal'
/usr/bin/ld: (.text+0x6de): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPIR_hwtopo_get_obj_by_name.part.0':
(.text+0x777): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: (.text+0x782): undefined reference to `hwloc_bitmap_iszero'
/usr/bin/ld: (.text+0x799): undefined reference to `hwloc_bitmap_isincluded'
/usr/bin/ld: (.text+0x7c0): undefined reference to `hwloc_bitmap_isincluded'
/usr/bin/ld: (.text+0x8d0): undefined reference to `hwloc_get_type_depth'
/usr/bin/ld: (.text+0x9e9): undefined reference to `hwloc_get_type_depth'
/usr/bin/ld: (.text+0xa46): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: (.text+0xb8f): undefined reference to `hwloc_obj_type_is_normal'
/usr/bin/ld: (.text+0xba8): undefined reference to `hwloc_obj_type_is_normal'
/usr/bin/ld: (.text+0xbd9): undefined reference to `hwloc_bitmap_isincluded'
/usr/bin/ld: (.text+0xbf6): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: (.text+0xc6b): undefined reference to `hwloc_get_type_depth'
/usr/bin/ld: (.text+0xc87): undefined reference to `hwloc_get_nbobjs_by_depth'
/usr/bin/ld: (.text+0xcb0): undefined reference to `hwloc_bitmap_isset'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPIR_hwtopo_mem_bind':
(.text+0xf7c): undefined reference to `hwloc_topology_get_support'
/usr/bin/ld: (.text+0xfbb): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: (.text+0xfc3): undefined reference to `hwloc_bitmap_alloc'
/usr/bin/ld: (.text+0xfd8): undefined reference to `hwloc_bitmap_or'
/usr/bin/ld: (.text+0x1016): undefined reference to `hwloc_bitmap_free'
/usr/bin/ld: (.text+0x104d): undefined reference to `hwloc_set_area_membind'
/usr/bin/ld: (.text+0x1058): undefined reference to `hwloc_bitmap_free'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPIR_hwtopo_get_node_mem':
(.text+0x10ed): undefined reference to `hwloc_get_type_depth'
/usr/bin/ld: (.text+0x1116): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPIR_hwtopo_is_dev_close_by_name':
(.text+0x116f): undefined reference to `hwloc_get_obj_by_depth'
/usr/bin/ld: (.text+0x1188): undefined reference to `hwloc_bitmap_isincluded'
/usr/bin/ld: (.text+0x11a0): undefined reference to `hwloc_bitmap_isincluded'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpir_hwtopo.o): in function `MPIR_hwtopo_is_dev_close_by_pci':
(.text+0x11f9): undefined reference to `hwloc_bitmap_isincluded'
/usr/bin/ld: (.text+0x1211): undefined reference to `hwloc_bitmap_isincluded'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpidig_pt2pt_callbacks.o): in function `MPIDI_OFI_do_am_isend_rdma_read.constprop.0':
(.text+0x1dad): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x2245): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpidig_pt2pt_callbacks.o): in function `MPIDI_anysrc_try_cancel_partner':
(.text+0x28b5): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpidig_pt2pt_callbacks.o): in function `MPIDI_OFI_do_am_isend_eager.constprop.0':
(.text+0x33fd): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpidig_pt2pt_callbacks.o): in function `MPIDI_OFI_do_am_isend_pipeline.constprop.0':
(.text+0x409b): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpidig_pt2pt_callbacks.o):(.text+0x4be3): more undefined references to `fi_strerror' follow
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-ofi_init.o): in function `MPIDI_OFI_init_local':
(.text+0x49b2): undefined reference to `fi_fabric'
/usr/bin/ld: (.text+0x5215): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-ofi_init.o): in function `MPIDI_OFI_mpi_finalize_hook':
(.text+0x5ffb): undefined reference to `fi_freeinfo'
/usr/bin/ld: (.text+0x66d0): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x67fd): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x6875): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x6a35): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x6aad): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-ofi_init.o):(.text+0x6b25): more undefined references to `fi_strerror' follow
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-ofi_win.o): in function `win_init':
(.text+0xa58): undefined reference to `fi_dupinfo'
/usr/bin/ld: (.text+0xb68): undefined reference to `fi_freeinfo'
/usr/bin/ld: (.text+0xb80): undefined reference to `fi_dupinfo'
/usr/bin/ld: (.text+0xcb6): undefined reference to `fi_freeinfo'
/usr/bin/ld: (.text+0xe52): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0xfb8): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x1095): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x1106): undefined reference to `fi_freeinfo'
/usr/bin/ld: (.text+0x120b): undefined reference to `fi_freeinfo'
/usr/bin/ld: (.text+0x12f3): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-ofi_win.o): in function `MPIDI_OFI_mpi_win_attach_hook':
(.text+0x1cdd): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-ofi_win.o): in function `MPIDI_OFI_mpi_win_free_hook':
(.text+0x2595): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x260d): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x2685): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-ofi_events.o):(.text+0x1bf1): more undefined references to `fi_strerror' follow
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-ofi_nic.o): in function `MPIDI_OFI_init_multi_nic':
(.text+0x44a): undefined reference to `fi_dupinfo'
/usr/bin/ld: (.text+0x491): undefined reference to `fi_freeinfo'
/usr/bin/ld: (.text+0x4fc): undefined reference to `fi_dupinfo'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-init_provider.o): in function `find_provider':
(.text+0x94): undefined reference to `fi_dupinfo'
/usr/bin/ld: (.text+0xb8): undefined reference to `fi_getinfo'
/usr/bin/ld: (.text+0x278): undefined reference to `fi_getinfo'
/usr/bin/ld: (.text+0x296): undefined reference to `fi_freeinfo'
/usr/bin/ld: (.text+0x30d): undefined reference to `fi_freeinfo'
/usr/bin/ld: (.text+0x341): undefined reference to `fi_version'
/usr/bin/ld: (.text+0x355): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x415): undefined reference to `fi_getinfo'
/usr/bin/ld: (.text+0x444): undefined reference to `fi_getinfo'
/usr/bin/ld: (.text+0x451): undefined reference to `fi_version'
/usr/bin/ld: (.text+0x461): undefined reference to `fi_version'
/usr/bin/ld: (.text+0x480): undefined reference to `fi_dupinfo'
/usr/bin/ld: (.text+0x4c9): undefined reference to `fi_version'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-init_provider.o): in function `MPIDI_OFI_find_provider_cleanup':
(.text+0x781): undefined reference to `fi_freeinfo'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-init_provider.o): in function `MPIDI_OFI_get_required_version':
(.text+0x841): undefined reference to `fi_version'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-init_addrxchg.o): in function `MPIDI_OFI_addr_exchange_root_ctx':
(.text+0x31c): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x3b5): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x45d): undefined reference to `fi_strerror'
/usr/bin/ld: (.text+0x555): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-init_addrxchg.o): in function `MPIDI_OFI_addr_exchange_all_ctx':
(.text+0xb35): undefined reference to `fi_strerror'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-init_addrxchg.o):(.text+0xdf6): more undefined references to `fi_strerror' follow
collect2: error: ld returned 1 exit status

答案1

我通过使用这两个命令卸载并重新安装 mpich 解决了该问题:

sudo apt-get purge mpich
sudo apt-get install mpich

感谢“bugs.launchpad.net”的 Christophe Chatelain

相关内容