我正在尝试在Ubuntu 16.04.2,Python 2.7,Anaconda(使用Spyder for IDE)上运行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
中有另一版本的mpich-3.2.4 install
,它具有正确的MPICH_NUMVERSION
。
我尝试将相关文件和#include
的简单复制粘贴到~/anaconda2/include/
文件夹无效(第一个错误为error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
)。
那么我该如何解决这个问题呢?按照安装Fenics的说明后如何让演示运行?
答案 0 :(得分:0)
因此,答案是按照
的建议在FenicsProject环境中工作conda create -n fenicsproject -c conda-forge fenics
我会删除自己的问题,但我不知道如何。享受每一个人!