1

I am trying to run a basic demo from Fenics (2016.2.0) on Ubuntu 16.04.2, Python 2.7, Anaconda (with Spyder for the IDE). The demo is ft_01poisson.py. The error says:

RuntimeError: In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '.../error/dolfin_6c..dc/compile.log'

Ok, let's take a look. Everything is fine until...

.../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"

Ok, let's see what the source says:

#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"

I track down ~/anaconda2/include/petscconf.h:

#define PETSC_HAVE_MPICH_NUMVERSION 30200300

Now, the version of ~/anaconda2/include/mpi.h that I have in is version 2.2, but I have another version of mpi.h in a mpich-3.2.4 install which does have the correct MPICH_NUMVERSION.

I tried a simple copy and paste of the relevant files and #includes to the ~/anaconda2/include/ folder to no avail (the first error is error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]).

So how do I fix this? How do I get the demo to run after following the instructions to install Fenics?

carsonc
  • 85
  • 7

1 Answers1

0

So, the answer is to work within the FenicsProject Environment as suggested by

conda create -n fenicsproject -c conda-forge fenics

I would delete my own question, but I don't know how. Enjoy everyone!

carsonc
  • 85
  • 7