作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 Windows 子系统中运行的 Ubuntu 上安装 PETSc,但步骤详细 on the official webpage导致编译错误。
首先,我克隆了 PETSc 存储库并运行了配置命令:./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-openmpi --download-fblaslapack
,这有效。 (我之前已经安装了 OpenMPI,但是如果没有 --download-openmpi
开关,configure 命令就无法工作。)然后我执行了 ./configure 代码( make PETSC_DIR=/mnt/c/Stuff/Petsc/petsc PETSC_ARCH=arch-linux2-c-debug all
)的 make 命令输出并得到了这个错误:
In file included from /mnt/c/Stuff/Petsc/petsc/src/mat/order/qmdmrg.c:4:0:
/mnt/c/Stuff/Petsc/petsc/include/petscsys.h:134:12: fatal error: mpi.h: No such file or directory
# include <mpi.h>
^~~~~~~
compilation terminated.
gmakefile:153: recipe for target 'arch-linux2-c-debug/obj/mat/order/qmdmrg.o' failed
make[2]: *** [arch-linux2-c-debug/obj/mat/order/qmdmrg.o] Error 1
which mpicc
给出预期的
/usr/bin/mpicc
.有人有想法吗?谢谢您的帮助!
最佳答案
解决方案非常简单:我只运行了 make all test
.与建议的有效命令不同。
关于ubuntu - 如何在 WSL 中的 PETSc 编译期间解决 'fatal error: mpi.h: No such file or directory',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56152201/
我是一名优秀的程序员,十分优秀!