我一直在尝试构建HPL但没有成功。我已经安装了Open MPI并且运行正常。我也有BLAS库。 但是当我尝试构建时,我会遇到一些与openmpi相关的错误。例如,我发现" opal_install_dirs"是来自libopen-pal的符号。但我不知道这些未定义的引用来自何处,所以我不知道如何解决它。
fcoll_dynamic_file_write_all.c:(.text+0x20f0): undefined reference to `opal_output'
fcoll_dynamic_file_write_all.c:(.text+0x2122): undefined reference to `opal_output'
/usr/local/lib/libmpi.a(fcoll_dynamic_file_write_all.o):fcoll_dynamic_file_write_all.c:(.text+0x216e): more undefined references to `opal_output' follow
/usr/local/lib/libmpi.a(pinfo_create.o): In function `PMPI_Info_create':
pinfo_create.c:(.text+0x94): undefined reference to `opal_class_initialize'
/usr/local/lib/libmpi.a(ppack_external.o): In function `PMPI_Pack_external':
ppack_external.c:(.text+0xae): undefined reference to `opal_convertor_t_class'
ppack_external.c:(.text+0x129): undefined reference to `opal_convertor_prepare_for_send'
ppack_external.c:(.text+0x1ed): undefined reference to `opal_convertor_pack'
ppack_external.c:(.text+0x23c): undefined reference to `opal_class_initialize'
/usr/local/lib/libmpi.a(ppack_external_size.o): In function `PMPI_Pack_external_size':
ppack_external_size.c:(.text+0x7d): undefined reference to `opal_convertor_t_class'
ppack_external_size.c:(.text+0xf4): undefined reference to `opal_convertor_prepare_for_recv'
ppack_external_size.c:(.text+0x15c): undefined reference to `opal_class_initialize'
/usr/local/lib/libmpi.a(punpack_external.o): In function `PMPI_Unpack_external':
punpack_external.c:(.text+0xa2): undefined reference to `opal_convertor_t_class'
punpack_external.c:(.text+0x114): undefined reference to `opal_convertor_prepare_for_recv'
punpack_external.c:(.text+0x1d8): undefined reference to `opal_convertor_unpack'
punpack_external.c:(.text+0x22c): undefined reference to `opal_class_initialize'
/usr/local/lib/libmpi.a(pstatus_set_elements_x.o): In function `PMPI_Status_set_elements_x':
pstatus_set_elements_x.c:(.text+0xb2): undefined reference to `opal_datatype_set_element_count'
/usr/local/lib/libmpi.a(libdebuggers_la-ompi_debuggers.o): In function `check':
/home/snc/workspace/openmpi-2.0.1/ompi/debuggers/ompi_debuggers.c:146: undefined reference to `opal_argv_append_nosize'
/usr/local/lib/libmpi.a(libdebuggers_la-ompi_debuggers.o): In function `ompi_debugger_setup_dlls':
/home/snc/workspace/openmpi-2.0.1/ompi/debuggers/ompi_debuggers.c:171: undefined reference to `opal_install_dirs'
/home/snc/workspace/openmpi-2.0.1/ompi/debuggers/ompi_debuggers.c:172: undefined reference to `mca_base_var_register'
/home/snc/workspace/openmpi-2.0.1/ompi/debuggers/ompi_debuggers.c:181: undefined reference to `opal_argv_split'
/home/snc/workspace/openmpi-2.0.1/ompi/debuggers/ompi_debuggers.c:186: undefined reference to `opal_argv_free'
/usr/local/lib/libmpi.a(osc_rdma_frag.o):(.data.rel+0x8): undefined reference to `opal_free_list_item_t_class'
/usr/local/lib/libmpi.a(vprotocol_pessimist_event.o):(.data.rel+0x8): undefined reference to `opal_list_item_t_class'
collect2: error: ld returned 1 exit status
Makefile:76: recipe for target 'dexe.grd' failed
make[2]: *** [dexe.grd] Error 1
make[2]: Leaving directory '/home/mpiuser/cloud/hpl/testing/ptest/Linux_Intel64'
Make.top:64: recipe for target 'build_tst' failed
make[1]: *** [build_tst] Error 2
make[1]: Leaving directory '/home/mpiuser/cloud/hpl'
Makefile:72: recipe for target 'build' failed
make: *** [build] Error 2
这只是make输出的结尾部分。
在HPL的配置文件中,我有:
MPdir = /usr/local
MPinc = $(MPdir)/include
MPlib = $(MPdir)/lib/libmpi.a
...
LAdir = /usr/lib/libblas
ifndef LAinc
LAinc =
endif
ifndef LAlib
LAlib = $libblas.a
endif
...
# ----------------------------------------------------------------------
# - Compilers / linkers - Optimization flags ---------------------------
# ----------------------------------------------------------------------
#
CC = mpicc
CCNOOPT = $(HPL_DEFS)
CCFLAGS = $(HPL_DEFS) -fomit-frame-pointer -O3 -funroll-loops -fopenmp
#
# On some platforms, it is necessary to use the Fortran linker to find
# the Fortran internals used in the BLAS library.
#
LINKER = $(CC)
LINKFLAGS = $(CCFLAGS)
#
ARCHIVER = ar
ARFLAGS = r
RANLIB = echo
我在那里尝试了不同的选项,从我在几个帖子和论坛上找到的信息,我找到了其他一些以前的错误,但我找不到任何解决这个问题的方法。有人能看出可能出错的地方吗?感谢。
答案 0 :(得分:0)
我通过简单地使用libmpi.so而不是libmpi.a解决了这个问题,但我不确定它的区别是什么。我之前看到的大多数配置示例都使用了* .a库,除了使用libmpi.so的那个。
答案 1 :(得分:0)
我通过将MPinc和MPlib设置为清空字符串来解决问题