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

Ubuntu ppa or compile from source which provide better performance ?

+1 vote

I want to have a fast version of FEniCS and thinking about which way offer better Performance Ubuntu PPA or compile from source?
Or more general what are general tricks to speed up fenics?

asked Mar 28, 2015 by maxb90 FEniCS Novice (770 points)
edited Mar 28, 2015 by maxb90

1 Answer

+1 vote
 
Best answer

The biggest difference as far as I can tell after some testing is not which way the binaries have been built (either by you or the package maintainer) but which version you get. I tried just now on my machine (Ubuntu 14.04) with the Cahn-Hilliard demo.

It runs in 52 seconds with FEniCS built from source and in 40 seconds with the Ubuntu packages. The main difference is here that the packages are version 1.3 while the from source build is using version 1.5+. Generally, later version should be faster so a regression might have been introduced (calls for further investigation).

answered Mar 30, 2015 by logg FEniCS Expert (11,790 points)
selected Mar 30, 2015 by maxb90

Ok thanks for your answer. Do you also have experience about performance differences between using FEniCS with Python and FEniCS with C++.

C++ is generally faster but for most applications Python is close enough. A very rough estimate would be that a typical Python application is 10% slower but it depends very much on the application. Use the Python version if you are not an expert C++ programmer and intend to make low-level hacks.

...