我正在尝试在 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 版,但我有另一个版本的mpi.h
in ampich-3.2.4 install
确实有正确的MPICH_NUMVERSION
.
#include
我尝试将相关文件和s简单复制并粘贴到~/anaconda2/include/
文件夹中,但无济于事(第一个错误是error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
)。
那么我该如何解决呢?按照说明安装 Fenics 后,如何运行演示?