如何通过-libm到MPICC? libimf.so:警告:在调用feupdateenv没有实现,将总是失败 [英] How to pass -libm to MPICC? libimf.so: warning: feupdateenv is not implemented and will always fail
问题描述
我更换一个新手谁试图通过 mpicc
来编译程序 ICC
与海湾合作委员会
。我有<一个href=\"http://stackoverflow.com/questions/3353119/how-to-force-openmpi-to-use-gcc-instead-of-icc-is-recompiling-openmpi-necessary\">already发现,我需要使用下面的命令来编译
$ OMPI_CC = GCC化妆
不过,我得到以下错误消息(的这是众所周知的)
/opt/intel/fce/9.1.036/lib/libimf.so:警告:警告:在调用feupdateenv没有实现,将总是失败
我尝试做
$使清洁和放大器;&安培; OMPI_CC = GCC OMPI_LDFLAGS = -libm使
然后我看到
的/ usr / bin中/劳工处:找不到-libm
collect2:劳工处返回1退出状态
不过,我觉得那里的文件
lrwxrwxrwx /usr/lib/libm.so - &GT; /lib/libm.so.6
lrwxrwxrwx /lib/libm.so.6 - &GT; libm-2.3.6.so
-rw-R - R-- /lib/libm-2.3.6.so
使用 - SHOWME
标志来确定mpicc / MPI编译器包装中使用的标志。然后调用您自己选择的编译器(ICC / GCC / PGCC /不管),并添加相关的标志,所以正确的MPI库链接。
记住,你需要使用 - SHOWME
与文件为包装,以显示正确的标志。
更多信息是在这里: http://www.open-mpi.org/faq/?category=mpi-apps#wrapper-showme-with-no-file
I am a newbie who tries to compile a program via mpicc
replacing icc
with gcc
. I have already discovered, that I need to use the following command to compile
$ OMPI_CC=gcc make
However, I get the following error message (which is well-known)
/opt/intel/fce/9.1.036/lib/libimf.so: warning: warning: feupdateenv is not implemented and will always fail
I try to do
$ make clean && OMPI_CC=gcc OMPI_LDFLAGS=-libm make
Then I see
/usr/bin/ld: cannot find -libm
collect2: ld returned 1 exit status
However, I find the file there
lrwxrwxrwx /usr/lib/libm.so -> /lib/libm.so.6
lrwxrwxrwx /lib/libm.so.6 -> libm-2.3.6.so
-rw-r--r-- /lib/libm-2.3.6.so
Use the --showme
flag to determine the flags used by mpicc/mpi compiler wrappers. Then invoke your own compiler of choice (icc/gcc/pgcc/whatever) and add the relevant flags so the correct MPI libraries are linked.
Remember, you need to use --showme
with a file for the wrapper to show the correct flags.
More info is here: http://www.open-mpi.org/faq/?category=mpi-apps#wrapper-showme-with-no-file
这篇关于如何通过-libm到MPICC? libimf.so:警告:在调用feupdateenv没有实现,将总是失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!