gpt4 book ai didi

c - 错误 : libtool - while compiling an MPI program

转载 作者:太空狗 更新时间:2023-10-29 11:07:58 25 4
gpt4 key购买 nike

我正在使用 OpenSuse Leap 并安装了 openMPI thought YaST。运行 which mpirun 命令我得到 /usr/lib64/mp​​i/gcc/openmpi/bin/mpirun 并运行 which mpicc 我得到 /usr/bin/mpicc.

如何首先确保 OpenMPI 已正确安装?

其次,我有一个简单的 hello world 我是进程 X 程序并运行 mpicc hello.c 我得到了这个输出

gcc: error: libtool:: No such file or directory

gcc: error: link:: No

such file or directory mpicc: No such file or directory

此外,我安装了 Eclipse for Parallel Application 并使用了一个内置示例,它在构建时为我提供了此输出

make all

Building target: hello

Invoking: GCC C Linker

mpicc -o "hello" ./src/hello.o

gcc: error: libtool:: No such file or directory

gcc: error: link:: No such file or directory

makefile:30: recipe for target 'hello' failed

mpicc: No such file or directory

make: *** [hello] Error 1

我检查了 YaST 并安装了 libtool。

最佳答案

这个答案来得太晚了。我最近遇到了同样的问题。因此,任何来这里寻求答案的人,这就是我让它工作的方式。

请注意:这是一个孤立的情况,会出现类似的错误

gcc: error: libtool:: No such file or directory

gcc: error: link:: No such file or directory

mpicc: No such file or directory

首先尝试检查LP建议的解决方案。它将尝试更新您的 libtool autoconf 和 automake。如果你无事可做:

sudo zypper in automake autoconf libtool
root's password:
Loading repository data...
Reading installed packages...
'libtool' is already installed.
No update candidate for 'libtool-2.4.2-15.2.2.x86_64'. The highest available version is already installed.
'autoconf' is already installed.
No update candidate for 'autoconf-2.69-10.1.2.noarch'. The highest available version is already installed.
'automake' is already installed.
No update candidate for 'automake-1.13.4-5.1.2.noarch'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.

然后显式添加您的 OpemMPI 路径变量。

export PATH=/usr/lib64/mpi/gcc/openmpi/bin:$PATH

这对我有用。祝你好运!

关于c - 错误 : libtool - while compiling an MPI program,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35378437/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com