【发布时间】:2017-10-02 02:36:17
【问题描述】:
我正在尝试在 Ubuntu 16.04.2、Python 2.7、Anaconda(IDE 使用 Spyder)上运行 Fenics (2016.2.0) 的基本演示。演示是ft_01poisson.py。错误说:
RuntimeError: In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '.../error/dolfin_6c..dc/compile.log'
好的,我们来看看。一切都很好,直到...
.../anaconda2/include/petscsys.h:144:6: error: #error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h"
# error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h"
好的,让我们看看消息来源是怎么说的:
#elif defined(PETSC_HAVE_MPICH_NUMVERSION)
# if !defined(MPICH_NUMVERSION)
# error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h"
我追踪~/anaconda2/include/petscconf.h:
#define PETSC_HAVE_MPICH_NUMVERSION 30200300
现在,我拥有的 ~/anaconda2/include/mpi.h 版本是 2.2 版,但我在 mpich-3.2.4 install 中有另一个版本的 mpi.h,它确实具有正确的 MPICH_NUMVERSION。
我尝试将相关文件和#includes 简单复制并粘贴到~/anaconda2/include/ 文件夹中无济于事(第一个错误是error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive])。
那么我该如何解决这个问题?按照说明安装 Fenics 后如何运行演示?
【问题讨论】:
标签: python c++ linux mpi petsc