2017-05-04 88 views
0

我試圖從Fenics(2016.2.0)在Ubuntu 16.04.2,Python 2.7,Anaconda(使用Spyder爲IDE)上運行基本演示。演示是ft_01poisson.py。錯誤說:新安裝的Fenics演示崩潰MPICH_NUMVERSION

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_NUMVERSION

我嘗試了簡單的複製和粘貼的相關文件和#include s到~/anaconda2/include/文件夾無濟於事(第一個錯誤是error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive])。

那麼我該如何解決這個問題?如何在按照說明安裝Fenics後運行演示程序?

回答

0

所以,答案是

conda create -n fenicsproject -c conda-forge fenics 

我想刪除我的問題作爲建議FenicsProject環境中工作,但我不知道怎麼辦。享受每個人!

+0

就在你的問題下面是一個鏈接,說'刪除'。如果你想刪除你的問題,然後點擊它! –