如何强制OpenMPI使用GCC而不是ICC?是否需要重新编译OpenMPI? [英] How to force OpenMPI to use GCC instead of ICC? Is recompiling OpenMPI necessary?
问题描述
我有一个用于 gcc
的并行计算的C代码,我想在一个集群上编译它,它显然使用 icc
通过 mpicc
。更正代码 icc
- 友好似乎是太费时,所以我想知道我是否可以问 OpenMPI
使用 gcc
。我没有该集群的管理员权限,我真的不喜欢原来的配置。
如果不能在例如。 Makefile
,然后我可以希望在我的主目录中编译 OpenMPI
,但是我需要一些指导,那。你能帮我吗?
UPDATE1 b
Makefile
包含
CC = mpicc
CFLAGS + = -DMPI
这里有一些OpenMPI文件
$ which mpicc
设置
/ usr / bin / mpicc
lrwxr-xr-x / usr / bin / mpicc - 让我知道,这是一个非常简单的例子,我们可以看到,如果我可以为您提供更多信息。
UPDATE2
使用 OpenMPI
mpicc $ c $> c>
不会更改编译器。$ more /usr/local/share/openmpi/mpicc-wrapper-data.txt
project =打开MPI
project_short = OMPI
version = 1.1.4
language = C
compiler_env = CC
compiler_flags_env = CFLAGS
compiler = icc
extra_includes = openmpi
preprocessor_flags =
compiler_flags = -pthread
linker_flags =
libs = -lmpi -lorte -lopal -ldl -Wl, - export-dynamic -lnsl -lutil - ldl
required_file =
但是,我没有权限编辑此文件, code> OPMI_CC = gcc
UPDATE3
环境变量
CC = gcc
不起作用$ export CC = gcc
$ echo $ CC
gcc
$ make clean $$ make
.. .icc:...错误
UPDATE4
...
export OMPI_CC = gcc
http://stackoverflow.com/questions/3353119/how-to-force-openmpi-to-use-gcc-instead-of-icc-is-recompiling-openmpi-necessary/3353285#3353285> thanks to sharth < a>)。我应该有一天记得这是不同的东西...
虽然创建了二进制文件,我得到了以下再见消息
/opt/intel/fce/9.1.036/lib/libimf.so:warning:warning:feupdateenv未实现,总是失败
解决方案请参阅 http://www.open-mpi.org/faq/?category=mpi-apps# override-wrappers-after-v1.0 。
I have a C-code for parallel computing written for
gcc
, and I want to compile it on a cluster, which apparently usesicc
viampicc
. Correcting the code to beicc
-friendly seems to be too time-demanding, so I wonder if I can askOpenMPI
to usegcc
instead. I don't have the admin rights on that cluster, and I would actually prefer to do not mess the original configuration.If it is not possible to set in e.g.
Makefile
, then I could hopefully compileOpenMPI
in my home directory, but I need some guidance in what must be done after that. Could you help me?
UPDATE1
The
Makefile
containsCC = mpicc CFLAGS += -DMPI
And here are some OpenMPI files
$ which mpicc /usr/bin/mpicc lrwxr-xr-x /usr/bin/mpicc -> opal_wrapper -rwxr-xr-x /usr/bin/opal_wrapper
Let me know, if I can provide you more information.
UPDATE2
With the help of Jeff, I was able to find
OpenMPI
settings formpicc
$ more /usr/local/share/openmpi/mpicc-wrapper-data.txt project=Open MPI project_short=OMPI version=1.1.4 language=C compiler_env=CC compiler_flags_env=CFLAGS compiler=icc extra_includes= openmpi preprocessor_flags= compiler_flags=-pthread linker_flags= libs=-lmpi -lorte -lopal -ldl -Wl,--export-dynamic -lnsl -lutil -ldl required_file=
However, I do not have rights to edit this file, and
OPMI_CC = gcc
doesn't change compiler.
UPDATE3
Environmental variable
CC = gcc
doesn't help$ export CC=gcc $ echo $CC gcc $ make clean $$ make ...icc:...errors
UPDATE4
...but
export OMPI_CC=gcc
does finally help (thanks to sharth). I should one day remember that these are different things...Despite that the binary was created, I got the following bye-bye message
/opt/intel/fce/9.1.036/lib/libimf.so: warning: warning: feupdateenv is not implemented and will always fail
解决方案See http://www.open-mpi.org/faq/?category=mpi-apps#override-wrappers-after-v1.0.
这篇关于如何强制OpenMPI使用GCC而不是ICC?是否需要重新编译OpenMPI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!