我有CUDA代码我需要在本地运行。因此,我试图在the OpenMPI directions之后安装OpenMPI。当我尝试make
我的代码时,我会收到very long error output,类似于OpenMPI documentation所描述的内容。我尝试使用文档的建议修复程序重新安装OpenMPI,但现在我在安装过程中遇到了这些错误:
Making all in tools/ompi_info
make[2]: Entering directory '/home/hatfull/Downloads/openmpi-2.1.1/ompi/tools/ompi_info'
CC ompi_info.o
CC param.o
CCLD ompi_info
ld: warning: libimf.so, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: warning: libsvml.so, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: warning: libirng.so, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: warning: libintlc.so.5, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: .libs/ompi_info: hidden symbol `__intel_cpu_features_init_x' in /opt/intel/compilers_and_libraries_2017.4.196/linux/compiler/lib/intel64_lin/libirc.a(cpu_feature_disp.o) is referenced by DSO
ld: final link failed: Bad value
Makefile:1785: recipe for target 'ompi_info' failed
make[2]: *** [ompi_info] Error 1
make[2]: Leaving directory '/home/hatfull/Downloads/openmpi-2.1.1/ompi/tools/ompi_info'
Makefile:3353: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/hatfull/Downloads/openmpi-2.1.1/ompi'
Makefile:1806: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
我做错了什么?请帮忙! S.O.S!
我有CUDA代码我需要在本地运行。因此,我试图在the OpenMPI directions之后安装OpenMPI。我将tar存储为~/Downloads/openmpi-2.1.1.tar.gz
。 Hance,我跑了
$gunzip -c openmpi-2.1.1.tar.gz | tar xf -
$cd openmpi-2.1.1
$./configure --prefix=/opt/openmpi-2.1.1 &> configure_log1
$sudo make all install &> install_log_take1
成功。请注意,我已将方向中的--prefix=/usr/local
更改为--prefix=/opt/openmpi-2.1.1
。我收录了configure_log1和install_log_take1。
当我使用makefile makefile.ulfhednar
尝试make
我的代码时
$make -f makefile.ulfhednar clean
$make -f makefile.ulfhednar &> make_log1
我在make_log1收到一个非常长的错误输出,看起来类似于OpenMPI documentation所描述的错误输出。它说解决方案是使用配置选项" ./configure CC=icc CXX=icpc F77=ifort FC=ifort ...
"安装OpenMPI,所以我使用命令重新安装,
$cd ~/Downloads/openmpi-2.1.1
$sudo make uninstall
$sudo rm -r /opt/openmpi-2.1.1
$cd ..
$sudo rm -r openmpi-2.1.1
$gunzip -c openmpi-2.1.1.tar.gz | tar xf -
$cd openmpi-2.1.1
$which icc
/opt/intel/compilers_and_libraries_2017.4.196/linux/bin/intel64/icc
$which icpc
/opt/intel/compilers_and_libraries_2017.4.196/linux/bin/intel64/icpc
$which ifort
/opt/intel/compilers_and_libraries_2017.4.196/linux/bin/intel64/ifort
$./configure --prefix=/opt/openmpi-2.1.1 CC=/opt/intel/compilers_and_libraries_2017.4.196/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2017.4.196/linux/bin/intel64/icpc F77=/opt/intel/compilers_and_libraries_2017.4.196/linux/bin/intel64/ifort FC=/opt/intel/compilers_and_libraries_2017.4.196/linux/bin/intel64/ifort &> configure_log2
$sudo make all install &> install_log_take2
以下是configure_log2和install_log_take2。 install_log_take2
中值得注意的是以下几行:
Making all in tools/ompi_info
make[2]: Entering directory '/home/hatfull/Downloads/openmpi-2.1.1/ompi/tools/ompi_info'
CC ompi_info.o
CC param.o
CCLD ompi_info
ld: warning: libimf.so, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: warning: libsvml.so, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: warning: libirng.so, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: warning: libintlc.so.5, needed by ../../../ompi/.libs/libmpi.so, not found (try using -rpath or -rpath-link)
ld: .libs/ompi_info: hidden symbol `__intel_cpu_features_init_x' in /opt/intel/compilers_and_libraries_2017.4.196/linux/compiler/lib/intel64_lin/libirc.a(cpu_feature_disp.o) is referenced by DSO
ld: final link failed: Bad value
Makefile:1785: recipe for target 'ompi_info' failed
make[2]: *** [ompi_info] Error 1
make[2]: Leaving directory '/home/hatfull/Downloads/openmpi-2.1.1/ompi/tools/ompi_info'
Makefile:3353: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/hatfull/Downloads/openmpi-2.1.1/ompi'
Makefile:1806: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
抱歉,我必须将所有日志文件上传到mediafire,因为它们太大,所以不接受它们。
我做错了什么?请帮忙! S.O.S!
答案 0 :(得分:1)
我找到了解决方案!!!
我登录root
并在不使用sudo的情况下完成了安装步骤。
#gunzip -c openmpi-2.1.1.tar.gz | tar xf -
#cd openmpi-2.1.1
#./configure --prefix=/opt/openmpi-2.1.1 CC=icc CXX=icpc FC=ifort
#make all install
我试图将OpenMPI与英特尔Composer编译器一起使用,这导致了权限问题。我按照here找到的安装说明进行了操作,但是在尝试安装时我遇到了同样的问题。问题是链接器ld
"找不到"正确的库,因为调用$LD_LIBRARY_PATH
时sudo
变量中不再提供这些库。解决此问题的唯一方法是登录root
用户并将$LD_LIBRARY_PATH
变量设置为与普通用户相同。
我希望将来可以帮助其他人。