This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Importing dolfin.h results in bad_alloc when trying to access eigen matrix

0 votes

I have a c++ code where in one file if I include dolfin.h, I get a seg fault as soon as I try to use an eigen matrix. Has anyone run into a problem like this before?

asked Nov 16, 2016 by rviertel FEniCS Novice (700 points)

You are going to have to provide a (minimal) working example in order for anyone to be able to answer this...

1 Answer

+1 vote
 
Best answer

So while I was trying to pull my code out of the rest of my project to make a minimal working example, I discovered that a local copy of Eigen was being compiled with the project. That version was 3.2.2, while the fenics library had been compiled with 3.2.92. I replaced the older version of Eigen with the newer and everything works perfectly now.

answered Nov 16, 2016 by rviertel FEniCS Novice (700 points)
selected Nov 17, 2016 by rviertel
...